This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM437X: USB boot issue

Part Number: PROCESSOR-SDK-AM437X

Hi All,


I am trying to boot the board from usb(USB 1)interface on AM437X board.But it's unable to boot from USB [ No boot logs found].
We tried the following cases:


USB storage has been detected in u-boot.


=> usb start
starting USB...
USB0:   Register 2000440 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) .

USB (pendrive) flashing steps followed - Bootstrapping options has been set to USB [10101b] as per reference  manual

  1. Used this script (create-sdcard.sh) to create partitions( boot, rootfs) 
  2. Copied u-boot.img , MLO files to boot partition.
  3. Tried booting the board using the above image. But boot got failed.

Note:

Partitions created by script

1.) BOOT - FAT32
2.) ROOTFS - EXT2

Please help us the way to resolve the issue ASAP.

  • Hi,

    Is this on TI AM437x EVM or your custom board?

    Which version of the Processor SDK do you use?

    How do you get the u-boot prompt as in your above post if the USB boot failed?

    Does the UART console prints any message when USB boot failed?

    Please note that MLO and u-boot.img have to be built with am43xx_evm_usbhost_boot_defconfig when boot from USB device. This defconfig is different from other boot methods, such as MMC boot.

  • Thanks for your quick support.

    Is this on TI AM437x EVM or your custom board? - Custom board

    Which version of the Processor SDK do you use? - Currently No SDK available [Compiling with direct U-boot source]

    How do you get the u-boot prompt as in your above post if the USB boot failed? For cross verifying usb detection, we tried by booting from NAND flash

    Does the UART console prints any message when USB boot failed? From USB boot no prints came.

    Please note that MLO and u-boot.img have to be built with am43xx_evm_usbhost_boot_defconfig when boot from USB device. This defconfig is different from other boot methods, such as MMC boot. - Tried with am43xx_evm_usbhost_boot_defconfig, with that we were able to start boot from USB but we are facing the following issue

    BOOT LOGS:

    Welcome to minicom 2.7

    OPTIONS: I18n 
    Compiled on Nov 15 2018, 20:18:47.
    Port /dev/ttyUSB0, 12:21:21

    Press CTRL-A Z for help on special keys

                                            
    U-Boot SPL 2016.05-00230-g5bf448d-dirty (Nov 21 2019 - 12:07:05)
    Trying to boot from USB                 
    USB0:   Register 2000440 NbrPorts 2     
    Starting the controller                 
    USB XHCI 1.00                           
    scanning bus 0 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!      
    reading u-boot.img                      
    reading u-boot.img

    u-boot.img is not been loaded.


    Trials:
    We have tried by flashing the u-boot.img compiled with  am43xx_evm_ethboot_defconfig  defconfig file

    And I could see the u-boot logs in this case (U-bbot image is been loaded)

    Issue : It stops at this point. Please provide us inputs to proceed further.

  • Hi,

    JAYAPRIYA KM said:
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!    

    This is an known issue in Processor SDK v6.x U-Boot, I assume this is the version you use. Please apply the two U-Boot patches mentioned in the link below.

  • Thanks for your reply.

    We tried applying above patches in uboot-ver16( which we are using) ,facing undefined reference issues during compilation and we are trying to sort it out.
    Can you please tell us, for USB  boot do we have to add any USB related configuration in spl.c or any other files (except the using usb_defconfig as you said above).

    During usb boot,booting fails at this function static int spl_fit_select_fdt(const void *fdt, int images, int *fdt_offsetp)(under common/spl/spl_fit.c) though the 437x-gp-evm device tree is been been enabled (in uboot) 

    I tried adding some debug prints under the function,please do find the following logs with debug prints
     
    Read name 437x-gp-evm 
    spl_fit_select_fdt match failed -- This is the one which is used by us but it  fails

    Read name am437x-sk-evm 
    spl_fit_select_fdt match failed

    Read name am43x-epos-evm 
    spl_fit_select_fdt match failed

    Read name am437x-idk-evm 

    board_fit_config_name_match return value 0

     VVDN spl_fit_select_fdt match failed
    No matching DT out of these options:
       <NULL>
       <NULL>
       <NULL>
       <NULL>
    spl_load_image_fat: error reading image u-boot.img, err - -2
    Error loading from USB device
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board hang() ###

    and upon printing the  ti_common_eeprom ep->name from the function( *ep = TI_EEPROM_DATA) am getting junk values as below(debug logs)

    ep->name-->  S��.;k�"<[+��H�G��4����#�uK�:I��>��`�/s�3$��U�V1�:�F*Aȅ�
     name_tag-->  AM43__GP

    Kindly share your ideas on resolving the issue.

    Please do find the defconfig used.

    CONFIG_ARM=y
    CONFIG_AM43XX=y
    CONFIG_TARGET_AM43XX_EVM=y
    CONFIG_DM_SERIAL=y
    CONFIG_DM_SPI=y
    CONFIG_DM_SPI_FLASH=y
    CONFIG_DM_GPIO=y
    CONFIG_SPL_STACK_R_ADDR=0x82000000
    CONFIG_DEFAULT_DEVICE_TREE="am437x-gp-evm"
    CONFIG_SPL=y
    CONFIG_SPL_STACK_R=y
    CONFIG_ISW_ENTRY_ADDR=0x40300350
    CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,SPL_USB_HOST_SUPPORT"
    CONFIG_HUSH_PARSER=y
    CONFIG_CMD_BOOTZ=y
    # CONFIG_CMD_IMLS is not set
    CONFIG_CMD_ASKENV=y
    # CONFIG_CMD_FLASH is not set
    CONFIG_CMD_MMC=y
    CONFIG_CMD_SF=y
    CONFIG_CMD_SPI=y
    CONFIG_CMD_I2C=y
    CONFIG_CMD_USB=y
    CONFIG_CMD_DFU=y
    CONFIG_CMD_GPIO=y
    # CONFIG_CMD_SETEXPR is not set
    CONFIG_CMD_DHCP=y
    CONFIG_CMD_MII=y
    CONFIG_CMD_PING=y
    CONFIG_CMD_EXT2=y
    CONFIG_CMD_EXT4=y
    CONFIG_CMD_EXT4_WRITE=y
    CONFIG_CMD_FAT=y
    CONFIG_CMD_FS_GENERIC=y
    CONFIG_SPI_FLASH=y
    CONFIG_SPI_FLASH_BAR=y
    CONFIG_SPI_FLASH_MACRONIX=y
    CONFIG_SYS_NS16550=y
    CONFIG_TI_QSPI=y
    CONFIG_USB=y
    CONFIG_USB_DWC3=y
    CONFIG_USB_DWC3_GADGET=y
    CONFIG_USB_DWC3_OMAP=y
    CONFIG_USB_DWC3_PHY_OMAP=y
    CONFIG_USB_GADGET=y
    CONFIG_OF_CONTROL=y
    CONFIG_DM=y
    CONFIG_DMA=y
    CONFIG_DM_MMC=y
    CONFIG_TIMER=y
    CONFIG_OMAP_TIMER=y
    CONFIG_FIT=y
    CONFIG_SPL_OF_LIBFDT=y
    CONFIG_SPL_LOAD_FIT=y
    CONFIG_OF_LIST="am437x-gp-evm am437x-sk-evm am43x-epos-evm am437x-idk-evm"
    CONFIG_USB_GADGET_DOWNLOAD=y
    CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
    CONFIG_G_DNL_VENDOR_NUM=0x0403
    CONFIG_G_DNL_PRODUCT_NUM=0xbd00
    CONFIG_OF_LIBFDT=y
    CONFIG_CMD_TIME=y
    

    And Upon disabling CONFIG_SPL_LOAD_FIT am facing the following issue(From log I could see uboot.img from usb storage  is been loaded successfully )


    usb_read: udev 0

    usb_read: dev 0 startblk 6832, blccnt 1 buffer 81fff240
    read10: start 6832 blocks 1
    COMMAND phase
    dev=80a015e0, pipe=c0010203, buffer=81fff1a0, length=31
    EP STATE RUNNING.
    DATA phase
    dev=80a015e0, pipe=c0008283, buffer=81fff240, length=512
    EP STATE RUNNING.
    STATUS phase
    dev=80a015e0, pipe=c0008283, buffer=81fff160, length=13
    EP STATE RUNNING.
    usb_read: end startblk 6833, blccnt 1 buffer 81fff440
    Size: 513496, got: 513496
    Jumping to U-Boot
    loaded - jumping to U-Boot....image changed  0x808000000

    Can you please help us to resolve one among the above two approaches.

  • Hi,

    JAYAPRIYA KM said:
    We tried applying above patches in uboot-ver16( which we are using) ,facing undefined reference issues during compilation and we are trying to sort it out.
    Can you please tell us, for USB  boot do we have to add any USB related configuration in spl.c or any other files (except the using usb_defconfig as you said above).

    I am not sure what this 'uboot-ver16' is and where it comes from, but please use the U-Boot package from the Processor SDK Linux which you can download from ti.com. This is the only U-Boot we support.

  • HI Bin,

    We are using the u-boot version which is been fetched form TI site and this is the u-boot version been used u-boot-2016.05.

    Can you please share us the SDK/u-boot version link which resolves USB boot issue as you mentioned in the redirected link(redirected link which has the solution).

  • Hi,

    We are using TI SDK 3.00.00.04 version,can you please help us to find usb boot is possible with this version TI 3.00.00.04 of SDK.

  • Hi,

    The SDK v3.0.0.4 was release 3+ years ago, and is no longer supported on this forum.

    Please test the Processor SDK v5.3 from the link below. This SDK was release in last December. I confirmed USB host boot works in this U-Boot release.

    http://software-dl.ti.com/processor-sdk-linux/esd/AM437X/05_03_00_07/index_FDS.html

    Or you can download the latest Processor SDK release - v6.1.0.8 from the link below, then apply the two U-Boot patches I mentioned in my previous post above. I confirmed USB host boot work in this U-Boot release with the two patches.

    http://software-dl.ti.com/processor-sdk-linux/esd/AM437X/06_01_00_08/index_FDS.html