Akagi201
10/2/2014 - 9:52 AM

u-boot-sunxi.md

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.

branch

  • sunxi Main branch, tracks upstream u-boot master. Supports A10, A13, A10s and A20.
  • lichee-dev NAND capable replacement for Allwinner A10 u-boot
  • lichee-dev-a20 NAND capable replacement for Allwinner A20 u-boot
  • lichee/ Unmodified mirrors of original Allwinner sources

build

pcduino3

  • 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-

output

分开的2个

  • u-boot-sunxi/u-boot.img
  • u-boot-sunxi/spl/sunxi-spl.bin

整合成1个

  • u-boot-sunxi/u-boot-sunxi-with-spl.bin

flash to TF card

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

  • on mac: sudo dd if=sd-flash/u-boot-sunxi-with-spl.bin of=/dev/disk1 bs=1024 seek=8

or, separately

  • 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

wiki