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

Re: OpernRD "Ultimate" with two USB hard disks. How to tell uboot which one to boot from?

On Aug 11, 2012, at 6:17 PM, Eric Cooper wrote:

On Sun, Aug 12, 2012 at 01:08:41AM +0000, Clint Adams wrote:
On Sat, Aug 11, 2012 at 05:45:00PM -0700, Rick Thomas wrote:
How can I make sure that uboot will always use the system disk?

You could check both drives for the uImage etc. files and boot
the first match.

Or, assuming booting from the data disk will just fail, do something
   setenv bootcmd "${bootusb0}; ${bootusb1}"
   setenv bootusb0 ...
   setenv bootusb1 ...

Thanks, Eric!  I wound up using a variation on your theme:

bootcmd0=ext2load usb 0:1 0x01100000 /uInitrd; ext2load usb 0:1 0x00800000 /uImage bootcmd1=ext2load usb 1:1 0x01100000 /uInitrd; ext2load usb 1:1 0x00800000 /uImage bootcmd=setenv bootargs $(bootargs_console); usb start; run bootcmd0; run bootcmd1; bootm 0x00800000 0x01100000

I had to move the "usb start" outside of the two alternatives because if I put it inside them the second "usb start" in rapid succession got confused and couldn't find anything at all.

David's suggestion of getting the initrd and kernel off an SD card is also attractive, because it avoids the problem entirely rather than trying to work around it. I decided to go with the solution that didn't require me to make a trip to the parts store.



Reply to: