Notes about Allwinner (sunxi/arm) platform

sunxi represents the family of ARM SoCs from a fabless semiconductor company Allwinner. Although Allwinner does not participate itself actively on Linux kernel development, there's a community of enthusiasts who have figured out how most of the parts on these SoCs work and are actively upstreaming proper device drivers for these SoCs.

Getting help on Linux on Sunxi platform

There is an active developer community who has been actively documenting existing hardware on linux-sunxi wiki. There's also a mailing list, in case you cannot find the answer to your questions from wiki.

PS. Questions about vendor BSP and Mali driver should not be asked there.

Flashing the eMMC devices using combination of FEL/Fastboot

Software needed

  1. sunxi-tools
  2. android fastboot
  3. u-boot binaries for specific device

Initial steps

Start the device in FEL mode. In case your device already has something installed, you can use the fel-sdboot binary written on the µSD card.

Start up the device in Fastboot mode

Using sunxi-fel utility from the sunxi-tools package, it is possible to boot the device via the USB cable using the FEL protocol.

For automation purposes it is also possible to supply custom environment to u-boot via uEnv.txt. In our case, the uEnv.txt contents are following:

#=uEnv
bootcmd=fastboot usb 0

Now, you can start the device in fastboot mode with following command:

sunxi-fel -v -p uboot u-boot-sunxi-with-spl.bin write 0x43100000 uEnv.txt

Now you can utilize the fastboot devices command on the host computer to see whether your device is actually visible.

Flashing in Fastboot mode

Firstly, you need to partition your target device:

fastboot oem format

This will create 4 partitions on the target device:

  1. loader1 - sunxi-spl.bin from u-boot. Common for all the 32-bit sunxi devices.
  2. loader2 - u-boot.img from u-boot. Device specific.
  3. esp - EFI System Partition. Must be formatted as VFAT, can be utilized for storing UEFI configuration, but u-boot can also load its configuration (uboot.scr) from there.
  4. system - System partition with operating system

All of them can be populated using using fastboot flash command:

fastboot flash [partition] [image file]