Amlogic has just released buildroot with Linux 3.14 with support for Amlogic S905X (p212 board), S905D (p230 board), and S912 (Q200 board) processors, and the company appears to have started working on Linux 4.4 likely for future support for Android 7.0.
You can check the source code as follows:
1 2 3 |
wget -c http://openlinux.amlogic.com:8000/download/ARM/filesystem/arm-buildroot-2016-08-18-5aaca1b35f.tar.gz tar xf arm-buildroot-2016-08-18-5aaca1b35f.tar.gz cd buildroot |
If you have the wrong toolchain the code won’t build (See comments section). So I installed several toolchains provided by Amlogic (all may not be needed) in /opt:
1 2 3 4 5 6 7 8 9 10 |
wget -c http://openlinux.amlogic.com:8000/deploy/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar wget -c http://openlinux.amlogic.com:8000/deploy/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar wget -c http://openlinux.amlogic.com:8000/deploy/gcc-linaro-arm-linux-gnueabihf.tar.gz wget -c http://openlinux.amlogic.com:8000/deploy/arc-4.8-amlogic-20130904-r2.tar.gz wget -c http://openlinux.amlogic.com:8000/deploy/CodeSourcery.tar.gz sudo tar xvf gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar -C /opt sudo tar xvf gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.bz2 -C /opt sudo tar xvf arc-4.8-amlogic-20130904-r2.tar.gz -C /opt sudo tar xvf gcc-linaro-arm-linux-gnueabihf.tar.gz -C /opt sudo tar xvf CodeSourcery.tar.gz -C /opt |
I also downloaded a shell script to add the toolchains to my path:
1 2 |
wget http://openlinux.amlogic.com:8000/deploy/TOOLSENV.sh source TOOLSENV.sh |
Once toolchains are setup, you can select one of three boards config (Q200 / S912 as example) and start building the code:
1 2 3 |
sudo apt install build-essential make mesongxm_q200_release_defconfig make |
If you are interested in S905X or S905D instead, use respectively mesongxl_p212_release_defconfig or mesongxl_p230_release_defconfig.
I built both S912:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
ls -l output/images/ total 1338448 -rw-r--r-- 1 jaufranc jaufranc 20407939 Aug 30 13:44 boot.img lrwxrwxrwx 1 jaufranc jaufranc 54 Aug 30 13:44 dtb.img -> /home/jaufranc/buildroot/output/images/gxm_q200_2g.dtb -rw-r--r-- 1 jaufranc jaufranc 40521 Aug 30 11:34 gxm_q200_2g.dtb -rw-r--r-- 1 jaufranc jaufranc 16973552 Aug 30 11:34 Image -rw-r--r-- 1 jaufranc jaufranc 7002624 Aug 30 13:44 rootfs.cpio -rw-r--r-- 1 jaufranc jaufranc 3391430 Aug 30 13:44 rootfs.cpio.gz -rw-r--r-- 1 jaufranc jaufranc 3391494 Aug 30 13:44 rootfs.cpio.uboot -rw-r--r-- 1 jaufranc jaufranc 1073741824 Aug 30 13:44 rootfs.ext2 lrwxrwxrwx 1 jaufranc jaufranc 11 Aug 30 13:44 rootfs.ext4 -> rootfs.ext2 -rw-r--r-- 1 jaufranc jaufranc 176076800 Aug 30 13:44 rootfs.tar -rw-r--r-- 1 jaufranc jaufranc 67588619 Aug 30 13:45 rootfs.tar.gz -rw-r--r-- 1 jaufranc jaufranc 917504 Aug 30 13:42 u-boot.bin -rw-r--r-- 1 jaufranc jaufranc 918016 Aug 30 13:42 u-boot.bin.sd.bin |
and S905X images successfully:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
ls -l output/images/ total 593932 -rw-r--r-- 1 jaufranc jaufranc 20408642 Aug 30 13:41 boot.img lrwxrwxrwx 1 jaufranc jaufranc 72 Aug 30 13:41 dtb.img -> /home/jaufranc/edev/amlogic/905x/buildroot/output/images/gxl_p212_2g.dtb -rw-r--r-- 1 jaufranc jaufranc 37278 Aug 30 12:08 gxl_p212_2g.dtb -rw-r--r-- 1 jaufranc jaufranc 16973552 Aug 30 12:08 Image -rw-r--r-- 1 jaufranc jaufranc 7002624 Aug 30 13:40 rootfs.cpio -rw-r--r-- 1 jaufranc jaufranc 3391580 Aug 30 13:41 rootfs.cpio.gz -rw-r--r-- 1 jaufranc jaufranc 3391644 Aug 30 13:41 rootfs.cpio.uboot -rw-r--r-- 1 jaufranc jaufranc 1073741824 Aug 30 13:41 rootfs.ext2 lrwxrwxrwx 1 jaufranc jaufranc 11 Aug 30 13:41 rootfs.ext4 -> rootfs.ext2 -rw-r--r-- 1 jaufranc jaufranc 230502400 Aug 30 13:41 rootfs.tar -rw-r--r-- 1 jaufranc jaufranc 90573453 Aug 30 13:41 rootfs.tar.gz -rw-r--r-- 1 jaufranc jaufranc 917504 Aug 30 13:39 u-boot.bin -rw-r--r-- 1 jaufranc jaufranc 918016 Aug 30 13:39 u-boot.bin.sd.bin |
Separately, you can also find buildroot for Linux 4.4, but this is very likely very early work, and should be used together with Amlogic Android 7.0 SDK once it is released.
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
Have they done anything to encourage Android updates for the S802, S805 S812 socs?
It is also a shame they don’t use the 8 core GPU in their S905 line.
They newer learn 🙁
Dumping tarball with the code is NOT THE WAY to do it.
The proper way is working with kernel.org community to upstream all the changes. So what is needed is a series of patches send to linux-kernel@ mailing list that add all missing support.
In few months that 3.X or 4.X code dump will be old, with security holes and basically unusable for serious worketc. Upstreaming changes and maintaining these upstream is the only working way.
When will AMLogic devices fully support the stock Kodi without modifications?
Great! So some S905D linux sat-tv-mini-pc will come true, perhaps with android 7 (N)
@Ron
I use Kodi from the Android store on my miniM8s S905 ( I replaced the installed Kodi my TV box came with )
I just watch online content like Filmon as Kodi buffers video better on my real garbage broadband speed, 1.2 mb is a good day!
So I am curious what are the Kodi problems you refer to?
I do find some content needs MX player and stock media player when playing high end samples.
@Theguyuk
HD audio and auto-switch fps work??? I don’t think.
Without this function kodi is only 40% used.
@Theguyuk
Apart from what Massimo wrote, this also concerns the video decoding.
From what I know, this phenomena plagues most, if not all, Android TV boxes because of what SoC producers like Rockchip, AMLogic, Realtec (and all the rest) do – the way they act. I think that only nVidia is the only outstanding one in this matter.
But there are other people here which could explain this issue much better than me, as my understanding of it is quite limited due to its technicality…
Kodi use mediacodec (omx layer ) ,without it is impossible playback smooth any content.
Without mediacodec support kodi is used at 0%.
Amlogic codec are no more suport from kodi 16.
I thought hardkernel en amlogic where working together to mainline the 905 soc?
@Roel
A lot of effort has been done from crew at http://linux-meson.com/ in bringing Amlogic SoC support to mainline kernel and U-Boot.
Mainline kernel repository:
https://git.kernel.org/cgit/linux/kernel/git/khilman/linux-amlogic.git/
@Roel
here is the exact statement from hardkernel in march : http://forum.odroid.com/viewtopic.php?p=127189#p127189
at that time they considered either going mainline or using a 4.4 fork
since then, we have no information about their plan
some community members asked them in forum here and there but never get any answer, which i guess can be interpreted as no mainline :p
Stane1983’s news is the best yet. Until they get the video stuff worked out, these boxes make terrific headless servers.
@Billionaire Rich Man Trump
I tried booting headless mainline 2 months ago I think, worked just fine Except there were missing some basic drivers (MMC eg).
Ron : When will AMLogic devices fully support the stock Kodi without modifications? Well open source allows Kodi project not be the only one to provide a Kodi version, so you can turn to Libreelec to get Kodi for amlogic devices. In fact their latest LE 8 alpha (Kodi Krypton), offers support for various amlogic chips and a bunch of patches already fix various kodi problems on amlogic in a stable LE 7 (kodi 16), like dynamic framerate or HD audio passthrough (s905 only i believe). So while amlogic still offers a very minimal linux support that definitely won’t help… Read more »
@mdel
I think he was thinking about Android support which is correct. amlcodec as part of Kodi is in source for use in linux solutions.
It is a shame all parties can not find common ground to work together, I would guess more Linux support would grow new markets for Amlogic?
People should talk to Amlogic
http://www.amlogic.com/#Support
okay yeah i never really think about android. Well you can always dual boot, and the good thing with those powerful socs, is that they boot very fast. My s905 nexbox A95x (cold) boots android from the emmc in something like 20 seconds and LE from the sdcard in about 25sec. Also it’s not been mentioned here but will the new Wetek Play 2 s905H bring something new to the table, kodi or linux wise ? Although only Android 5.1 is listed on their specs sheet at the moment, i’ve not browsed their forums to see if a linux OS… Read more »
After multiple attempts, and installed a Linaro toolchain for U-boot: wget -c https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.bz2 sudo tar xvf gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.bz2 -C /opt 12 wget -c https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.bz2sudo tar xvf gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.bz2 -C /opt It failed to build with the errors: fatal: Not a git repository (or any parent up to mount point /media/hdd) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). 12 fatal: Not a git repository (or any parent up to mount point /media/hdd)Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). and further below In file included from suspend.c:6:0: ./scp_remote.c: In function 'resume_remote_register': ./scp_remote.c:196:6: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable] int tmp = 0;… Read more »
@Jean-Luc Aufranc (CNXSoft)
Which U-Boot you tried to compile and which defconfig?
@Stane1983
The one in arm-buildroot-2016-08-18-5aaca1b35f.tar.gz using mesongxm_q200_release_defconfig.
Inside output/build/uboot-custom/Makefile it shows:
@Jean-Luc Aufranc (CNXSoft)
That is gxm_q200_v1_defconfig uboot defconfig. Try to build only that. If not working, use toolchains from http://openlinux.amlogic.com:8000/deploy/ (you also need arc-4.8 to build uboot).
Here is my result:
Creating “../fip/gxl/fip.bin”
Firmware Image Package ToC:
—————————
– SCP Firmware BL3-0: offset=0x4000, size=0xD400
– EL3 Runtime Firmware BL3-1: offset=0x14000, size=0x140D0
– Non-Trusted Firmware BL3-3: offset=0x2C000, size=0xA72E8
—————————
ACS tool process done.
11840+0 records in
11840+0 records out
11840 bytes (12 kB, 12 KiB) copied, 0.0128791 s, 919 kB/s
5825+0 records in
5825+0 records out
5825 bytes (5.8 kB, 5.7 KiB) copied, 0.00590936 s, 986 kB/s
../fip/gxl/u-boot.bin build done!
@Stane1983
Toolchain issue. Removing gcc-arm-none-eabi fixed the issue:
It failed in that BL3x thing that messes up with CPU freqs by the way… Evil thing that is 😉
SSP support not available in this toolchain, please disable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
package/pkg-generic.mk:185: recipe for target ‘/home/ub/alinux/buildroot/output/build/toolchain-external-undefined/.stamp_configured’ failed
make[1]: *** [/home/ub/alinux/buildroot/output/build/toolchain-external-undefined/.stamp_configured] Error 1
Makefile:36: recipe for target ‘_all’ failed
Hi~
I’ve got this error after make
Do you have any advice?
Thanks for these instructions, I followed them and succesfuly built kernel, rootfs and u-boot. However I can’t find instructions to burn the resulting files to a working SD card. Amlogic instructions on their pdf seem to be wrong or incomplete. I have a S912 device. I’ve looked at what libreelec and armbian do and this is what I did: * Enable SD boot with balbes method form armbian * create a bootable SD from libreelec for s905 * Kernel: create a fat partition and copy boot.img from buildroot renamed as kernel.img * DTB copy gxl_p230_2g.dtb from buildroot to fat partition… Read more »
Any news about those topic ? I just bought my h96 pro+ and I am willing to transform it into a headless server.
@gnthibault
If you’re going to use your TV box as a headless server, better use Linux mainline than Amlogic release: http://www.cnx-software.com/2017/03/06/mainline-linux-on-64-bit-arm-amlogic-socs-and-tv-boxes-such-as-wetek-hub-player-2-nexbox-a1-a95x-etc/