-
Notifications
You must be signed in to change notification settings - Fork 3
Home
u-boot for Allwinner A10
sun4i Default branch. Most up to date. Supports booting from MMC only.
lichee/ Unmodified mirrors of original Allwinner sources
wip/ Work in progress temporary feature branches
wip/update Attempt to update to current u-boot version. It's known that SPL is not working well but you main u-boot binary should be fine. You can combine with an SPL built from the sun4i branch.
v2011.09-sun4i
You need a suitable gcc ARM Linux GNUEABI toolchain installed and added to your PATH.
Then compile u-boot by running
make sun4i CROSS_COMPILE=arm-none-linux-gnueabi-
or alternatively depending on how your toolchain is configured
make sun4i CROSS_COMPILE=arm-linux-gnueabi-
A10 boots the SPL loader from block 8. This then loads actual u-boot from block 32 onwards, counted in 1KB blocks.
dd if=spl/sun4i-spl.bin of=/dev/sdc bs=1024 seek=8
dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32
You also need to partition the card to store system.bin, uImage, boot.scr (optional) and rootfs partition there. First partition should start at sector 2048 to leave sufficient space for uboot & environment.
This version of u-boot supports boot.scr, and will look for it in the first partition FAT /boot.scr or extX /boot.scr or extX /boot/boot.scr. boot.scr contains your needed uboot commands for loading script.bin, kernel. initrd (optional), setting kernel parameters and bootig.
If no boot.scr is found then it will fall back to load script.bin & kernel uImage from the first partition in FAT format
fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000
baudrate=115200
boot.scr=if fatload mmc 0 0x44000000 boot.scr || ext2load mmc 0 0x44000000 boot.scr || ext2load mmc 0 0x44000000 boot/boot.scr; then source 0x44000000; fi; true
boot_mmc=fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000
bootcmd=run boot.scr setargs boot_mmc
bootdelay=3
console=ttyS0,115200
kernel=uImage
loglevel=8
panicarg=panic=10
root=/dev/mmcblk0p2
setargs=setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
stderr=serial
stdin=serial
stdout=serial
How the SD-Card is used by u-boot-mmc, counted in 1KB blocks:
start size
0 8KB Unused, available for partition table etc.
8 24KB Initial SPL loader
32 512KB u-boot
544 128KB environment