AMLogic Releases AML8726-MX Linux 3.0.8 Source Code

While doing a Google search to locate the open Linux page of AMLogic, I noticed another link reading “Amlogic AML8726-MX Linux kernel code released“. Interesting. So AMLogic appears to have released the kernel source code for their latest dual core Cortex A9 processor at the beginning of August and the tarball is available from their open source site:  kernel-common-2012-08-03-git-a63244fb9c.tar.gz.

A github user (fards) also imported the code to github, but he’s not affiliated with AMLogic, so don’t expect commits from AMLogic there. Let’s retrieve it:


AML8726-MX is codenamed MESON6 in the source code, and the code is in arch/arm/mach-meson6/, but let’s see if we can find a config file in arch/arm/configs. Yes! There are 4:

  • meson6_android_defconfig – Android config file (Single core)
  • meson6_defconfig – Linux config file (Single core) all Android config disabled.
  • meson6smp_android_defconfig – Android config file with smp (symmetric multiprocessing) support
  • meson6smp_defconfig – Config file with smp (symmetric multiprocessing) support, Android stuffs enabled, but no touchscreen support…

The descriptions are my guesses based on the file names and a quick look and the configs.

Since ARM8726-MX is a dual core processor, and it’s no fun using the single core version, let’s try  meson6smp_defconfig:


The warnings mean we won’t have access to some board config and drivers specific to AMLogic’s customer board, but we should still be able to build the kernel with one of AMLogic reference platforms.

There are 2 Meson6 boards available in menuconfig:

  • Meson6 socket board
  • Meson6 reference board

I have no idea what those are, so let’s carry on with the default setting (Meson6 socket board).

I first tried to build with Linaro toolchain, but this failed with :

arch/arm/mach-meson6/hotplug.c:18:20: error: inlining failed in call to always_inline âmeson_set_cpu_ctrl_regâ: function body not available

which appears to be a bug in gcc-4.7. So I’ve used the toolchain provided on openlinux.amlogic.com (Code Sourcery G++) instead:

make ARCH=arm CROSS_COMPILE=~/amlogic/arm-2010q1/bin/arm-none-linux-gnueabi- -j 12 uImage
...
UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-3.0.8-g42697c8
Created:      Sat Aug 18 18:14:00 2012
Image Type:   ARM Linux Kernel Image (lzma compressed)
Data Size:    2943441 Bytes = 2874.45 kB = 2.81 MB
Load Address: 80008000
Entry Point:  80008000
Image arch/arm/boot/uImage is ready

Great, the kernel builds fine. Let’s complete this by building and installing the modules:

make ARCH=arm CROSS_COMPILE=~/amlogic/arm-2010q1/bin/arm-none-linux-gnueabi- -j12 INSTALL_MOD_PATH=build_modules modules
make ARCH=arm CROSS_COMPILE=~/amlogic/arm-2010q1/bin/arm-none-linux-gnueabi- -j12 INSTALL_MOD_PATH=build_modules modules_install

Those last steps will build the Mali drivers (ump.ko and mali.ko), and “install” all modules in build_modules directory.

For AMLogic AM8726-MX set-top boxes such as Geniatech ATV1200 (See video), this code might be enough, but fads mentioned in a comment that lcd/ips code is missing and it might be more difficult to use this code on tablets such as Ainol Novo 7 Aurora II. He also started a developers thread in slatedroid.com, join the discussion if you are a developer interested in this project.

Share this:

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

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
38 Comments
oldest
newest
max
max
11 years ago

so that means soon or later we can expect a Linux distro for ainol elf2 which is a DualCore Amlogic8726-MX tablet saw somewhere selling at $99.
LCD issue means display will work without touch or it wont show anything? I mean if display doesn’t give touch response, it’ll still remain usable with keyboard mouse.

max
max
11 years ago

oky, Also an entirely different tangent but still somewhat relevant.
Technically which SOC based tablet should give you a better performance especially for ‘web browsing and for longer battery life’.

DualCore RK3066 based or DualCore Amlogic8726-MX6 based, given both got rest of the parameters same i.e 1gb ram /1024×600 /3700mAh etc.

LuckyKnight
LuckyKnight
11 years ago

Where are the AML8726-MX based boxes? I want one for XBMC

Dan
Dan
11 years ago

@LuckyKnight They are starting to appear on the Chinese OEM sites, but it’s better to wait for Pivos to release such a box for a number of reasons 1) Your supporting Pivos and XBMC team by buying their box. 2) Pivos will be building a linux/XBMC firmware for the box like they do for their 8726-M1 box. 3) Actual technical support. 4) You know what you will be getting, buying a box right now from the OEM’s may be a risk even if it has the same chipset unforeseen issues may pop up and you could get a bum deal… Read more »

io
io
11 years ago

can you please compile the module uinput.ko for the AML8726-MX Linux 3.0.8.

many devices have this kernel and with this module we can use also DroidMote

I-Kev
I-Kev
11 years ago

hi
What do you think is the best box now to play with xbmc?

the odroid-x or a amlogic board?

mfg

fards
11 years ago

Hey guys,

as noted the source that amlogic released is missing configs and drivers.
its also designed to be built with a very old q2010 toolchain.

its actually fairly close to the code for the ainol fire, there’s quite a lot of changes to the ainol elf-ii code.

I was busy messing with the elf-ii code (it runs on gcc4.6 at least now and some of the earlier linaro 4.7 toolchains)

