Template:H3 Support status

= Sunxi support =

Current status
The H3 and support is progressing nicely. It is possible to find a usable mainline 4.x kernel (plus some patches) and a legacy 3.4 kernel in various work-in-progress git branches. See the Manual build section for more details.

Manual build
You can build things for yourself by following our Manual build howto and by choosing from the configurations available below.

Mainline U-Boot
Use the build target.

The H3 boards can boot from SD, NAND or NOR flash (if available), and via FEL using the OTG USB port. In U-Boot, loading the kernel is also supported from USB or ethernet (netboot).

Sunxi/Legacy Kernel
The 3.4 kernel from the official Allwinner's git repository does not support H3 yet. But it is possible to use one of the kernel forks, based on the lichee H3 SDK tarball:
 * Siarhei Siamashka's branch '20151207-embedded-lima-memtester-h3'
 * Yann Dirson's fork added a few more fixes and adopted most of
 * Boris Lovosevic' great initial work on Allwinner's H3 kernel

Configure this kernel using sun8i_h3_defconfig, the rest is explained in the kernel compilation guide.

Use the .fex file for generating script.bin.

When booting the legacy 3.4 kernel with the mainline U-Boot, add the following line to boot.cmd:

setenv machid 1029 setenv bootm_boot_mode sec

Some other legacy kernel repositories:
 * 3.4-lichee-based kernel, based on work by ssvb and loboris
 * Yocto support here glues together all the required parts to get this kernel to work with mainline u-boot, as well as accelerated X11/GLES support
 * A newer H3 BSP variant appeared with tons of fixes which has been made available by FriendlyARM.
 * A cleaned up fork has been adopted by Armbian project. On top of that Armbian maintains a bunch of 3.4.x patches for H3 devices.

Mainline kernel
The H3 SoC has decent support in mainline kernels. For cpufreq, thermal, ethernet, HDMI, and USB OTG support, a) third party patches or b) a pre-patched distro (e.g. Armbian) is needed. Currently, the ethernet and USB OTG support are also queued for kernel 4.13 (to be released in September 2017), although the ethernet port is already accessible with recent U-Boot versions.

The development process, links to patches and links to kernel fork repositories are listed on the Linux mainlining effort page. Patches can also be found from the arm-linux mailing list.

Repositories with H3 patches (some already outdated):
 * Maxime Ripard's branch 'sunxi/for-next' (very basic H3 support, without USB)
 * Hans de Goede's branch 'sunxi-wip' (many work-in-progress patches, including H3 and USB support for it)
 * Siarhei Siamashka's branch '20151223-h3-mainline-smp-hack' (minimal set of H3 patches, with USB and SMP)
 * Chen-Yu Tsai's branch 'h3-emac' (working Ethernet and USB)
 * Ondřej Jirman's branch for H3 based orange Pi (kernel 4.12) (work-in-progress DVFS and USB-OTG)
 * CPU frequency and voltage scaling (cpufreq)
 * Thermal regulation (if CPU heats above certain temperature, it will try to cool itself down by reducing CPU frequency)
 * Ethernet driver (v5 patches from montjoie)
 * Working HDMI driver (v6 patches from moinejf ported to sunxi-ng clk driver and fixed for 4.11)
 * USB OTG (v4 patches from Icenowy)

Use the device-tree binary.