SATA Booting
There are at least 3 ways to run using a SATA drive:
- Load U-Boot, the kernel and the root filesystem from the SATA drive. This requires
soldering, and not just where the DIP switch isn't, so I'm going to leave this for
now.
- Continue to load U-Boot from the microSD card, and move the kernel and root
filesystem to the SATA drive.
- Continue to load U-Boot and the kernel from the microSD card, and move just the root
filesystem to the SATA drive.
I'm now using option 2, which I set up as follows. But note that in U-Boot, reading from SATA seems to be
slower than reading from the microSD card. Perhaps it is reading one byte at a time, or something.
- Make a /boot partition and format it as ext2. (I believe u-boot doesn't understand ext4.)
- Copy your uImage into /boot. To get the one from the microSD card, look at the
values that U-Boot uses to read it from the card and do something like dd
if=/dev/mmcblk0 of=/boot/uImage bs=512 skip=2048 count=6144.
- In U-Boot, check that the file can be seen using something like sata init ; ext2ls sata 0:3.
(0 is the SATA device number and 3 is the partition; see sata info and sata part.)
- Load it into memory using something like ext2load sata 0:3 ${loadaddr} uImage.
- Boot with "bootm".