[U-Boot-Users] USB booting...

Wolfgang Denk wd at denx.de
Wed Jul 6 22:02:19 CEST 2005

In message <1120664027.6064.99.camel at daroca> you wrote:
> I am attempting to boot Linux on a target platform using a
> USB mass storage device (flash disk) to hold the kernel and the 
> root filesystem.
> I thought it may be a good idea to replicate the same steps 
> used when booting from a tftp server, i.e. I copy the root 
> filesystem (using an initrd image) to an address in RAM, then 
> copy the kernel to a different address in RAM.  Finally bootm with 
> the start address of the kernel. Bootargs will be set during this 
> process.

You can do it this way, but it is a waste of system  RAM.  Why  don't
you use a (read-only) file system mounted on the USB device?

> So I created two partitions on the USB flash disk, partion 1 holds 
> the kernel image and partition 2 holds the initrd image.  

This is possible, but seems overly complicated to me. For alternative
approaches please see the DULG, especially

> usb read 20800000 x y.
> Where 20800000 is the address for the initrd to be copied to, 
> x will be the block-offest to the start of partition 2 and y will be 
> the size in blocks of the initrd image.
> Now I need to calculate the block-size based on cylinders, heads,
> units etc.

No, you don't. The block size is always a constant - 512 bytes per block.

> My questions are, am I making this too complex, is there an easier way
> to achieve the same result of booting using a USB flash disk with 
> seperate kernel/initrd images?

Yes, there is. Just read the manual.

> Appologies for the long-winded pre-amble, but I don't know how to ask a
> question like this without describing the problem.

RTFM first?

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
1000 pains                                              = 1 Megahertz

More information about the U-Boot mailing list