that’s available here;

https://github.com/fards/ainol_elfii_common

and the fire code (needs updating when ainol finally decide to release patches for a bad touchscreen f/w bug)

is here:
https://github.com/fards/Ainol_fire_kernel

hope this helps

fards
11 years ago

should also point out that the elf-ii code ootb uses an older Mali code sdk 10? the fire and main amlogic code uses sdk14, so I patched that one in to the elf.

I’m keen on getting the arm r3po/r3p1 mali code working.

my gits are messy, as I use them as a transfer for experiments between different build machines btw.. you have been warned 😀

misko
11 years ago

@fards
do you have access to mali source codes?
can you build old 2.6 kernel + mali drivers with hardfp plz 🙂

daniel
10 years ago

https://github.com/nspierbundel/amlogic-common/tree/3.0.50-armhf

for those who want to contribute developping on the 3.0.x kernels for amlogic m6

Daniel

rafa
rafa
10 years ago

I have tried to compile the module joydev to have joystick support in my geniatech atv1200. I followed the instructions in the article, and I have generated the compiled module: joydev.ko. But when I’ve put in the geniatech atv1200, to execute the instruction to load the module (as root): insmod/system/lib/modules/joydev.ko I always get the same error: exec format error well, I check with the modinfo command the module has the same version of the kernel that my atv1200, but still fails also. any suggestions? or maybe just the device does not support this module? Besides, I run the command dmesg,… Read more »

rafa
rafa
10 years ago

Thanks for responding so quickly.
I had seen that article too.
I’ll check back and try again, because I was using a different compiler.

rafa
rafa
10 years ago

after all the tests, I have not been able to create a module that is loaded correctly in the Mygica / Geniatech atv1200. this is what I did: kernel source code from http://www.cnx-software.com/2012/08/18/amlogic-releases-aml8726-mx-linux-3-0-8-source-code/ : git clone git://github.com/fards/AMlogic_Meson6_030812release.git possible configurations for atv1200 (I’ve tested with the latest): meson6_android_defconfig – Android config file (Single core) meson6_defconfig – Linux config file (Single core) Android all config disabled. meson6smp_android_defconfig – Android config File with smp (symmetric multiprocessing) support meson6smp_defconfig – Config File with smp (symmetric multiprocessing) support, enabled Android stuffs, but no touchscreen support … To create the module I am following this tutorial:… Read more »

rafa
rafa
10 years ago

yes, same error 🙁

When I run the modinfo instruction only see this small difference:

.ko
3.0.8-g2847a5e SMP preempt mod_unload ARMv7

.ko
3.0.8-g2847a5e SMP preempt mod_unload modversions ARMv7

rafa
rafa
10 years ago

I meant this:
rafa :
yes, same error
When I run the modinfo instruction only see this small difference:
my_mod.ko
3.0.8-g2847a5e SMP preempt mod_unload ARMv7
one_mod_mygica.ko
3.0.8-g2847a5e SMP preempt mod_unload modversions ARMv7

Marius
10 years ago

@rafa

Rafa just read this:
http://www.skynet.ie/~mark/home/kernel/symbols.html

It seems you just have to disable modversions for your kernel and it should work. There shouldn’t be any difference at all between the 2.

rafa
rafa
10 years ago

I have managed to compile the module, now with the right modinfo: 3.0.8-g2847a5e SMP preempt mod_unload modversions ARMv7 but when I tried to load the móludo gave me the following error: “disagrees about version of symbol module_layout” then I read that could make a small modification of the file in hexadecimal: http://stackoverflow.com/questions/2720177/module-layout-version-incompatibility but after changing it, and try it, now I get the following error: [31526.067817@1] hid_sony: disagrees about version of symbol hid_unregister_driver [31526.069610@1] hid_sony: Unknown symbol hid_unregister_driver (err -22) [31526.076325@1] hid_sony: disagrees about version of symbol __hid_register_driver [31526.076337@1] hid_sony: Unknown symbol __hid_register_driver (err -22) [31526.076356@1] hid_sony: disagrees about version… Read more »

Fma965
10 years ago

Hello, I am able to build a zImage but i can’t work out how to compile that to a boot.img for flashing via CWM can you please help me. I tried unmkbootimg and splitboot neither will extract existing boot.img so im not sure what to do now.

Fma965
10 years ago

@rafa

Here is my module.

Here is hid-sony.ko for “3.0.8-g525c782”
https://www.dropbox.com/s/pgpf4un1nbzrmol/hid-sony.ko

latest kernel version from latest update for geniatech atv1200

Fma965
10 years ago

@Fma965

Why no edit button? Also uh i know im decompiling it correctly as i can decompile my xperia play kernel i just can’t decompile the boot.img for my crossflashed sumvision cyclone x2 to geniatech atv1200

niabi
niabi
10 years ago

Hopefully you guys can help me out, I’ve been trying for a few days to compile my own module for Geniatech ATV120 (same kernel as ATV1200), and its driving me CRAZY! I’ve gotten as far as compile the modules and first I got Exec Error, but after making the changes to get the exact kernel version I now get “disagrees about version of symbol module_layout” so I wanted to know how the hid-sony.ko made by fma965 since it works perfectly on my atv120, but fma965 has replied that he forgot how he did it and lost all files related to… Read more »

Khadas VIM4 SBC