January 7, 2017

Orange Pi Plus - U-boot on the eMMC

My goal here is to put U-boot onto the eMMC and set it up for network booting. This proves to be somewhat more difficult than I thought.

My basic thinking was to boot Armbian from the SD card and then use "dd" to place the SPL and uboot onto the emmc. I can use "scp" to copy the U-boot image from my desktop to Armbian, then I do commands like this:

dd if=/dev/mmcblk1 of=save.bin bs=1024 count=1024
dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8
Just as a note; the emmc as shipped has android installed with a bizarre partitioning scheme. I suppose the disk could be repartitioned, but I don't see a real problem for just leaving it as it is and doing the above. I'll ignore the details here, except to say there is a big extended partition starting at sector 1, but it is largely empty, the first partition inside of it begins at sector 73728. The U-boot with spl image is about 458K in size (so it requires about 1000 sectors).

When I halt Armbian, remove the SD card, and reboot, I get this:

U-Boot SPL 2016.11-g29e0cfb-dirty (Dec 18 2016 - 15:32:55)
DRAM: 1024 MiB
Trying to boot from MMC2
MMC Device 1 not found
spl: could not find mmc device. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
So .... the SPL is unable to locate the MMC device. This build of U-boot is for the Orange Pi PC and works fine when booting from SD card.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org