XBMC for Linux on AllWinner A10 Devices? It Works! (Sort of)

Following the lack of support by AllWinner for the video engine libraries (CedarX), I had more or less given up on hope XBMC for Linux would ever run properly on AllWinner A10/A13 hardware. But recently, I found out some progress had been made using existing libs, and saw the Pengpod Tablet video showing XBMC running in Linux fairly smoothly.

So I decided to cross-compile XBMC by following the instructions available at http://linux-sunxi.org/XBMC and trying to run it in Linaro ALIP 12.04 rootfs in my Mele A1000. Finally, I managed to cross-compile XBMC, but the performance was very poor in the GUI (6 to 12 fps) and I was unable to play videos and my serial console was flooded with messages like:


[Update: I managed to have XBMC Linux running & playing videos on Mele A1000 by using j1nx image (rootfs + kernel). I would first exhibit the exact same issue I had, but those where fixed:

1. To solve the video playback issue I had to modify script.bin as follows:

fb0_pixel_sequence = 1
fb0_scaler_mode_enable = 0

2. I add to modify XRES/YRES (1024×768) in S99xbmcinit in order to start the UI when outputting to VGA with this image or EGL would failed to initialize.

XBMC (alpha) is currently optimized for 720p (1280×720) resolution, so although I get up to 12 fps using VGA output with 1024×768 resolution, the UI is rendered at over 40 fps when the Mele outputs to HDMI @ 720p.

Source: http://www.j1nx.nl/buildroot-xbmc-on-mele-a1000-allwinner-a10/#comment-1244]

But Jasbir managed to get XBMC armhf running the the Hackberry using an Ubuntu 12.10 armhf image by “Guillaume” and natively compiling XBMC in the Hackberry board. Alternatively, if you’ve got an armel rootfs, you could try xbmca10.deb by Neal Peacock (the person behing the Pengpod Linux tablets).

In this post, I’ll still describe the steps I followed to build and run XBMC in Linaro ALIP rootfs (and hopefully I’ll eventually find the reason behind the performance issue),  ans show Jasbir results with XBMC armhf on the Hackberry.

XBMC ARMHF Build Instructions

Since we want to run XBMC armhf, we’ll first need a Linux image with an armhf rootfs. I’ll use Lianro ALIP 12.10 rootfs, following the hardware packs instructions. Insert an SD card in the build machine, and make it bootable:

wget https://raw.github.com/cnxsoft/a10-tools/master/a1x-media-create.sh
wget http://dl.linux-sunxi.org/nightly/2012.11.06/mele-a1000-vga_hwpack_2012.11.06.7z
wget http://releases.linaro.org/12.10/ubuntu/precise-images/alip/linaro-precise-alip-20121021-453.tar.gz
sudo ./a1x-media-create.sh /dev/sdb mele-a1000-vga_hwpack_2012.11.06.7z linaro-precise-alip-20121021-453.tar.gz

Now remove the SD card from the build machine, and insert it in the Mele A100 (or another A10 device) to install dependencies to build XBMC:

sudo apt-get build-dep xbmc
sudo apt-get install swig default-jre cmake libgtk2.0-bin libssh-dev
sudo apt-get remove libegl1-mesa libegl1-mesa-dev libegl1-mesa-drivers libgles2-mesa libgles2-mesa-dev
sync

Now back to the build machine. Checkout XBMC source code:


and extract the image from the SD card and mount the rootfs:


Create symlinks to the mounted libraries (requires full path):

sudo ln -s /home/jaufranc/edev/mele_a1000/xbmc-linux/rootfs/lib/arm-linux-gnueabihf /lib/arm-linux-gnueabihf
sudo ln -s /home/jaufranc/edev/mele_a1000/xbmc-linux/rootfs/usr/lib/arm-linux-gnueabihf /usr/lib/arm-linux-gnueabihf
sudo ln -s /home/jaufranc/edev/mele_a1000/xbmc-linux/rootfs/usr/include/arm-linux-gnueabihf /usr/include/arm-linux-gnueabihf

Enable hard-float in in xbmca10/tools/a10/depends/depends.mk:


and Update the following keys around line 50 in the same file:


Install some tools required to build XBMC, and create a symlink for the ARM g++ compiler:

sudo apt-get install cmake shtool swig autoconf autotools-dev automake libtool default-jre gawk gperf zip g++-arm-linux-gnueabihf autopoint
sudo ln -s /usr/bin/arm-linux-gnueabihf-g++-4.6 /usr/bin/arm-linux-gnueabihf-g++

Create the tarballs directory in the user’s root directory as well as XBMC install directory:


Replace [user] with your username.

You can now cross-compile XBMC for ARM:


This will take a little while, and once the build completes, copy XBMC binaries to your SD card:


All good! Time to give XBMC a try. Insert the SD card in your A10 device, change some permissions, and run XBMC:


After a few seconds, you should now be able to access XBMC user interface. In case you have issues, you can have a look at the log in ~/.xbmc/temp/xbmc.log.

XBMC A10 ARMHF Build on the HackBerry

First of all, this is a development version, so you should not expect a perfect user experience. There should be bugs, crashes, missing features and performance might not be optimal yet.

If you want to have a quick look, watch Jasbir video of XBMC armhf on the HackBerry board.

I did try to use Jasbir image on the Mele A1000 (After updating U-Boot and U-Boot SPL) to evaluate the current status of XBMC on A10, but I could only see XBMC boot logo before the system reboot, as XBMC actually terminates, after apparently thinking I pressed some key….

At the current stage of development, XBMC for Linux appears to work pretty well on AllWinner A10 devices, but there is still more work to do before users can enjoy it on their devices.

If you want to give it a try on your hardware, check out Hackberry A10 – XBMC blog post.

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.
9 Comments
oldest
newest
Martin Revert
Martin Revert
11 years ago

UI performance is not so far from my Raspberry PI, so it seems very usable. I’m crossing fingers on this!. A big goal would be to have support for most common external wifi usb adapters, specially for A10 hdmi sticks with bad internal wifi implementations (as far as I know that will be all).

zoobab
11 years ago

“wget http://dl.linux-sunxi.org/nightly/latest/mele-a1000-vga_hwpack_2012.11.06.7z

$ wget http://dl.linux-sunxi.org/nightly/latest/mele-a1000-vga_hwpack_2012.11.06.7z
–2012-11-12 19:38:10– http://dl.linux-sunxi.org/nightly/latest/mele-a1000-vga_hwpack_2012.11.06.7z
Resolving dl.linux-sunxi.org… 88.198.34.130, 2a01:4f8:a0:3161::2
Connecting to dl.linux-sunxi.org|88.198.34.130|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2012-11-12 19:38:10 ERROR 404: Not Found.

zoobab
11 years ago

Also the a1x-media-create.sh script should exit if it does not find 7z (my case).

Add a set -e for example.

I also forked your tool to add some banner seperations in the build log:

https://github.com/zoobab/a10-tools

And console redirection to a log file is better done with tee:

now=”date +%Y%m%d-%H%M%S
logfile=”logs/a1x-media-create_$now.log”
exec 2>&1> >(tee -a $logfile)

j1nx
11 years ago


As the GUI is drawn directly onto the framebuffer, you might want to have a look at this file;
https://github.com/huceke/xbmc/blob/8fc6371afffc1b299da975aabd0a3cd4b5b76535/xbmc/windowing/egl/EGLNativeTypeGeneric.cpp

Have not changed the hardcoded values, but you might want to give it a go and compile it for a test run.

Khadas VIM4 SBC