[U-Boot-Users] USB booting...
nbryan at embebidos.com
Wed Jul 6 17:33:48 CEST 2005
I am attempting to boot Linux on a target platform using a
USB mass storage device (flash disk) to hold the kernel and the
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
So I created two partitions on the USB flash disk, partion 1 holds
the kernel image and partition 2 holds the initrd image.
The partition table looks like this:
Disk /dev/sdb: 32 MB, 32768000 bytes
2 heads, 32 sectors/track, 1000 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 154 4912 83 Linux
/dev/sdb2 155 308 4928 83 Linux
My file sizes are:
initrd: 1203800 bytes.
uImage: 2285056 bytes.
The command I want to use to copy the initrd is:
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,
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?
Appologies for the long-winded pre-amble, but I don't know how to ask a
question like this without describing the problem.
Thanks for any insight,
More information about the U-Boot