Booting from USB flash drive

I’m trying to boot from a USB flash drive. I essentially copy the u-boot commands for booting from the SD card. I’m running into a problem once the kernel has loaded:

`
Begin: Mounting root file system … Begin: Running /scripts/local-top … done.
Begin: Waiting for root file system … done.
Gave up waiting for root device. Common problems:

  • Boot args (cat /proc/cmdline)
  • Check rootdelay= (did the system wait long enough?)
  • Check root= (did the system wait for the right device?)
  • Missing modules (cat /proc/modules; ls /dev)
    ALERT! /dev/sda1 does not exist. Dropping to a shell!
    modprobe: module i8042 not found in modules.dep
    modprobe: module ehci-hcd not found in modules.dep
    modprobe: module uhci-hcd not found in modules.dep
    modprobe: module ohci-hcd not found in modules.dep
    `

I plugged in /dev/sda1 as a place holder, but I can’t find any indication that the initramfs was able to detect a USB flash drive. For some reason it complains about ehci-hcd and ohci-hcd modules not being found. The stock kernel is able to mount flash drives without any issues using the builtin usb-storage and musb-hdrc modules.

[ 1.617727] Initializing USB Mass Storage driver... [ 1.625471] usbcore: registered new interface driver usb-storage [ 1.634288] USB Mass Storage support registered. [ 1.641729] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)

I’d really appreciate any advice on how to detect and mount the flash drive. Do I need to make a modification to initrd? Or do I need to rebuild the kernel with the ehci-hcd / ohci-hcd modules? Why isn’t it detecting the eMMC?

http://www.embeddedhobbyist.com/debian-tips/beaglebone-black/beaglebone-black-usb-boot/

As far as I know this wont work with an initrd, but i could be remembering wrongly. Also, the example I give, was based on the idea that this was not possible with an zImage file. I believe this is no longer the case.

Just glancing over your output there it seems perhaps your kernel is expecting a few modules to be compiled into the kernel statically.

I had been referencing that blog post, but it seemed too outdated to be very useful. I figured that just copying the u-boot command sequence and adjusting uEnv as necessary, it should just work.

I was finally able to get a successful boot using the am335x-boneblack.dtb file.
I was using the am335x-evm.dtb previously.

It looks like initrd works fine. And the zImage.

I was finally able to get a successful boot using the am335x-boneblack.dtb file.
I was using the am335x-evm.dtb previously.

oops ?