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.

Booting AM335x EVM from USB

I'm trying to boot my board from USB, but it doesn't seem to be working. I'm following the instructions here: http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User's_Guide#Booting_Linux_from_USB_storage

I have the SYSBOOT pins set as per the instructions here: http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#USB

That is:
SW3:
    Pin1: OFF (logic 1)
    Pin2: OFF (logic 1)
    Pin3: ON   (logic 0)
    Pin4: OFF (logic 1)
    Pin5: On   (logic 0)

As per the TRM Table 26-7 the boot sequence for this should be USB0  NAND  SPI0  MMC0

I have flashed my NAND with the MLO and uboot so I can enter bootloader mode from the second boot option if the first should fail.

I have partitioned and loaded a uSD card with the SDK 6.0 pre-built images and I did boot the board fully from there, so I know the SD card can be read and works correctly.

I removed the uSD card and inserted it in a uSD to USB device (the same that I used to plug into my Ubuntu machine to program the uSD card).

When I attach the uSD card (in the USB reader) to the USB port on the EVM and try to boot, it fails and just boot the u-boot that's in the NAND instead.

The steps from the first link say I should run the following commands:

U-Boot# usb start
(Re)start USB...
USB0:   scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
U-Boot# setenv mmcroot /dev/sda2 ro
U-Boot# run mmcargs
U-Boot# run bootcmd_usb
## Error: "bootcmd_usb" not defined

Clearly, bootcmd_usb is not present, but when I printed the environment variables I found a mmcboot command:

mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr}

Trying to run that I get:

U-Boot# run mmcboot
Booting from mmc ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!

So my questions:
1) why can't I force the boot from u-boot to occur?
2) why didn't the EVM initially boot from USB?

full boot log:

6036.uboot_from_usb_boot_log.txt
U-Boot SPL 2013.01.01 (Jun 25 2013 - 16:42:52)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0


U-Boot 2013.01.01 (Jun 25 2013 - 16:42:52)

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  256 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0
mmc_send_cmd : timeout: No status update
Card did not respond to voltage select!
mmc0(part 0) is current device
mmc_send_cmd : timeout: No status update
Card did not respond to voltage select!
Booting from nand ...

NAND read: device 0 offset 0x280000, size 0x500000
 5242880 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot#

  • Mike Worster said:
    1) why can't I force the boot from u-boot to occur?

    In order to boot from USB you would need to execute the necessary u-boot commands to initialize the USB interface, load the appropriate file to memory, and then execute it.  I don't know the commands off-hand though I'll see if perhaps I can get the author of the wiki page you mentioned to fill in the blanks!

    Mike Worster said:
    2) why didn't the EVM initially boot from USB?

    Please see Section 26.1.8.6 "USB Boot Procedure" of the TRM.  It discusses USB boot.  In particular, USB boot does not use mass storage class.  It's based off RNDIS (ethernet over USB).  So you cannot just stick a USB stick into the device and expect the ROM to be able to boot it.  (Side note: I wish it worked that way instead!!!)

    This wiki page gives a high level overview of what you'd need to do in order to actually utilize the USB boot mode directly:

    http://processors.wiki.ti.com/index.php/Sitara_Uniflash_Quick_Start_Guide

  • Mike Worster said:

    I'm trying to boot my board from USB, but it doesn't seem to be working. I'm following the instructions here: http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User's_Guide#Booting_Linux_from_USB_storage

    ...

    I have partitioned and loaded a uSD card with the SDK 6.0 pre-built images and I did boot the board fully from there, so I know the SD card can be read and works correctly.

    Note that the document in question is for SDK 7.0, not 6.0.  'bootcmd_usb' doesn't exist in 6.0, and so the problem you have seen happens.  Now, if you want to load from USB once within U-Boot on SDK 6.0, you can use 'ext2load' or 'fatload' to load what you want from usb.  Just change 'mmc' to 'usb' when calling these commands.

  • Mike,

    You may also want to review the AM335x errata document as there are a couple of issues that may prevent USB booting altogether. Advisory 1.0.20 in particular is a good place to start.

  • Thanks gents, this all pretty much answers my question. I did just find the part of the TRM that talks about this:


        • The device supports USB client boot only.

        • The ROM implements as RNDIS class driver, so the device enumerates as an ethernet port.

    I'm pretty sure having to use a host PC with a TFTP server won't fly from our requirements. I was hoping this board could be booted/run from USB (like you can in "demo" mode with Ubuntu off a USB stick)