u-boot for Allwinner sunxi series of SoCs (A10, A13, A10s, and A20)
linux-sunxi u-boot is fully SPL enabled which means it supports booting directly on the bare metal with no help from the Allwinner bootloaders. U-Boot SPL fully replaces Allwinner boot0 & boot1.
git clone https://github.com/linux-sunxi/u-boot-sunxi.git
cd u-boot-sunxi
branch -> sunxi
make distclean CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-
make Linksprite_pcDuino3_config CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-
make CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-
u-boot-sunxi/u-boot.img
u-boot-sunxi/spl/sunxi-spl.bin
u-boot-sunxi/u-boot-sunxi-with-spl.bin
A10 & A13 boots the SPL loader from block 8. This then loads actual u-boot from block 40 onwards, counted in 1KB blocks. Replace /dev/sdX with the device name of your media
sudo dd if=sd-flash/u-boot-sunxi-with-spl.bin of=/dev/disk1 bs=1024 seek=8
The region with offset 8K and size 32K contains the SPL initial loader
dd if=sd-flash/sunxi-spl.bin of=/dev/disk1 bs=1024 seek=8
The next region of 512K contains u-boot
dd if=sd-flash/u-boot.img of=/dev/disk1 bs=1024 seek=40
Finally, the next 128K contains the environment
dd if=/dev/zero of=/dev/disk1 bs=1024 count=128 seek=552