User:Vpelletier

I began poking around an A31 development board with virtually no prior ARM knowledge. I intent this page to summarise what I learned from the board.

Boot
On power-up, the A31 looks for bootable code in NAND or SD card first (depending on whether the "u-boot" button near the composite video outputs is pressed), and if it fails it enters FEL mode.

If bootable code is found (how ?), the sequence is:


 * 1) boot0
 * 2) boot1 (note: loads stuff from a fat-formatted partition, including code and fonts)
 * 3) u-boot
 * 4) linux

Booting from sdcard requires different boot0, boot1 and u-boot builds (why ?).

For an SD card to be bootable, the following pieces are needed:

The "mbr" chunks are called partition tables in boot1 firmware. It seems to look for them all before going further with boot. I did not study their content much, and their content probably has to match with some partitions defined in the DOS partition table (so a computer can put data in these partitions only, very probably).

NAND flash process
Flashing the NAND over USB is possible using FEL mode and a windows-only piece of software provided by WITS along with the board: "PhoenixSuit". It takes a LiveSuit image and writes something based on its content to the device NAND in the following sequence:


 * 1) FEL mode turns the board into a FS USB device able to read/write stuff from/to ram, and set CPU to execute code at a given address. The protocol is implemented in sunxi-tools/fel . FEL is silent on serial.
 * 2) PhoenixSuit uses the FEL protocol to send a set of binaries (present in the image) to ram, then make CPU jump tp it.
 * 3) CPU re-enumerates, becoming an HS USB device (note to VirtualBox users: you need the USB2-enabling extensions to get past this point, otherwise phoenixSuit times out).
 * 4) PhoenixSuit uses another (?) protocol to write to NAND, and resets cpu.