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:
1 |
sudo apt-get install gcc-aarch64-linux-gnu |
Now extract the tarball and enter the source directory:
1 2 |
tar xvf arm-src-kernel-2015-11-04-9e845bea41.tar.gz cd arm-src-kernel-2015-11-04-9e845bea41 |
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.
1 2 3 |
mkdir -p .git/hooks make ARCH=arm64 meson64_defconfig make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 |
and it ended well:
1 2 3 4 5 6 7 8 9 10 |
Building modules, stage 2. MODPOST 2 modules OBJCOPY arch/arm64/boot/Image OBJCOPY arch/arm64/boot/Image CC drivers/amlogic/usb/dwc_otg/310/dwc_otg.mod.o CC drivers/media/usb/gspca/gspca_main.mod.o GZIP arch/arm64/boot/Image.gz LZO arch/arm64/boot/Image.lzo 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.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
Good news. But I wonder why the amlogic linux community is quite small compared with linux-rockchip and linux-sunxi.
@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.
@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.
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.
@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
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.)
@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.?
This is excellent news, glad to see Linux make its way to the S905.
@Steve
Rockchip RK3288 devices actually have extremely good Linux Kodi video playback.
Just read up what Mac_L1 has accomplished.
http://freaktab.com/forum/tv-player-support/rk3288-devices/534861-mackodi-macspmc-kodi-and-spmc-on-linux-for-rockchip-devices
http://freaktab.com/forum/tv-player-support/rk3288-devices/534814-machybris-for-developers-exposing-rockchip-video-and-graphical-hw-acceleration-in-linux-apps
@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.
@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 😀
@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.
@cnxsoft
@Jens Lucius
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:
https://app.box.com/s/cdp22zttsh058ulan4cnzmu196gxu28u
This makes K1Plus cheap arm64 Linux development box.
@olin
HI
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 benchmarks. As for the wifi driver I haven’t tried it yet because ethernet works well for me.
Hi Olin,
do you see i2s and SPI drivers ?
@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?
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
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… 🙂
@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.
@mdel
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.
@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
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
depends:
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
@Eben
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:
http://forum.lemaker.org/thread-13682-1-1.html
http://www.cubieforums.com/index.php?topic=1973
@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 😀
@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
@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
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
@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
What’s the situation re: M8S mini – has anyone tried running Linux on that yet?
@Shimon
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.
@Paul
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/
@olin
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
@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?
Anyone else getting two driver compiling errors with the latest kernel source?
arm-src-kernel-2016-05-04-bd1ff1c1cd.tar.gz
@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?
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
Make sure CONFIG_IR_MESON is enabled in the kernel, and that module meson-ir is loaded.
@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.
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 booted from sd
root@openwrt:/# mmc_install_from_sd
## docs & how to
+ [files/docs](files/docs)
+ [README.openwrt.vims.md](README.openwrt.vims.md)