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.

AM437x usb boot times out waiting for /dev/sda2

Hello

I have a custom board based on the am437x GPEVM.  It boots fine from NAND and SD but I need to make it boot linux from a USB drive.

I have read through this helpful post:

https://e2e.ti.com/support/embedded/linux/f/354/p/348085/1248270#1248270  

This helped me ensure that the ehci and musb modules are built in, which they now are, but the kernel still times out waiting for /dev/sda2.  I have tried several options in menuconfig but without any success.  I must still be missing something as a built-in since I can fully access the drive and see the entire ext4 file system on the drive if I boot linux via NAND.

Below is my boot log and I have attached my .config file.

U-Boot# run usbboot
(Re)start 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

USB device 0:
    Device 0: Vendor: General  Rev: 5.00 Prod: UDisk
            Type: Removable Hard Disk
            Capacity: 961.0 MB = 0.9 GB (1968128 x 512)
... is now current device
reading uEnv.txt
1048576 bytes read in 588 ms (1.7 MiB/s)
Loaded environment from uEnv.txt
Importing environment ...
4503056 bytes read in 2479 ms (1.7 MiB/s)
43431 bytes read in 123 ms (344.7 KiB/s)
Booting from usb 0...
Kernel image @ 0x82000000 [ 0x000000 - 0x44b610 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8fff2000, end 8ffff9a6 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.26 (cjubien@tm24-vm) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #40 PREEMPT Wed Jan 6 15:33:56 PST 2016
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: TI AM437x GP EVM
[    0.000000] cma: CMA: reserved 24 MiB at ae000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM437x ES1.2 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260112
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/sda2 rw rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1003576K/1046528K available (6211K kernel code, 316K rwdata, 2112K rodata, 260K init, 231K bss, 42952K reserved, 268288K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0829054   (8325 kB)
[    0.000000]       .init : 0xc082a000 - 0xc086b304   ( 261 kB)
[    0.000000]       .data : 0xc086c000 - 0xc08bb080   ( 317 kB)
[    0.000000]        .bss : 0xc08bb08c - 0xc08f5048   ( 232 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] GIC CPU mask not found - kernel will fail to boot.
[    0.000000] GIC CPU mask not found - kernel will fail to boot.
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000021] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
[    0.000055] OMAP clocksource: timer1 at 24000000 Hz
[    0.000317] Console: colour dummy device 80x30
[    0.000367] Calibrating delay loop... 1993.93 BogoMIPS (lpj=9969664)
[    0.059125] pid_max: default: 32768 minimum: 301
[    0.059278] Security Framework initialized
[    0.059359] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.059385] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.066213] CPU: Testing write buffer coherency: ok
[    0.066673] Setting up static identity map for 0x80617200 - 0x80617258
[    0.066793] L310 cache controller enabled
[    0.066813] l2x0: 16 ways, CACHE_ID 0x410000c9, AUX_CTRL 0x7e030000, Cache size: 256 kB
[    0.067748] devtmpfs: initialized
[    0.070194] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.079425] omap_hwmod: tptc0 using broken dt data from edma
[    0.079515] omap_hwmod: tptc1 using broken dt data from edma
[    0.079590] omap_hwmod: tptc2 using broken dt data from edma
[    0.145325] omap_hwmod: usb_otg_ss0: _wait_target_disable failed
[    0.148650] omap_hwmod: dss_dispc: cannot be enabled for reset (3)
[    0.151929] omap_hwmod: dss_rfbi: cannot be enabled for reset (3)
[    0.152542] pinctrl core: initialized pinctrl subsystem
[    0.153495] regulator-dummy: no parameters
[    0.155479] NET: Registered protocol family 16
[    0.157509] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.159863] cpuidle: using governor ladder
[    0.159875] cpuidle: using governor menu
[    0.168361] syscon 44e10000.control_module: regmap [mem 0x44e10000-0x44e107f3] registered
[    0.169969] platform 49000000.edma: alias fck already exists
[    0.169991] platform 49000000.edma: alias fck already exists
[    0.170003] platform 49000000.edma: alias fck already exists
[    0.173187] OMAP GPIO hardware version 0.1
[    0.185457] omap-gpmc 50000000.gpmc: could not find pctldev for node /pinmux@44e10800/nand_16mb_pins_default, deferring probe
[    0.185487] platform 50000000.gpmc: Driver omap-gpmc requests probe deferral
[    0.190373] No ATAGs?
[    0.190399] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.190410] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.218026] bio: create slab <bio-0> at 0
[    0.234137] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.235162] evm_v3_3d: 3300 mV
[    0.238275] vgaarb: loaded
[    0.238812] i2c-core: driver [palmas] using legacy suspend method
[    0.238823] i2c-core: driver [palmas] using legacy resume method
[    0.239579] SCSI subsystem initialized
[    0.241021] usbcore: registered new interface driver usbfs
[    0.241201] usbcore: registered new interface driver hub
[    0.241420] usbcore: registered new device driver usb
[    0.242683] omap_i2c 44e0b000.i2c: could not find pctldev for node /pinmux@44e10800/touch_screen_i2c0_pins_default, deferring probe
[    0.242709] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
[    0.242736] omap_i2c 4802a000.i2c: could not find pctldev for node /pinmux@44e10800/rtc_m41T81_i2c1_pins_default, deferring probe
[    0.242750] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
[    0.242771] omap_i2c 4819c000.i2c: could not find pctldev for node /pinmux@44e10800/switch_board_i2c2_pins_default, deferring probe
[    0.242783] platform 4819c000.i2c: Driver omap_i2c requests probe deferral
[    0.243177] pps_core: LinuxPPS API ver. 1 registered
[    0.243188] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.243313] PTP clock support registered
[    0.245012] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.246005] Advanced Linux Sound Architecture Driver Initialized.
[    0.246980] Switched to clocksource timer1
[    0.266421] NET: Registered protocol family 2
[    0.267151] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.267225] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.267290] TCP: Hash tables configured (established 8192 bind 8192)
[    0.267427] TCP: reno registered
[    0.267439] UDP hash table entries: 512 (order: 1, 8192 bytes)
[    0.267461] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
[    0.267651] NET: Registered protocol family 1
[    0.268019] RPC: Registered named UNIX socket transport module.
[    0.268031] RPC: Registered udp transport module.
[    0.268036] RPC: Registered tcp transport module.
[    0.268041] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.271097] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.370330] bounce pool size: 64 pages
[    0.370524] VFS: Disk quotas dquot_6.5.2
[    0.370574] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.371043] NFS: Registering the id_resolver key type
[    0.371106] Key type id_resolver registered
[    0.371114] Key type id_legacy registered
[    0.371146] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.371273] msgmni has been set to 1484
[    0.372728] NET: Registered protocol family 38
[    0.372769] io scheduler noop registered
[    0.372776] io scheduler deadline registered
[    0.372807] io scheduler cfq registered (default)
[    0.376538] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
[    0.380067] OMAP DSS rev 2.0
[    0.385715] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.388739] pinctrl-single 44e10800.pinmux: pin 44e10970.0 already requested by 44e10800.pinmux; cannot claim for 44e09000.serial
[    0.388758] pinctrl-single 44e10800.pinmux: pin-92 (44e09000.serial) status -22
[    0.388769] pinctrl-single 44e10800.pinmux: could not request pin 92 (44e10970.0) from group debuguart0_pins_default  on device pinctrl-single
[    0.388778] omap_uart 44e09000.serial: Error applying setting, reverse things back
[    0.388864] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.388886] omap_uart 44e09000.serial: No clock speed specified: using default: 48000000
[    0.389000] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 104, base_baud = 3000000) is a OMAP UART0
[    1.175025] console [ttyO0] enabled
[    1.179321] omap_uart 48024000.serial: no wakeirq for uart0
[    1.185186] omap_uart 48024000.serial: No clock speed specified: using default: 48000000
[    1.193889] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 106, base_baud = 3000000) is a OMAP UART2
[    1.204258] omap_uart 481a6000.serial: no wakeirq for uart0
[    1.210228] omap_uart 481a6000.serial: No clock speed specified: using default: 48000000
[    1.218869] 481a6000.serial: ttyO3 at MMIO 0x481a6000 (irq = 76, base_baud = 3000000) is a OMAP UART3
[    1.229104] omap_uart 481a8000.serial: no wakeirq for uart0
[    1.234962] omap_uart 481a8000.serial: No clock speed specified: using default: 48000000
[    1.243645] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 77, base_baud = 3000000) is a OMAP UART4
[    1.254676] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.262127] [drm] Initialized drm 1.1.0 20060810
[    1.276498] brd: module loaded
[    1.284893] loop: module loaded
[    1.288699] (hci_tty): inside hci_tty_init
[    1.293431] (hci_tty): allocated 249, 0
[    1.300664] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.310999] of_dma_request_slave_channel: dma-names property of node '/ocp/spi@481a2000' missing or empty
[    1.321362] spi spi2.0: not using DMA for McSPI
[    1.331066] usbcore: registered new interface driver asix
[    1.336960] usbcore: registered new interface driver ax88179_178a
[    1.343762] usbcore: registered new interface driver cdc_ether
[    1.350143] usbcore: registered new interface driver smsc95xx
[    1.356357] usbcore: registered new interface driver net1080
[    1.362697] usbcore: registered new interface driver cdc_subset
[    1.369147] usbcore: registered new interface driver zaurus
[    1.375213] usbcore: registered new interface driver cdc_ncm
[    1.381767] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.388700] ehci-pci: EHCI PCI platform driver
[    1.393545] ehci-platform: EHCI generic platform driver
[    1.399512] ehci-omap: OMAP-EHCI Host Controller driver
[    1.405282] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.411841] ohci-pci: OHCI PCI platform driver
[    1.416681] ohci-platform: OHCI generic platform driver
[    1.423142] usbcore: registered new interface driver cdc_wdm
[    1.429406] usbcore: registered new interface driver usb-storage
[    1.437095] mousedev: PS/2 mouse device common for all mice
[    1.445044] i2c-core: driver [rtc-ds1307] using legacy suspend method
[    1.452016] i2c-core: driver [rtc-ds1307] using legacy resume method
[    1.459684] i2c /dev entries driver
[    1.463501] Driver for 1-wire Dallas network protocol.
[    1.471377] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    1.517852] omap-aes 53501000.aes: OMAP AES hw accel rev: 0.1
[    1.527324] omap-des 53701000.des: OMAP DES hw accel rev: 0.33
[    1.535398] omap-sham 53100000.sham: hw accel on OMAP rev 0.0
[    1.543900] usbcore: registered new interface driver usbhid
[    1.549985] usbhid: USB HID core driver
[    1.555373] platform 44d00000.wkup_m3: Driver wkup_m3 requests probe deferral
[    1.566248] oprofile: no performance counters
[    1.571445] oprofile: using timer interrupt.
[    1.576184] TCP: cubic registered
[    1.579772] Initializing XFRM netlink socket
[    1.584268] NET: Registered protocol family 17
[    1.589115] NET: Registered protocol family 15
[    1.593871] Key type dns_resolver registered
[    1.599507] PM: Voltage scaling data blob not provided from DT.
[    1.605863] PM: no-rtc available, rtc-only mode disabled.
[    1.611696] ThumbEE CPU extension supported.
[    1.616209] Registering SWP/SWPB emulation handler
[    1.622873] evm_v3_3d: disabling
[    1.626270] regulator-dummy: disabling
[    1.631848] omapdrm omapdrm.0: DMM not available, disable DMM support
[    1.639879] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.646822] [drm] No driver support for vblank timestamp query.
[    1.703718] Console: switching to colour frame buffer device 128x37
[    1.716906] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
[    1.723139] omapdrm omapdrm.0: registered panic notifier
[    1.728746] [drm] Initialized omapdrm 1.0.0 20110917 on minor 0
[    1.736785] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[    1.742274] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[    1.749643] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x48
[    1.756315] nand: Micron MT29F16G08ABACAWP
[    1.760735] nand: 2048MiB, SLC, page size: 4096, OOB size: 224
[    1.766857] using OMAP_ECC_BCH16_CODE_HW ECC scheme
[    1.772174] 10 ofpart partitions found on MTD device omap2-nand.0
[    1.778612] Creating 10 MTD partitions on "omap2-nand.0":
[    1.784281] 0x000000000000-0x000000100000 : "NAND.MLO"
[    1.791275] 0x000000100000-0x000000200000 : "NAND.u-boot"
[    1.798497] 0x000000200000-0x000000300000 : "NAND.u-boot-env"
[    1.805983] 0x000000300000-0x000000400000 : "NAND.dtb"
[    1.812926] 0x000000400000-0x000000500000 : "NAND.dtb-upgrade"
[    1.820675] 0x000000500000-0x000000d00000 : "NAND.kernel"
[    1.828577] 0x000000d00000-0x000001500000 : "NAND.kernel-upgrade"
[    1.837321] 0x000001500000-0x000029f00000 : "NAND.filesystem"
[    1.912258] 0x000029f00000-0x000049f00000 : "NAND.filesystem-upgrade"
[    1.973496] 0x000049f00000-0x000080000000 : "NAND.user"
[    2.072572] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 400 kHz
[    2.080145] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 100 kHz
[    2.087705] omap_i2c 4819c000.i2c: bus 2 rev0.12 at 100 kHz
[    2.094200]  remoteproc0: wkup_m3 is available
[    2.098957]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[    2.108549]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    2.119565]  remoteproc0: Direct firmware load (am335x-pm-firmware.elf) failed with error -2
[    2.143746]  remoteproc0: Falling back to user helper
[    2.197001] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    2.203401] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    2.210564] libphy: 4a101000.mdio: probed
[    2.214781] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
[    2.223843] cjxxx - gmii-sel is f9e10650 for device 44e10650.cpsw-phy-sel
[    2.231089] ...and the value is 0
[    2.234722] cpsw 4a100000.ethernet: Detected MACID = 68:9e:19:b9:a6:14
[    2.243223] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    2.253216] ALSA device list:
[    2.256350]   No soundcards found.
[    2.260701] Waiting for root device /dev/sda2...

 

4073.config.txt

  • From your .config file, you have enabled the "Mass storage driver" support as module, please change to "inbuilt" (*) support then rebuild the kernel and boot.

    Actually you should get USB detected messages in kernel message.
    You have to enable mass storage support to detect the USB mass storage device.

  • Please refer to the following thread. From a quick check, I see your .config has 'CONFIG_USB_DWC3=m' and 'CONFIG_USB_DWC3_OMAP=m', which should be 'y'. AM437x uses DWC3/xHCI, not EHCI or MUSB.

    e2e.ti.com/.../477360
  • Thanks Bin! This was the solution. I can now boot my AM437x board from USB.

    I also tried the solution proposed by Titusrathinaraj but it did not work on my board -- but most likely that would be the solution for devices prior to the AM437x.

    For anyone else experiencing problems booting from a USB drive on the AM437x, here's the CONFIG settings I changed to get this working:

    +CONFIG_USB_XHCI_HCD=y
    +CONFIG_USB_XHCI_PLATFORM=y
    
    +CONFIG_USB_DWC3=y
    +CONFIG_USB_DWC3_HOST=y
    +CONFIG_USB_DWC3_OMAP=y
    
    

    I had messed around with MUSB and EHCI settings but as Bin notes these are not needed here.