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.

AM4376: Booting from USB memory by USB boot

Guru 12235 points
Part Number: AM4376
Other Parts Discussed in Thread: AM4378

Tool/software:

Hi,

As mentioned in the related question, I am considering USB boot. If the boot sequence is set to USB_MS, what data should be written to the USB memory?

I tried to insert the USB into the evaluation board (AM437xEVM) and boot it using the following procedure, but it did not work.

- Insert the USB memory into a Windows PC and copy the following data to the root directory.

1. MLO

2. U-boot.img

3. U-boot-spl.bin

4. zImage

5. am4378.ccxml

6. tisdk-base-image-am437x-evm.ubi

7. debrick.scr

8. am437x-gp-evm-hdmi.dtb

- Insert the above USB into J13 (USB1) of the evaluation board.

- Turn on the power switch of SW12 of the evaluation board with the settings 1: ON-2: ON-3: ON-4: OFF-5: OFF.

I tried to boot it using the above procedure, but it did not work.

Can you give me some advice?

Thanks,

Conor

  • Hi Conor,

    I tried to boot it using the above procedure, but it did not work.

    Do you mean the uart console doesn't show any message? If so, does the console show anything in UART boot mode?

  • Hi Bin,

    I inserted the USB into the EVM, started it up, and captured the log displayed on the RS232C connector with Teraterm, which I have attached.

    U-Boot SPL 2021.01-g44a87e3ab8 (Jul 02 2024 - 01:47:31 +0000)
    WDT:   Not found!
    Trying to boot from USB
    Bus usb@483d0000: Register 2000440 NbrPorts 2
    Starting the controller
    USB XHCI 1.00
    scanning bus usb@483d0000 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!
    
    
    U-Boot 2021.01-g44a87e3ab8 (Jul 02 2024 - 01:47:31 +0000)
    
    CPU  : AM437X-GP rev 1.2
    Model: TI AM437x GP EVM
    DRAM:  2 GiB
    PMIC:  TPS65218
    NAND:  512 MiB
    MMC:   OMAP SD/MMC: 0
    Loading Environment from FAT... MMC: no card present
    Net:   eth2: ethernet@4a100000
    Hit any key to stop autoboot:  0
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    starting USB...
    Bus usb@483d0000: Register 2000440 NbrPorts 2
    Starting the controller
    USB XHCI 1.00
    scanning bus usb@483d0000 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    
    Device 0: Vendor: TOSHIBA Rev: 1.00 Prod: TransMemory
                Type: Removable Hard Disk
                Capacity: 7400.0 MB = 7.2 GB (15155200 x 512)
    ... is now current device
    MMC: no card present
    ** Invalid partition 2 **
    Booting from nand ...
    
    NAND read: device 0 offset 0x100000, size 0x80000
     524288 bytes read: OK
    
    NAND read: device 0 offset 0x300000, size 0x700000
     7340032 bytes read: OK
    => U-Boot SPL 2021.01-g44a87e3ab8 (Jul 02 2024 - 01:47:31 +0000)
    Unknown command 'U-Boot' - try 'help'
    => WDT:   Not found!
    Unknown command 'WDT:' - try 'help'
    => Trying to boot from USB
    Unknown command 'Trying' - try 'help'
    => Bus usb@483d0000: Register 2000440 NbrPorts 2
    Unknown command 'Bus' - try 'help'
    => Starting the controller
    Unknown command 'Starting' - try 'help'
    => USB XHCI 1.00
    Unknown command 'USB' - try 'help'
    => scanning bus usb@483d0000 for devices... 2 USB Device(s) found
    Unknown command 'scanning' - try 'help'
    =>        scanning usb for storage devices... 1 Storage Device(s) found
    Unknown command 'scanning' - try 'help'
    => SPL: Please implement spl_start_uboot() for your board
    Unknown command 'SPL:' - try 'help'
    => SPL: Direct Linux boot not active!
    Unknown command 'SPL:' - try 'help'
    =>
    Unknown command 'SPL:' - try 'help'
    =>
    Unknown command 'SPL:' - try 'help'
    => U-Boot 2021.01-g44a87e3ab8 (Jul 02 2024 - 01:47:31 +0000)
    Unknown command 'U-Boot' - try 'help'
    =>
    Unknown command 'U-Boot' - try 'help'
    => CPU  : AM437X-GP rev 1.2
    Unknown command 'CPU' - try 'help'
    => Model: TI AM437x GP EVM
    Unknown command 'Model:' - try 'help'
    => DRAM:  2 GiB
    Unknown command 'DRAM:' - try 'help'
    => PMIC:  TPS65218
    Unknown command 'PMIC:' - try 'help'
    => NAND:  512 MiB
    Unknown command 'NAND:' - try 'help'
    => MMC:   OMAP SD/MMC: 0
    Unknown command 'MMC:' - try 'help'
    => Loading Environment from FAT... MMC: no card present
    Unknown command 'Loading' - try 'help'
    => Net:   eth2: ethernet@4a100000
    Unknown command 'Net:' - try 'help'
    => Hit any key to stop autoboot:  0
    Unknown command 'Hit' - try 'help'
    => MMC: no card present
    Unknown command 'MMC:' - try 'help'
    => MMC: no card present
    Unknown command 'MMC:' - try 'help'
    => MMC: no card present
    Unknown command 'MMC:' - try 'help'
    => MMC: no card present
    Unknown command 'MMC:' - try 'help'
    => starting USB...
    Unknown command 'starting' - try 'help'
    => Bus usb@483d0000: Register 2000440 NbrPorts 2
    Unknown command 'Bus' - try 'help'
    => Starting the controller
    Unknown command 'Starting' - try 'help'
    => USB XHCI 1.00
    Unknown command 'USB' - try 'help'
    => scanning bus usb@483d0000 for devices... 2 USB Device(s) found
    Unknown command 'scanning' - try 'help'
    =>        scanning usb for storage devices... 1 Storage Device(s) found
    Unknown command 'scanning' - try 'help'
    =>
    Unknown command 'scanning' - try 'help'
    => Device 0: Vendor: TOSHIBA Rev: 1.00 Prod: TransMemory
    Unknown command 'Device' - try 'help'
    =>             Type: Removable Hard Disk
    Unknown command 'Type:' - try 'help'
    =>             Capacity: 7400.0 MB = 7.2 GB (15155200 x 512)
    Unknown command 'Capacity:' - try 'help'
    => ... is now current device
    Unknown command '...' - try 'help'
    => MMC: no card present
    Unknown command 'MMC:' - try 'help'
    => ** Invalid partition 2 **
    Unknown command '**' - try 'help'
    => Booting from nand ...
    Unknown command 'Booting' - try 'help'
    =>
    Unknown command 'Booting' - try 'help'
    => NAND read: device 0 offset 0x100000, size 0x80000
    Unknown command 'NAND' - try 'help'
    =>  524288 bytes read: OK
    Unknown command '524288' - try 'help'
    =>
    Unknown command '524288' - try 'help'
    => NAND read: device 0 offset 0x300000, size 0x700000
    Unknown command 'NAND' - try 'help'
    =>  7340032 bytes read: OK
    Unknown command '7340032' - try 'help'
    => =>
    Unknown command '=>' - try 'help'
    =>
    
    
    

    It seems that UART boot can be performed on the EVM.

    -Connect to the PC via RS232C using Teraterm
    -"C" is displayed periodically on Teraterm, and in this state, "u-boot-spl.bin" is sent via XMODEM
    -Confirmed that the following message is displayed on Teraterm after the file data is sent.
    -------------------------------------
    CCCC
    U-Boot SPL 2021.01-g44a87e3ab8 (May 13 2024 - 09:52:30 +0000)
    WDT: Not found!
    Trying to boot from UART
    -------------------------------------

    Even if I send "u-boot-spl.bin" on a custom board instead of the EVM, nothing is displayed after the file transmission is complete.

    I would appreciate some advice.

    Thanks,

    Conor

  • Hi Conor,

    In your attached console log file 3162.log.txt, it shows U-Boot is booted from the USB device, but U-Boot fails to load kernel image from the USB device, as shown in the log from line 39:

      39  ... is now current device
      40 MMC: no card present
      41 ** Invalid partition 2 **
      42 Booting from nand ...

    Early you mentioned as

    - Insert the USB memory into a Windows PC and copy the following data to the root directory.

    1. MLO

    2. U-boot.img

    3. U-boot-spl.bin

    4. zImage

    5. am4378.ccxml

    6. tisdk-base-image-am437x-evm.ubi

    7. debrick.scr

    8. am437x-gp-evm-hdmi.dtb

    This seems to be incorrect. By default, the USB device should have two partitions, which are the same as how the SD card is partitioned when using SD card boot mode. Then MLO and u-boot.img go to the first partition, and the Linux rootfs (which has the kernel zImage and dtb) go to the second rootfs partition.

  • Hi Bin,

    I'm guessing it's probably the same as creating an SD card, but is there any reference documentation?
    It seems that the USB needs a FAT32 boot partition and an EXT4 rootfs partition, but I'm wondering which partition I should put the data on.

    Thanks,

    Conor

  • I'm guessing it's probably the same as creating an SD card,

    It is correct. But I am not aware of any documentation.

    I would recommend to first flash the SDK base WIC image (tisdk-base-image-am437x-evm.wic.xz) to your USB device. This image should boot the EVM from USB interface.

  • Hi Bin,

    I would recommend to first flash the SDK base WIC image (tisdk-base-image-am437x-evm.wic.xz) to your USB device. This image should boot the EVM from USB interface.

    We are currently testing the WIC image by writing it using balenaEtcher, which is recommended by TI. We will let you know if there are any updates.

    Even if I send "u-boot-spl.bin" on a custom board instead of the EVM, nothing is displayed after the file transmission is complete.

    And what about UART booting?
    Since we cannot test UART booting using Linux on a custom board, we tried it with TI-RTOS and it booted successfully. Therefore, it does not appear to be a hardware problem. We would appreciate any comments you may have.

    Thanks,

    Conor

  • Hi Conor,

    And what about UART booting?
    Since we cannot test UART booting using Linux on a custom board, we tried it with TI-RTOS and it booted successfully. Therefore, it does not appear to be a hardware problem. We would appreciate any comments you may have.

    RTOS support goes to a different team. Please create a separate E2E thread for this query.

  • Hi Bin,

    And what about UART booting?
    Since we cannot test UART booting using Linux on a custom board, we tried it with TI-RTOS and it booted successfully. Therefore, it does not appear to be a hardware problem. We would appreciate any comments you may have.

    No, I'm asking about Linux.
    We performed UART boot with TI-RTOS to verify that it was not a hardware (custom board) problem.
    However, our original purpose is to perform UART boot on Linux.
    UART boot worked fine on EVM using Linux SDK, but boot did not work properly on the custom board.
    Please refer to the information mentioned above. Any advice would be appreciated.

    Thanks,

    Conor

  • Hi Conor,

    we tried it with TI-RTOS and it booted successfully.

    Sorry, I misread your message and thought you were not able to use UART boot in TI_RTOS.

    No, I'm asking about Linux.

    I am routing your query or our U-Boot expert to comment on U-Boot UART boot mode.

  • Hi Bin,

    I am routing your query or our U-Boot expert to comment on U-Boot UART boot mode.

    Thank you. I look forward to hearing from a U-Boot expert. I was able to run it on the EVM, but on the custom board, u-boot does not start via UART. I suspect this is probably due to the function for recognizing the EVM (a function that checks the EVM information written in the EEPROM implemented in the EVM). I would appreciate any comments based on these points.

    Thanks,

    Conor

  • Do we have any log from serial terminal when booting from UART on the customer board?
    Best,
    -Hong

  • Hi Hong,

    After the transfer of u-boot-spl.bin was completed in TeraTerm, nothing was displayed.

    - Start SYSBOOT with UART0 setting
    - "C" is displayed periodically on TeraTerm
    - Transfer u-boot-spl.bin with TeraTerm[xmodem]
    - After the transfer is completed, nothing is displayed on TeraTerm. Neither "C" nor any logs are displayed.

    Thanks,

    Conor

  • Let's use JTAG to locate where boot process is when doing UART boot similarly as we discussed in another e2e.
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1377973/am4378-procedure-for-writing-program-data-to-nand-flash/5267905#5267905
    Best,
    -Hong

  • Hi Hong,

    Am I correct in understanding that the way to check the boot process is to follow the steps in the PDF below?

    3438.spl_boot_flow_v1.pdf

    Thanks,

    Conor

  • Let me add clarifications.
    Once having JTAG "attached" to the running board, break the running code with JTAG, and check "PC" value to see it falls under either under ROM or SPL as noted in AM43xx TRM
    If SPL started running, the PDF is one reference on debugging SPL boot issue.
    Best,
    -Hong