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…
Let’s get to the download links:
- Linux 3.14.29 source code
- U-boot 2015.01
- GPU drivers for ARM Mali-450MP
- Broadcom and Realtek Wifi drivers and firmware (November 4, 2015) can be found @ http://openlinux.amlogic.com:8000/download/ARM/wifi/.
- Other kernel modules (November 4, 2015) @ http://openlinux.amlogic.com:8000/download/ARM/modules/.
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:
sudo apt-get install gcc-aarch64-linux-gnu
Now extract the tarball and enter the source directory:
tar xvf arm-src-kernel-2015-11-04-9e845bea41.tar.gz
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.
mkdir -p .git/hooks
make ARCH=arm64 meson64_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8
and it ended well:
Building modules, stage 2.
MODPOST 2 modules
LD [M] drivers/amlogic/usb/dwc_otg/310/dwc_otg.ko
LD [M] drivers/media/usb/gspca/gspca_main.ko
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.
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.
Good news. But I wonder why the amlogic linux community is quite small compared with linux-rockchip and linux-sunxi.
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.
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.
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.
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.
@Jean-Luc Aufranc (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??
Google should know 🙂
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…??)
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.)
@Jean-Luc Aufranc (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… Read more »
This is excellent news, glad to see Linux make its way to the S905.
Rockchip RK3288 devices actually have extremely good Linux Kodi video playback.
Just read up what Mac_L1 has accomplished.
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.
@Jean-Luc Aufranc (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 😀
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.
@Jean-Luc Aufranc (CNXSoft)
Thanks for the insight.
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:
This makes K1Plus cheap arm64 Linux development box.
Can you help us to install ubuntu on s905 .and are u able to install wifi driver as well,please explain thanks
@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… Read more »
do you see i2s and SPI drivers ?
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?
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… Read more »
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… 🙂
@Jean-Luc Aufranc (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… Read more »
The tree should work for all recent Amlogic processor, include Amlogic S805. I’m not sure about the specifics though, and recommend you check the build instructions for ODROID-C1+ @ http://odroid.com/dokuwiki/doku.php?id=en:c1_building_kernel.
You may have to extract the Device Tree for your device yes, otherwise the system may not be configured correctly.
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
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… Read more »
Try to add printk in strategic locations inside hid-dr module.
Otherwise, I can see some people already use hid-dr.ko on some other ARM platforms:
@Jean-Luc Aufranc (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 😀
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
vermagic: 3.14.29 SMP preempt mod_unload aarch64
@Jean-Luc Aufranc (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?
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 @ http://kernelnewbies.org/FAQ/LinuxKernelDebug101
@Jean-Luc Aufranc (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
What’s the situation re: M8S mini – has anyone tried running Linux on that yet?
You can read the post and especially comments @ http://www.cnx-software.com/2015/12/06/how-to-run-headless-linux-on-amlogic-s905-devices-such-as-mini-mx-or-k1-plus/
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 🙂
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.
Check the post, and especially the comments @ http://www.cnx-software.com/2015/12/06/how-to-run-headless-linux-on-amlogic-s905-devices-such-as-mini-mx-or-k1-plus/
Hi olin. Pls help me push ubuntu 14.04 into nand flash in board s905.
my facebook: https://www.facebook.com/tieuvinhlong
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
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?
Anyone else getting two driver compiling errors with the latest kernel source?
Yes, I am also unable the compile the latest kernel source. Also get some errors. Did you have any luck in getting it resolved?
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… Read more »
Make sure CONFIG_IR_MESON is enabled in the kernel, and that module meson-ir is loaded.
@Jean-Luc Aufranc (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… Read more »
I tried it but failed, do you want to share the file that you have created
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
openwrt for Khadas VIMs boards (Amlogic s905 s912 a311D s905d3) https://github.com/hyphop/khadas-openwrt ## Change logs + [README.changes.md](README.changes.md) ## supported Boards + khadas vim1 – OK + khadas vim2 – OK ## Build git clone https://github.com/hyphop/khadas-openwrt.git cd khadas-openwrt # ./scripts/build_prepare ./scripts/build -1 # build openwrt for VIM1 ... ./scripts/build -2 # build openwrt for VIM2 ## Images + github.com/hyphop/khadas-openwrt/releases/ + dl.khadas.com/Firmware/VIM1/OpenWrt + dl.khadas.com/Firmware/VIM2/OpenWrt + dl.khadas.com/Firmware/VIM3/OpenWrt – WIP + dl.khadas.com/Firmware/VIM3L/OpenWrt – WIP ## Installation just write iamge to SD card cd /tmp wget https://github.com/hyphop/khadas-openwrt/releases/download/0.1/VIM1.OPENWRT.sd.img.gz || \ wget https://dl.khadas.com/Firmware/VIM1/OpenWrt/VIM1.OPENWRT.sd.img.gz gzip -dc VIM1.OPENWRT.sd.img.gz | sudo dd bs=1M of=/dev/SD_PATH sync ## install to emmc inside openwrt… Read more »