Amlogic S905 Source Code Published – Linux, U-Boot, Mali-450 GPU and Other Drivers

Amlogic has an open linux website where they regurlarly release GPL source code, and with Amlogic S905 devices coming to market, they’ve released a few tarballs at the beginning of the month including Linux 3.14 source code, U-boot source code, and Mali-450MP GPU kernel source code (obviously not userspace), as well as some other drivers for WiFi, NAND flash, PMU, TVIN, etc…
Amlogic_S905_Linux_MenuconfigLet’s get to the download links:

I quickly tried to build the Linux source. If you’ve never build a 64-bit ARM kernel or app before, you’ll fist need to install the toolchain. I installed the one provided with Ubuntu 14.04:


Now extract the tarball and enter the source directory:


At first I had a build failure due to a missing directory, so I created it, and use the default config for Amlogic S905/S912 (in arch/arm64/configs), before building the Linux kernel.


and it ended well:


So that’s a good starting for anybody wanting to work on the Android or Linux kernel…

Unrelated to Amlogic S905/Meson64, but I’ve also noticed some OpenWRT packages and rootfs  on Amlogic website that was released a little earlier this year. So either some people are using Amlogic Sxxx processors with OpenWRT, or Amlogic is working on a router chip that I missed. Probably the former.

Thanks to Olin.

47
Leave a Reply

avatar
47 Comment threads
0 Thread replies
2 Followers
 
Most reacted comment
Hottest comment thread
26 Comment authors
PankajmeteorzarosebrannDavid Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
vickycq
Guest
vickycq

Good news. But I wonder why the amlogic linux community is quite small compared with linux-rockchip and linux-sunxi.

Jens Lucius
Guest
Jens Lucius

@vickycq
My guess would be that a lot of community for Allwinner came from Cubieboard/truck or Olimex devices from the time there was only the RaspberryPi 1 and the Allwinner Chips were a lot more powerful. Now the market for little ARM boards is already filled (dominated by RPi2) so there is no need for more.

Steve
Guest
Steve

There is a decent AMLogic Kodi community – as AMLogic SoCs have much better Open Source video driver support than most other SoCs, along with the Raspberry Pi and Pi 2.

Allwinner and Rockchip are pretty much dead in Linux Kodi terms, with iMX6 and Exynos a little better but not as popular.

Teiko
Guest
Teiko

Now they still need to publish the matching userspace code. HAL for Android and lot of integration code.

libamplayer is really ffmpeg, so it’s GPL. Otherwise no way to use the VPU.

They should better make the complete git repo for Android SDK public, so one get a working complete build. Really no big secrets in there. Same patched code soup as Rockchip or Allwinner.

Big modding community > more popular > big sales. Old RK3066 was a big success because SDK leaked early. They don’t realize still.

JotaMG
Guest
JotaMG

@cnxsoft

Hi, it out of topic, but do you, or anyone have / know a list of the current SoC’s that have native Sata interface??
Thanks.

JotaMG
Guest
JotaMG

Well I had already tried that, of course, but did not find the info I want…. if you have a link, you’re welcome!!
Otherwise, your reply seems a little sarcastic… sorry!
(and, I have ask your help because I thought you are an expert in these matters…??)

tkaiser
Guest
tkaiser

JotaMG :
anyone have / know a list of the current SoC’s that have native Sata interface??

If you refer to cheap stuff: http://linux-sunxi.org/Sunxi_devices_as_NAS#SATA_and_GBit_capable_ARM_alternatives (the actual limitations regarding A20 you also find in the linux-sunxi wiki: 45/200 MB/s write/read max.)

Christian
Guest
Christian

@cnxsoft
First, I wanted to say thanks for your great articles, which I just discovered a few weeks ago! You seem to be an insider and expert if it comes to those to those ARM multimedia boxes. Right now I always read that they (mostly all) come with Android. Because this very probably will get no support/updates from the manufacturer after release, do those drivers make it possible to compile your own Android and so install a newer version, e.g. 6.0?

There are Linux distributions besides Android like Ubuntu with X for the Odroid-C1. Do those drivers make it possible to install a “traditional” Linux system with X desktop on the other boxes with Amlogic 905 and have a small and energy efficient PC for web browsing/e-mail/etc.?

miniNodes
Guest

This is excellent news, glad to see Linux make its way to the S905.

Christian
Guest
Christian

@cnxsoft
That means that one can probably not expect Android 6.0 on this generation of chips and wait for the next one?

Regarding “traditional” Linux (as Android is also a Linux version): Are the drivers enough to run X windows or Wayland? Then one could run Kodi via this way. And also run a browser and e-mail program. What I want is a Raspberry Pi like device with H.265 and HDMI 2.0/[email protected] Hz support 😀

vickycq
Guest
vickycq

@cnxsoft
@Jens Lucius
Thanks for the insight.

olin
Guest
olin

Thanks for the info about building the kernel.

I’ve managed to run Ubuntu 14.04 headless arm64 Linux on the K1Plus box that runs off the memory card. I’ve produced a memory card image with some instructions. that you can find here:
https://app.box.com/s/cdp22zttsh058ulan4cnzmu196gxu28u

This makes K1Plus cheap arm64 Linux development box.

trackback

[…] few week ago, I had been informed that Amlogic S905 U-boot and Linux source code was released, and one person use the code and other resources to load a minimal Ubuntu 14.04 image […]

Livetv
Guest
Livetv

@olin
HI
Can you help us to install ubuntu on s905 .and are u able to install wifi driver as well,please explain thanks

olin
Guest
olin

@Livetv
The installation instructions are in my link above, just open the pdf file and read it. Also cnx-software published an article that explains more how to do the installation on another s905 tv box. The article is here:http://www.cnx-software.com/2015/12/06/how-to-run-headless-linux-on-amlogic-s905-devices-such-as-mini-mx-or-k1-plus/
There is a memory card image you can find on the link above which is ubuntu 14.04 distro. So you can install whatever software you want by typing ‘apt-get install …’ once you are logged in. Note, headless means there is no graphics enabled, just text console, but still it can be usefull to compile stuff, run servers or do some benchmarks. As for the wifi driver I haven’t tried it yet because ethernet works well for me.

cdsgames
Guest
cdsgames

Hi Olin,

do you see i2s and SPI drivers ?

Stefan
Guest
Stefan

@olin
I followed the CNX article to run headless Ubuntu on my Tronsmart Vega S95 Telos. But ethernet doesn’t work (even with changed dbt.img).
So i followed your instructions (box.net) to create a new kernel.img. My problem is: I have no rootfs ramdisk. I need it for mkbootimg. Can you help me where to get?

mdel
Guest
mdel

I am right to assume that arm32 packages are not compatible with arm64 cpu, unlike x86_64 is able to run i386 binaries ?
(i don’t have an arm64 box yet, ordered one this week).

Then i have a couple of questions on those amlogic kernel sources :
on their download server root (openlinux.amlogic.com:8000/deploy/) you can find a few tools and scripts, some are there to prepare you distro (deploy_ubuntu_14.04.sh) to build the kernel, but there are also gcc packages.

Is it implied that we should use those specific gcc packages to properly build their kernel ?

For example as i’m building an arm32 kernel for my s805/812 boxes, should i stick to their gcc-linaro-arm-linux-gnueabihf.tar.gz or can i ignore that and use my system’s gcc version as long as it does not fail ?
I do all my builds inside an lxc ubuntu 14.04 container so i can mess around freely.

mdel
Guest
mdel

@cnxsoft
i’m trying to build the latest source arm-src-kernel-2015-12-15-2c44a2727e and i am having some troubles.

I’m building it for my s805 box (arm not arm64) so i was wondering after noticing your title “amlogic s905 source code published”, is it an s905 arm64 only source tree ?

Seeing there is a meson32_defconfig file, i don’t believe that’s the case, but well is there a file list info document somewhere on their repository ?

Using the same command format you use above, my arm build fails with “No rule to make target `dtbs’. Stop.”
There’s one single dts file arch/arm/boot/dts/amlogic/meson8m2_n200_2G.dts, which calls a meson8.dtsi file inside the same directory.

I can build a zImage with the following command (deduced from a archlinuxarm forum post) :
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage meson8m2_n200_2G.dtb -j20

DTC arch/arm/boot/dts/amlogic/meson8m2_n200_2G.dtb

Kernel: arch/arm/boot/zImage is ready

I am able to build the arm64 version without errors.

Any idea why the arm32 build requires some tweaking, and do you have some hints concerning that dtb option ?
Reading your other posts i was expecting to have to deal with dtb extraction from my android firmware (or from an working openelec image i guess) at a later time or at least separately from the kernel build.

gcsuri
Guest
gcsuri

@mdel
I recommend to use ubuntu 14.04 host to compile. I tried some distro before but I got strange compiling errors. Ubuntu’s aarch64 compiled works fine

Eben
Guest
Eben

Hi guys,
Related to this topic. I tried to compile some single modules for my Beelink mx64 to work with a DragonRise-based USB gamepad.
I could compile the two needed .ko files OK but as soon as I try to load the second one (hid-dr.ko), the box hangs and there is NO indication of even loading in dmesg.
Can anyone help me to show how I might diagnose please?
Details of modules below:
[email protected]_2G:/system/lib # modinfo ff-memless.ko
modinfo ff-memless.ko
filename: ff-memless.ko
license: GPL
author: Anssi Hannula
description: Force feedback support for memoryless devices
depends:
vermagic: 3.14.29 SMP preempt mod_unload aarch64
[email protected]_2G:/system/lib # modinfo hid-dr.ko
modinfo hid-dr.ko
filename: hid-dr.ko
license: GPL
alias: hid:b0003g*v00000079p00000011
depends: ff-memless
vermagic: 3.14.29 SMP preempt mod_unload aarch64

Eben
Guest
Eben

@cnxsoft
Thanks for the hints 🙂
I read both those links first yes but as you say they are for different platforms.
Does anyone else have hid-dr.ko compiled by any chance as it might be my own amateur compilation skills to blame 😀

numero53
Guest
numero53

@Eben
I have the same problem with my Beelink Mini MX.
It’ hangs when I try to load hid-sony.ko or rtl2830.ko

This is the linux kernel on Mini Mx:
Linux localhost 3.14.29 #1 SMP PREEMPT Fri Jan 29 12:07:12 CST 2016 aarch64 GNU/Linux

And this is modinfo on hid-sony.ko:
[email protected]:/sdcard/drivers # modinfo hid-sony.ko
filename: hid-sony.ko
license: GPL
alias: hid:b0005g*v0000054Cp000005C4
alias: hid:b0005g*v0000046Dp00000306
alias: hid:b0003g*v0000054Cp00001000
alias: hid:b0003g*v0000054Cp00000374
alias: hid:b0005g*v0000054Cp00000268
alias: hid:b0003g*v0000054Cp00000268
depends: ff-memless
vermagic: 3.14.29 SMP preempt mod_unload aarch64

Eben
Guest
Eben

@cnxsoft
I’m quite an amateur. Could you give me some hints about where to put the printk entries for diagnosis please?
It should be in the .c file only right?
https://github.com/torvalds/linux/blob/master/drivers/hid/hid-dr.c

Eben
Guest
Eben

@cnxsoft
Thanks a lot for the hints. I’ll give it a go. It corrupted my /misc partition once so I had to reflash but it’s for a good cause 😀
Just in case it helps someone below are some files for the mx64/m18:
Device tree: https://goo.gl/bxS05u
Original kernel config extracted from stock: https://goo.gl/4BlUly (pretty close to the default meson config)
Rootfs dump: https://goo.gl/Ckj0MK
build.prop: https://goo.gl/lgBzQL

Shimon
Guest
Shimon

What’s the situation re: M8S mini – has anyone tried running Linux on that yet?

Shimon
Guest
Shimon

Thx, I’ve read all that but I have no experience doing the stuff so I’d prefer to hear some success story before investing in a serial cable and voiding the warranty 🙂

Paul
Guest
Paul

I’m sorry, i am novice on Linux, but can you please make a comlpete instructions how can i convert an Android device (like a Mini m8s) on Ubuntu device? Because of cheapness of this m8s, thank you very much alredy.

tieuvinhlong
Guest
tieuvinhlong

@olin
Hi olin. Pls help me push ubuntu 14.04 into nand flash in board s905.
my facebook: https://www.facebook.com/tieuvinhlong

David
Guest
David

I know this is a long shot… But has anyone built the kernel modules for USB->Serial Converters for the S905 like my Tronsmart Vega S95 Telos which seems to use this kernel? If so, could you post them somewhere or give instructions on how to build them? Thanks

brann
Guest
brann

@David
hi, Do “make menuconfig” in your kernel sources and go to usb section to built in all the usb converters and then with the option and compile the kernel. Do you have the sources from amlogic?

rose
Guest
rose

Anyone else getting two driver compiling errors with the latest kernel source?
arm-src-kernel-2016-05-04-bd1ff1c1cd.tar.gz

meteorza
Guest
meteorza

@rose
Yes, I am also unable the compile the latest kernel source. Also get some errors. Did you have any luck in getting it resolved?

Pankaj
Guest

Guys,
I have MXQ quick play that is running the Mini MX Plus ubuntu image from this thread. I’m using the DTB from my box and almost everything is working quite well.

I am trying to get my TV remote to work with Linux. I’ve installed lirc and tried different options like “Linux input layer” and “Windows Media Center Transceivers/remotes” but none seem to work. I’m watching for events on my UART connection to this board and am getting none – thats how I’m thinking that the remote is not working.

Is anyone able to use their TV remote (or any other remote) on linux ? Please advice how to troubleshoot this.

Thanks,
Pankaj

Pankaj
Guest

@cnxsoft
Thanks CNXSoft. Apologies for the late response, I thought I’d responded to your suggestions, but coming back here today I see I had not.
Yes, CONFIG_IR_MESON was enabled and loaded, it turns out that codes from IR remotes of some devices (like a sharp TV) were not picked up by MXQ, whereas IR events sent by other remotes like a Sony TV, remote of Table fan etc were picked up.
I had assumed that all IR remote codes will be picked up by all IR receivers , whether they act on it or not is a different matter. If that were the case then I would have looked into programming them. But apparently something else is going on here. I’ll have to circle back to this at another time.

These days two other projects have become a higher priority:
– S905 TV box to run Linux with HDMI Support so I can play Videos and display images on it.
– RK3399 TV Box , run linux on it.