Thursday, February 21, 2013

Ubuntu and XBMC on the MELE

Been trying to set up the MELE as a media/home server and found guillaume's blog (http://guillaumeplayground.net)

Get the ubuntu 12.10 armhf image with the patched 3.0.4.2+ kernel from here  (MD5: 32e181589ac4232fdaac3e9f86546e87)

Decompress the image and dd it to your SD card.
Put it in the MELE, connect VGA/Ethernet and turn it on.
Default user/password is: root/root

To modify the video output, led flashing and MAC address, run PIMP_MY_MELE as root.
It's a perl script located on /usr/local/pimpmymele/

Sata module is not loaded by default.
To load it until reboot, run
modprobe sw_ahci_platform
or load it on boot with
echo "sw_ahci_platform" >> /etc/modules; reboot
Check your MELE speed
# grep BogoMIPS /proc/cpuinfo
BogoMIPS : 1001.88

If not:
rm -f /etc/rc2.d/*ondemand
echo "cpufreq-set -g performance" >> /etc/rc.local
cpufreq-set -g performance


Overclocking
This is dangerous. You've been warned. This will set your frequency at 1.15GHz and it will be off when you reboot (stress test to see if your MELE is stable; glxgears is useful)
echo '1152000' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
If you want to make this permanent run
echo "echo '1152000' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" >> /etc/rc.local

Available frequencies are at /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequenciesConsider that you'll need overvoltage to pass 1.2GHz, and if you plug in an external HDD / sata HDD, the current might not be enough for the processor

This got me from 35.785 to 39.447 fps on GLXGears (~10% performance increase with a 15% OC)


XBMC
Download the files (compiled from 
git://github.com/empatzero/xbmca10) and decompress them to / (yes, to root)

You can run these from X
/allwinner/xbmc-pvr-binhf/bin/xbmc
/allwinner/xbmc-pvr-binhf/bin/xbmc-standalone
or this from a TTY
/allwinner/xbmc-pvr-binhf/lib/xbmc/xbmc.bin

Considering it runs on framebuffer, if you run it from SSH you'll see the cursor where it was; if you run it locally the cursor will go to the last row and it'll be unnoticeable

Before setting up XBMC on boot you should test audio and video; as well as automounting if you plan on using external disks or pendrives.


If you have dependecy problems launching xbmc 
Run 
apt-get install xbmc
You won't run the repo version, but some libraries/dependencies are not in the tar

1 comment:

  1. hello,

    I've tried to run xbmc by your instructions:
    /allwinner/xbmc-pvr-binhf/lib/xbmc/xbmc.bin
    ERROR: Unable to create GUI. Exiting
    Segmentation fault

    Strace shows:
    open("/dev/ump", O_RDWR) = 14
    ioctl(14, 0x800c9001, 0xbed4e144) = 0
    open("/dev/mali", O_RDWR) = 15
    fstat64(15, {st_mode=S_IFCHR|0600, st_rdev=makedev(244, 0), ...}) = 0
    ioctl(15, 0xc0048205, 0xbed4e14c) = 0
    close(15) = 0
    gettimeofday({1362691444, 976339}, NULL) = 0
    write(7, "22:24:04 T:1098641408 ERROR: E"..., 62) = 62
    gettimeofday({1362691444, 976684}, NULL) = 0
    write(7, "22:24:04 T:1098641408 ERROR: I"..., 74) = 74
    gettimeofday({1362691444, 976945}, NULL) = 0
    write(7, "22:24:04 T:1098641408 FATAL: C"..., 85) = 85
    write(2, "ERROR: Unable to create GUI. Exi"..., 37) = 37
    clock_gettime(CLOCK_MONOTONIC, {1703, 516124363}) = 0
    clock_gettime(CLOCK_REALTIME, {1362691444, 977966586}) = 0
    clock_gettime(CLOCK_REALTIME, {1362691444, 979816267}) = 0
    futex(0x1fd0bcc, FUTEX_WAIT_PRIVATE, 1, {4294967, 293150319}) = 0
    futex(0x1fd0c00, FUTEX_WAKE_PRIVATE, 1) = 0
    close(11) = 0
    futex(0x1fd0ca0, FUTEX_WAIT_PRIVATE, 2, NULL) = 0
    futex(0x1fd0ca0, FUTEX_WAKE_PRIVATE, 1) = 0
    +++ killed by SIGSEGV +++

    I dont know that I do wrong. Can you provide your working sdcard image, please?

    One more question, is hardware acceleration works?

    ReplyDelete