[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to make sure my plug boots from the USB flash-stick instead of the USB hard-disk?




On May 27, 2009, at 5:14 AM, David Given wrote:

Martin Michlmayr wrote:
[...]
If you look at bootcmd_usb you'll see something like "ext2load usb
0:1".  0:1 defines the device and partition.
Unfortunately, I don't know whether you can force any consistent
device naming in u-boot.  I suppose you could run:
ext2load usb 0:1 ....
ext2load usb 1:1 ....
and in some cases the first command would fail and then the second
would succeed (or the other way around).

It seems to be consistent in my experience --- it appears to do a depth-first traversal of the USB tree arranged by internal port number. Certainly, mine has no problem booting from one specific USB storage device on a USB tree with five.


So... If I make sure my root UCB key is in the "right" slot of the hub, all will work as planned. But it's a brittle solution. If anybody moves things around, the whole house of cards falls apart...

Is there some way of communicating with the developers of Uboot to see if they could patch it to optionally look for labels or UUIDs when searching for its boot device?


However I have noticed that u-boot seems to be very picky about what USB devices it talks to. I have three different brands of USB key, and only one works (the others all cause u-boot to time out). I'm looking forward to when boot-from-SD works reliably, as that will allow me to avoid the issue completely.


Booting from SD is discussed on the current version of Martin's web page. Does that mean that it works now?


(Doesn't Linux have a system call to allow kernel chain-loading? Would this allow a basic kernel to be loaded from flash that then invokes a kernel read from a file system elsewhere?)

--
David Given
dg@cowlark.com

A kexec based solution would be perfect, but it's a development project in itself.

Enjoy!

Rick


Reply to: