xref: /haiku/docs/develop/kernel/arch/arm/allwinner_a10.rst (revision 3d4afef9cba2f328e238089d4609d00d4b1524f3)
1Allwinner A10 hardware notes
2############################
3
4-  http://linux-sunxi.org
5
6Hardware Information
7====================
8
9The A10 is a system-on chip. There are many devices based on it, for
10example the CubieBoard and the Rikomagic mk802 (versions I and II).
11
12-  ARMv7 Architecture (Cortex-A8)
13-  Mali 400MP GPU
14-  CedarX VPU
15-  SD Card Storage
16-  1GB RAM (DDR)
17-  4GB NAND Flash
18-  Video Outputs
19
20   -  HDMI Video Output
21
22-  Ethernet
23-  USB
24
25Setting up the Haiku SD card
26============================
27
28Not so fun layout here. The A10 boot ROM reads raw blocks from the SD
29card (MBR style), so the bootloader can’t just be dropped in a FAT32
30partition.
31
32-  8KB partition table
33-  24KB SPL loader
34-  512KB u-boot
35-  128KB u-boot environment variables
36-  352KB unused
37-  partition 1 – FAT32 or ext2 (anything u-boot can read is fine)
38-  partition 2 – BeFS, Haiku filesystem, type ‘eb’
39
40Note this layout can be a bit different depending on the u-boot version
41used, some versions will store the environment in uEnv.txt in the FAT32
42partition instead. Since everything is loaded from the SD Card, we are
43free to customize the u-boot or even remove it and get haiku_loader
44booting directly.
45
46Boot Partition
47--------------
48
49Required Files
50~~~~~~~~~~~~~~
51
52-  haiku_loader: Haiku Loader
53-  haiku-floppyboot.tgz: Compressed image with Haiku kernel
54
55Booting
56=======
57
581. SOC load SPL
592. SPL loads u-boot
603. u-boot loads and run the kernel
61
62SPL is a small binary (24K) loaded from a fixed location on the SD card.
63It does minimal hardware initializations, then loads u-boot, also from
64the SD card. From there on things go as usual.
65
66In the long term, we can make haiku_loader be an SPL executable on this
67platform, if it fits the 24K size limit, or have a custom stage1 that
68loads it. For now, u-boot can be an useful debugging tool.
69
70Script.bin
71----------
72
73In order to work on different devices (RAM timings, PIO configs, …), the
74Linux kernels for Allwinner chips use a “script.bin” file. This is
75loaded to RAM at a fixed address by u-boot, then the Kernel parses it
76and uses it to configure the hardware (similar to FDT).
77
78We should probably NOT use this, and convert the script.bin file to an
79FDT instead. The format is known and there are tools to convert the
80binary file to an editable text version and back (bin2fex and fex2bin).
81
82This FEX stuff isn’t merged in mainline Linux, and lives on as Allwinner
83patches. The mainline Linux kernel has some A10 support, rewritten to
84use FDT. We may use the FDT files from there for the most common boards.
85
86Emulation support
87=================
88
89qemu 1.0 has a Cubieoard target which emulates this chip.
90
91Useful links
92============
93
94Arch Linux instructions on creating a bootable SD card (partition
95layout, etc)
96http://archlinuxarm.org/platforms/armv7/allwinner/cubieboard#qt-platform_tabs-ui-tabs2
97
98Linux SunXi: mainline Linux support for the Allwinner chips. Lots of
99docs on the hardware. http://linux-sunxi.org/
100