Last month, I noticed Amlogic provided links to the Android SDK for S802 / M802 on their open source website, but the only way to get the source was to share your SSH public with Amlogic, so that they give you access. It did not happen, but the company has released the source for Linux 3.10.10, U-boot 2011.03, Realtek and Broadcom Wi-Fi drivers, NAND drivers, “TVIN”drivers, and kernel space GPU drivers for Mali-400 / 450 GPU. There are also some customer board files for Meson 6 only (AML8726-MX / M6) but they do not seem to match the kernel…
If you want to build the kernel, including the drivers, you’ll need to download a bunch of files:
wget http://openlinux.amlogic.com:8000/download/ARM/kernel/arm-src-kernel-2014-03-06-d5d0557b2b.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/wifi/rtk8192du-2014-03-06-7f70d95d29.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/wifi/rtk8192eu-2014-03-06-9766866350.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/wifi/rtk8192cu-2014-03-06-54bde7d73d.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/wifi/rtk8188eu-2014-03-06-2462231f02.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/wifi/brcmap6xxx-2014-03-06-302aca1a31.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/wifi/wifi-fw-2014-03-06-d3b2263640.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/modules/aml_tvin-2014-03-06-fb3ba6b1c8.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/modules/aml_nand-2014-03-06-39095c4296.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/customer/aml_customer-2014-03-06-76ce689191.tar.gz
wget http://openlinux.amlogic.com:8000/download/ARM/gpu/gpu-2014-03-06-0425a1f681.tar.gz
You’ll need to extract these tarballs in specific directories:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
tar xvf arm-src-kernel-2014-03-06-d5d0557b2b.tar.gz mkdir -p hardware/amlogic/ mkdir -p hardware/wifi/realtek/drivers mkdir -p hardware/wifi/broadcom/drivers mkdir -p hardware/arm/ cd hardware/amlogic tar xvf ../../../aml_nand-2014-03-06-39095c4296.tar.gz mv aml_nand-amlogic-nand nand cd ../wifi/realtek/drivers tar xvf ../../../../rtk8192du-2014-03-06-7f70d95d29.tar.gz tar xvf ../../../../rtk8192eu-2014-03-06-9766866350.tar.gz tar xvf ../../../../rtk8192cu-2014-03-06-54bde7d73d.tar.gz tar xvf ../../../../rtk8188eu-2014-03-06-2462231f02.tar.gz mv rtk8188eu-8188eu 8188eu mv rtk8192du-8192du 8192du mv rtk8192cu-8192cu 8192cu mv rtk8192eu-8192eu 8192eu cd ../../broadcom/drivers tar xvf ../../../../brcmap6xxx-2014-03-06-302aca1a31.tar.gz mv brcmap6xxx-ap6xxx ap6xxx cd ../../../arm tar xvf ../../gpu-2014-03-06-0425a1f681.tar.gz mv gpu-r3p2-01rel3 gpu cd .. tar xvf ../../aml_tvin-2014-03-06-fb3ba6b1c8.tar.gz mv aml_tvin-amlogic-3.10-bringup tvin |
You can also extract the customer file into the kernel directory to add some drivers. As I said above I’m not sure the source code inside matches the Linux kernel 3.10.10, because there’s now device tree file for the boards. In arch/arm/plat-meson/Kconfig, there are (commented out) references to customer/meson/dt/Kconfig and customer/drivers/Kconfig. The device tree is not available, but the drivers is, so you could give a try in order to build the touchscreen and sensors drivers available in the customer tarball:
1 2 3 |
cd ../linux-amlogic-3.10-bringup tar xvf ../aml_customer-2014-03-06-76ce689191.tar.gz mv aml_customer-master customer |
Finally, the development tree is ready to build the kernel. There must surely be a script somewhere to do that… I haven’t used the file wifi-fw-2014-03-06-d3b2263640.tar.gz, as the kernel did not complain about it, and it looks like it’s just for Android Kit Kat. There are four scripts to build the kernel: mk_m6.sh, mk_m6tv, mk_m6_tvd.sh, and mk_m8.sh. The first three are for meson6 (dual core processor), and the last one meson8 (quad core S802/M802).
Let’s go with M8 build:
1 2 |
make ARCH=arm meson8_defconfig ./mk_m8.sh |
Please not that I had to change mk_m8.sh, as it should just make computer hand requiring a hard reset. The culprity was the line:
1 |
make uImage -j |
The manpage indicates “If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously”. It does not seem like a good idea… ,s so I changed that to
1 |
make uImage -j8 |
Upon successful build, the end of log you look like:
UIMAGE arch/arm/boot/uImage
Image Name: Linux-3.10.10
Created: Mon Mar 10 11:48:52 2014
Image Type: ARM Linux Kernel Image (lzo compressed)
Data Size: 7099978 Bytes = 6933.57 kB = 6.77 MB
Load Address: 00008000
Entry Point: 00008000
Image arch/arm/boot/uImage is ready
/home/jaufranc/edev/AMLogic/s802/linux-amlogic-3.10-bringup/scripts/amlogic/aml2dtb.sh /home/jaufranc/edev/AMLogic/s802/linux-amlogic-3.10-bringup/arch/arm/boot/dts/amlogic/meson8_skt.dtd
DTD_FILE: /home/jaufranc/edev/AMLogic/s802/linux-amlogic-3.10-bringup/arch/arm/boot/dts/amlogic/meson8_skt.dtd
the middle dts file: /home/jaufranc/edev/AMLogic/s802/linux-amlogic-3.10-bringup/arch/arm/boot/dts/amlogic/meson8_skt.dts
process file /home/jaufranc/edev/AMLogic/s802/linux-amlogic-3.10-bringup/arch/arm/boot/dts/amlogic/meson8_skt.dts start
processing... please wait...
process file /home/jaufranc/edev/AMLogic/s802/linux-amlogic-3.10-bringup/arch/arm/boot/dts/amlogic/meson8_skt.dts endCC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
DTC arch/arm/boot/dts/amlogic/meson8_skt.dtb
rm /home/jaufranc/edev/AMLogic/s802/linux-amlogic-3.10-bringup/arch/arm/boot/dts/amlogic/meson8_skt.dts
-rw-r–r– 1 jaufranc jaufranc 11244948 Mar 10 11:48 ./m8boot.img
m8boot.img done
If you want to get U-boot code it’s not quite as messy, you jut need to download and extract two files:
1 2 3 4 5 6 |
wget http://openlinux.amlogic.com:8000/download/ARM/u-boot/uboot-2014-03-06-323515c056.tar.gz wget http://openlinux.amlogic.com:8000/download/ARM/u-boot/aml_uboot_customer-2014-03-06-09887e87b4.tar.gz tar xvf uboot-2014-03-06-323515c056.tar.gz cd uboot-next tar xvf ../aml_uboot_customer-2014-03-06-09887e87b4.tar.gz mv aml_uboot_customer-next/ customer |
Then just select a board in customer/board/ to build U-boot for your hardware. For example:
1 2 |
make m8_k03_M102_v1_config CROSS_COMPILE=arm-linux-gnueabihf- make CROSS_COMPILE=arm-linux-gnueabihf- -j8 |
The build failed for me, but it might be I may need to use another compiler, e.g. arm-none-eabi-gcc.
[Update: arm-none-eabi-gcc does seem to go further, but you’ll also need an arc compiler as shown in my previous Amlogic U-boot build instructions].
Thanks to M][sko for the tip.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress