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.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

50 Replies to “Amlogic S905 Source Code Published – Linux, U-Boot, Mali-450 GPU and Other Drivers”

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

  2. @vickycq
    Not sure why either. Maybe there aren’t many Amlogic boards, and actually I can only think of one: ODROID-C1+, soit could be a chicken and egg problem. No board -> no community -> no board. But I remember allwinner community started mostly with consumer devices that could boot from SD card, so maybe it’s not the reason.

    Beside hardkernel / odroid, there’s also another active Linux community for Amlogic, and it’s the one doing the OpenELEC distribution.

  3. @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.

  4. 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.

  5. 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.

  6. 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…??)

  7. @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.?

  8. @Christian
    For Android, you don’t have the full SDK, and amlogic would have to updated some closed source libraries to use Android 6.0, so I think it’s (near) impossible to make a fully working Android 6.0 out of this. When Amlogic released (an half baked) Android 5.1 SDK for Amlogic S812, companies already spent months and months of development to port it to their hardware platform.

    This release is more interesting if you plan to run Linux on Amlogic S905 devices.

  9. @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/4K@60 Hz support 😀

  10. @Christian
    For Android it depends what Amlogic does. If they release and Android 6.0 SDK, then the device will good support are likely to get a firmware update at some points.

    You should have everything you need to run Linux Desktop easily. I’m not sure everything you need for Kodi (and GPU/VPU support in Linux) is in there, but it’s very likely Kodi Linux will be supported on Amlogic S905 too, at least on specific hardware.

  11. @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:
    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.

  12. @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 ( 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?

  13. 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 ( you can find a few tools and scripts, some are there to prepare you distro ( 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.

  14. @mdel
    arm32 packages should run on ARMv8 processor as they support both 32-bit and 64-bit instruction sets.

    I’m usually using the default compiler in Ubuntu, and if it does not build, I switch to their compiler… 🙂

  15. @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.

  16. @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

  17. 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:
    root@p200_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
    vermagic: 3.14.29 SMP preempt mod_unload aarch64
    root@p200_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

  18. @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 😀

  19. @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:
    root@p200:/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

  20. @Eben
    Add a printk after the variable definition in each function to see if they are called.

    I can also see some debug code, e.g.:
    dev_dbg(&hdev->dev, “DragonRise Inc. HID hardware probe…”);

    There must be a way to enable this, maybe when loading the module. I just don’t know how.

    Maybe a #define DEBUG 1 next to other define at the top of the file.
    You can find more about kernel debugging @

  21. 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 🙂

  22. 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.

  23. 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

  24. @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?

  25. Anyone else getting two driver compiling errors with the latest kernel source?

  26. @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?

  27. 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.


  28. @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.

  29. please help I’m looking for files that are in amlogic open linux but everything is already not working, do you want to share files. Thank you

  30. openwrt for Khadas VIMs boards (Amlogic s905 s912 a311D s905d3)

    ## Change logs

    + [](

    ## supported Boards

    + khadas vim1 – OK
    + khadas vim2 – OK

    ## Build

    git clone
    cd khadas-openwrt
    # ./scripts/build_prepare
    ./scripts/build -1 # build openwrt for VIM1
    ./scripts/build -2 # build openwrt for VIM2

    ## Images

    + – WIP
    + – WIP

    ## Installation

    just write iamge to SD card

    cd /tmp
    wget || \
    gzip -dc | sudo dd bs=1M of=/dev/SD_PATH

    ## install to emmc inside openwrt booted from sd

    root@openwrt:/# mmc_install_from_sd

    ## docs & how to

    + [files/docs](files/docs)
    + [](

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC