Mele: Ubuntu 12.10 armhf img – kernel upd – xbmc

Fully running version of ubuntu 12.10 armhf, kernel 3.0.42++ (latest mali from sunxi), sata and XBMC.

PmM included to process nand install.

To proceed:

  1. Download the file: ubuntu_12.10_armhf_v2_mele_xbmc.img.gz (MD5: 04eded50e8fee6e760863e8381acf20b)
  2. Unzip the file.
    Linux: gunzip ubuntu_12.10_armhf_v2_mele_xbmc.img.gz
  3. DD it to your MMC. You will need a mmc >= 2Go (xbmc is big).
    • From linux (put your SDCard and type ‘dmesg’, you will see something about mmcblk0 or sdX appear at the end of dmesg print. Use the device you see to replace <MMC_DEVICE>)
      dd if=<path_to_ubuntu_12.10_armhf_v2_mele_xbmc.img> of=/dev/<MMC_DEVICE> bs=1M
    • From windows, you can use any “dd” for windows or choose one of these:
  4. If you want to use SSH, plug an RJ45 ethernet cable in the Mele (connected to a network with DHCP)
  5. Put the MMC in the slot… cross fingers and power the mele
  6. After 15 seconds, you should see a fast led flash Red/Blue. It means the mele has boot properly. If you have no VGA but RJ45 cable, you will see the mele on your network (ping scan via nmap or watch on your router/dhcp server for the mele). The default mac is 000A.2000.1010
  7. You can use a VGA screen or SSH to it. User: root, Password: root

Video and Other
By default, it’s booting in HDMI mode.
If you want VGA, just ‘ssh root@<IP>’, Password: root, and launch PIMP_MY_MELE to configure the video output.

Pimp my Mele (screenshot and details).
Log as root and type PIMP_MY_MELE

As root, add some programs for X:
apt-get install xterm ...

You can launch Xorg with ‘startx’ or add ‘gdm’ or ‘slim’ or anything.

Highly recommanded:

# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

# passwd

# passwd user
# deluser user

# echo “<MY_HOSTNAME>” > /etc/hostname

And more:

  • edit /etc/ssh/sshd_config
    Change: UsePAM no
    Change: PasswordAuthentication no (and use authorized_keys to connect)
    Change: PermitRootLogin no (and create your own user with password or authorized_keys)
  • Firewall the mele with iptables.
  • etc…

For wifi:
To scan AP around:
ifconfig wlan0 up
iwlist wlan0 scan

For sata:
modprobe sw_ahci_platform
Run this for permanent sata:
echo "sw_ahci_platform" >> /etc/modules


Run xbmc in standalone mode (seems better to me) but works also under xorg.

In console mode – log as root:

# /allwinner/xbmc-pvr-binhf/lib/xbmc/xbmc.bin

The first launch is quite slow on MMC. Be patient.

174 thoughts on “Mele: Ubuntu 12.10 armhf img – kernel upd – xbmc

    • Odd.
      The kernel is pushing Mali at its maximum speed.
      Perhaps it’s the reason. This can be lower in the script.bin (first partition on the mmc)
      I have no 1.3 to test here.
      You can try to comment the gfx stuff in /etc/modules and modprobe each line in the same order via ssh.

  • i tried day at work, and right now from home, seems better with :81.
    anyone else experiencing the same issue?
    thanks guillame

      • i got it with wget now, sorry for the n00b question, but what’s the best way to install a login manager+a desktopenvironment such as lxde?
        i was wondering just a apt-get gdm lxde?

        • Yes 🙂 apt-get install

          ‘slim’ is a nice and light login manager, aka lxde or fluxbox.

          apt-get install slim lxde

  • ahhaha yes i just forgot to write ‘install’ down.
    thanks for your great job mate.
    i tried it yesterday night, eth woroked perfectly on sdcard, but not when i install that on nand.
    another thing is that boot time with nand is pretty long, around 3minutes.

    • Hi,

      I think your interface switched to eth1 due to mac address change and udev interface renaming.

      Try this on your nand:

      rm -Rf /etc/udev/rules.d/70-persistent-net.rules

  • Well, i just can’t boot using this image.
    When i take it off the device, it’s booting to NAND (actually a ubuntu 12.10 armhf you previously release).
    Maybe same problem as Nick, but i don’t know the version of my A2000.

    • Sorry i could not test on my side for other mele.

      Try to copy on the MMC the kernel linux-armhf-gfx-3.0.42-4:

      Mount the mmc partition 1 and partition 2.
      untar the kernel package.
      cp -a kernel/p1/uImage /mmcp1/
      cp -a kernel/p2/* /mmcp2/

      sync && umount both.

      If it’s still not working, try to revert mali_clkdiv to 4.
      All is scripted in kernel/Makefile.

      And let me know 😉

  • It’s not working either with the older kernel.
    Regarding “try to revert to mali_clkdiv=4” : i have tryied to launch a “make install” command after modifying Makefile file, but i got error 127

    • Edit your script.bin like this:

      # mount /dev/mmcblk0p1 /mnt
      # /usr/local/sunxi-tools/bin2fex /mnt/script.bin /mnt/script.orig.fex
      # cp /mnt/script.orig.fex /mnt/script.test.fex

      # vim /mnt/script.test.fex
      << edit # /usr/local/sunxi-tools/fex2bin /mnt/script.test.fex /mnt/script.bin # sync # umount /mnt # reboot

      • thx!
        the problem is i don’t have bin2flex binaries on my VM.
        Will have to get it, and it will do the trick (i think i can also directly run commands listed in the install section of the makefile).

  • Noob question. To get up and running on an A2000G would I first install this image and then the 1GB linux-armhf-gfx-1G-3.0.42-6.tar.gz kernel?

    I would like nand install + SATA + ethernet

    Any suggestions are welcome 🙂

    • Yes, this is the right process to get 1G running with nand install with the vanolla uboot.

      You take the image, put it on your sdcard, boot, use PmM to install on nand, reboot without sdcard, update the kernel, this is it.

      • Thanks for the reply… nand install works fine, but I get stuck after installing the new kernel. The box will not start properly. I see some strange white lines on my tv and I can not connect via ssh. I do:

        # cd
        # make nand
        # sync
        # reboot

        Im not sure what you mean by vanilla uboot? Maybe I miss something here.

  • Is XBMC working with libcedar now? What happened? I was about to turn my mele (which was originally intented to be for XBMC) into a server..

  • I followed Guillaume’s procedure and the led did not flash at all 🙁
    Is there a version issue on the Mele A2000 ?

  • Oops my Bad! I didn’t read ALL the comments!
    It’s a matter of clock thing on v1.3. That’s why it doesn’t start.

      • Not sure it’s a clock problem around PLL6 stuff.
        Previous versions were working properly.

        I have upgrade the mali driver to stick to the sunxi tree and get xbmc + sata working. That’s all.

        You can try to comment the gfx stuff in /etc/modules and try to boot.
        If it’s booting – it’s not the PLL6.
        modprobe each line in the same order via ssh.

        The way of the ninja.

  • Nope, not yet.
    As I’m a bit lazy: 1) I will try linux-armhf-gfx-3.0.42-6.tar.gz from UPDATE 5 – Apr 4 2013 (see what Guillaume has lay down before) and try to find a XBMC stand-alone.
    2) as far as what I read from here to here there’s an option that guillaume tried thanks to Tom Cubie’s input:

    hi, can you do a modification of u-boot when booting from sd card with the u-boot
    and kernel you compiled?

    #define PLL1_FACTOR_N 21
    #define PLL1_FACTOR_N 16

    • Yes but the stock uboot (the original one on nanda) is not affected by this ~bug~.
      And the uboot provided in my image is already patched.

      It was the key 6 months ago to be able to boot my v1.3 when i built my mele cluster (still running 😉

      This clock problem in the uboot made the kernel stack explode and it’s not the problem in the log Nick sent in comment.
      The stack seems fine and the boot process is freezing.

      It feels like a module loading problem or a poor sdcard.

  • Thanks a lot for your help Guillaume 🙂

    So you confirm I should be able to load ubuntu_12.10_armhf_v2_mele_xbmc.img into my V1.3 Mele A2000.

    I’ll give it another try 🙂 Maybe the contacts on SD cards are looose….
    SD card, on my trial, was a 4 GB Sandisk SD card.

    I noticed there’s two partitions on the SD card, on for the boot and one for the OS & XBMC.

    • So the kernel is not loading at all now.
      Is the first ubuntu (without xbmc) or debian image booting properly ?

  • I have the same issue. Unable to boot completely into shell.
    I did what guillaume suggested earlier. Commented out mali and mali_drm in /etc/modules and was finally about to boot. However when I tried to modprobe mali, it crashed and thats as far as I got.
    My Mele A2000 was able to get to the desktop with previous images.

  • Turns out that the SD card was defective. After loading the image on another card, it finally booted but only after commenting out the mali module.

  • Ok, I have done all here now and even tried with ubuntu_12.10_armhf_v1_mele_t0.img but no blinking led and only a black screen (the screen gets a signal but it showes nothing).
    I have tried to SSH to it but with the new internal IPs I get from my router it doesn’t find anything to ssh to 🙁
    The only thing I haven’t tried is to downgrade the kernel but because I sitt on a Windwos I have no idea how to do it without ubuntu.
    (Sitting on a Mele A2000)

    I haven’t installed anything else on my Mele before this. I see some saying they have installed something else on their NAND before this, would that help? If so, where would I find these?


    • Just found your debian_wheezy_armhf_v1_mele.img and tried it and it’s the only img so far that did work! I could access SSH and PIMP_MY_MELE. I installed it to the NAND and restarted and it blinked correct and I could SSH to it without the SDcard. I tried to put the other IMGs on the SDcard but they still don’t work :S

  • Yes, it seems to be just clock problems around the mali driver.

    Unfortunately, i have only v1.7 mele available for testing here and all are working.
    I think it should work with v1.3 also.
    Mele produced a lot of variant since one year.
    I concentrate my work to keep all features working (including sata).

    You can comment each line of the /etc/modules (by mounting the mmc partition 2) and the ubuntu will boot.
    From this, with ssh, you can try to:
    – upgrade the kernel to one of mine available in another post
    – tune the script.bin (explained in many comments here) with different clocks and options.
    – try to find another kernel which could work on your mele version.

    From my opinion, gfx is disappointing.
    If you don’t really need it, just use the debian (tested for you 😉 like a nice ultra low power appliance: wifi gateway, file server, audio player, etc.. and make you mele scream.

    • I tried the mele-ubuntu-12-10-armhf-base-with-nand-install-v1.img one and it worked! I got the termknal up on the screen. I tried to downgrade to a earlyer kernel. I think I did correct but the xbmc img didnt work still, same problem. Are there anyway to get the xbmc into the mele-ubuntu-12-10-armhf-base-with-nand-install-v1 version from the terminal?

      I didnt understand your “You can comment each line of the /etc/modules (by mounting the mmc partition 2) and the ubuntu will boot.”. Can you explain more clearly what to do? Sorry for that but I’m sort of a between noob and normal level, but i’m learning fast 🙂

      • For xbmc, you need at least the kernel from:
        /Update 3/

        This kernel has the mali driver to make xbmc work.

        To proceed:
        1) Boot on your working ubuntu (the v1 if it works)
        2) SSH to the ubuntu and edit the file: /etc/modules (with vim or nano)
        3) Comment every line (put a # before each line), specially for: lcd, hdmi, ump, disp, mali, mali_drm
        4) From now, your ubuntu will not load the driver at boot. You will be able to load these modules by hand.
        5) Update the kernel to the linux-armhf-gfx-3.0.42-4.tar.bz2:

        # cd /usr/src
        # wget -nd
        # tar xzf linux-armhf-gfx-3.0.42-4.tar.bz2
        # cd linux-armhf-gfx-3.0.42-4
        # make sdcard
        # sync && reboot

        6) After reboot, try to load by hand the modules to see if it’s crashing or not:

        # modprobe lcd
        # modprobe hdmi
        # modprobe ump
        # modprobe disp
        # modprobe mali
        # modprobe mali_drm

        If it works, you will be able to run xbmc with my image and i will share an independant xbmc package to deploy.

        • Thank you all so far but when I write tar xzf linux-armhf-gfx-3.0.42-4.tar.bz2 I get:
          gzip: stdin: not in gzip format
          tar: Child returned status 1
          tar: Error is not recoverable: exiting now
          as an answer.
          Don’t really know what to do :S

          • You could have figure this one 😉

            $ tar –help | grep bzip
            -j, –bzip2 filter the archive through bzip2

            tar xjf linux-armhf-gfx-3.0.42-4.tar.bz2

  • Hi!

    I have the 1GB cubieboard. With this img I only obtain 308MB of ram. I tried to edit my script.bin and put the cubieboard.fex 1GB version.

    Nothing happens. I reboot and still have 308 GB.

    I also edited in nanda the linux/params to add:

    console=ttyS0,115200 root=/dev/nandb rootwait mem=1024M rw loglevel=8 panic=10;

    but nothing happens.

    The way I edit my script.fex is (I have nand installation)

    mount /dev/nanda /mnt/
    fex2bin cubieboard.fex /mnt/script.bin

    But I never get my 1GB ram…

    What’s my problem? Can you help me please?

      • Thanks Guillaume! You’re a genius. I have now my 1GB, but my problem is mali. I can’t load mali so I can’t run xbmc. I tried everything, and nothing, is impossible. When I do de modprobe for mali, it crashes with the bad adress issue. The’re is still no solution for this?

        Thank you a lot for your work!

        • Cool for the 1GB.

          For the mali, i don’t know. I have no clue and no board to test.

          If Tom Cubie can’t support directly his platform (like Mele can’t) and have a spare unit, he can always send it to me 😉

          • I’ll talk with Tom and I’ll tell him to send you a Cubie! I’ve read at this post some guys with the same problem… I don’t know if they’ve found any solution..

            If I would have enough money I would send you a Cubie 😉 !

    • Thanks, i have nothing to test it here.

      You can do it, boot your ubuntu:

      # cd /usr/src/
      # git clone
      # cd xf86-video-sunxifb
      # ./
      # make
      # /usr/bin/install -c src/.libs/ /usr/lib/xorg/modules/drivers/
      # /usr/bin/install -c src/.libs/sunxifb_drv.lai /usr/lib/xorg/modules/drivers/

      And change the driver in /etc/X11/xorg.conf to:

      Driver “sunxifb”

  • Long time not talk! Have had a lot to do at work 🙂
    Well I did all you said and I got the instructions working correct but when I load “modprobe mali” the mele stops. I even tried to run modprobe mali_drm but it always stopped at modprobe mali.
    Any way for me to run this or am I doomed? 🙁

  • Hi. I’ve booted my Mele A2000G 1.30 with this image, and everything seems to work, but i can’t install linux into nand. When i do a “ls -la /dev/nan*” i’m not receiving nand devices. Do i need to root android in my Mele to access to nand? Thanks for the replay

  • Hi,
    If you do a ‘dmesg | less’, what do you read on the nand driver init?
    A normal output should be smthg like this:

    [ 0.730000] [NAND]nand driver, init.
    [ 0.730000] cmu_clk is 360
    [ 0.740000] nand clk init end
    [ 0.740000] offset 0xc: 0x6041
    [ 0.740000] offset 0x14: 0x82000008
    [ 0.750000] [NAND] nand gpio_request
    [ 0.750000] [NAND] nand driver version: 0x2 0x9
    [ 0.760000] nand interrupte register ok
    [ 0.760000] ret of NFC_ChangMode is 0
    [ 0.760000] dma_hdle is 0
    [ 0.770000] dma_hdle is 10000008
    [ 0.770000] cmu_clk is 360
    [ 0.770000] nand clk init end
    [ 0.770000] offset 0xc: 0x6041
    [ 0.780000] offset 0x14: 0x82000005
    [ 0.800000] The 0 disk name = DEVICE, class name = NAND, disk start = 0, disk size = 7782400
    [ 0.810000] The 1 disk name = BOOTFS, class name = DISK, disk size = 32768
    [ 0.810000] The 2 disk name = LROOTFS, class name = DISK, disk size = 4069376
    [ 0.820000] The 2 disk size = 7747584
    [ 0.830000] part total count = 3
    [ 0.830000] nand: unknown partition table
    [ 0.830000] nanda:
    [ 0.900000] nandb: unknown partition table
    [ 0.910000] benn: nand probe enter
    [ 0.910000] [NAND]nand driver, ok.

  • Hi,
    unfortunately this does not work on Mele A1000 v1.20. I have tried two different 2GB sd-cards, downgrading kernel as you adviced in comments and also the commenting all lines in /etc/modules. Despite of this changes booting hangs immediately after mounting rootfs, as other people described.

    Can you please describe how the XBMC works? Is it usable as HTPS or the playback is full of artifacts?


  • Hi guillaume,
    The Nand install does not copy the xbmc,
    I booted from the SD, activated PIMP_MY_MELE, everything went
    ok in the nand install but it did not copy the XBMC,
    What do i need to copy from the SD to make it work,
    and what extra pakages does the xbmc requires to run
    in standalone mode.
    Thanks i nadvance

    • Hi,
      Yes, i forgot to add it to the automated PmM,
      You can copy it by yourself simply.

      From a nand boot, put your sdcard in the slot and do:

      # mount /dev/mmcblk0p2 /mnt
      # cp -a /mnt/allwinner /
      # umount /mnt

      That’s it.

      • Thanks,
        It worked fine but no audio ( at least from the hdmi ) when i play video.
        BTW: should i change the player because 720p was playing very slow.

  • Hi Guillaume!

    Did you try to configure a VPN in this distribution? Do you know if this kernel has MPPE support?

    I’m trying to set up a VPN into mi Cubieboard and I think I need this module: ppp-compress-18, but I can’t find it in this kernel..

  • HI Guillaume; thank you for your work (my english is not very good : french)
    fot the the future image can you add : “CONFIG_IP_ADVANCED_ROUTER=y” in the kernel configuration , now the ip rule add command answer “RTNETLINK answers: Operation not supported”, and i use your image on a cubieboard as media server and download server, with iptables rules and iproute2, and i need this rule add.

  • Hi Guillaume,

    I can get my hands on one of these a2000 boxes. I noticed this thread: ubuntu + xbmc which is really interesting. Essentially I am looking for 2 things: play HD videos (multiple formats) and passthrough (AC3/DTS audio to my amp).

    Either with/without xbmc, does this image enable me to do this?

    Many thanks for your reply.


    • Hi Herman,
      On the vast majority of mele a1000/a2000, it’s working.
      You will get a running xbmc with hdmi ac3/dts audio.

      But you should not hope to get a flawless HD video player… it’s $50 computer !
      For video, it’s more a proof of concept than anything usable daily… like nearly all arm set top box on the market. Video drivers are not fully supported.
      480p is ~ok~, 720p/1080p is difficult and will work with some specific video format.

      For xbmc audio player, it will work perfectly… but mpd is still better for dedicated audio player:.. you don’t need any local gfx interface to launch playback or choose your songs, you have mpd clients everywhere.

      My own htpc is still a intel platform with core i5, 4Go of ram and ssd, because it’s always working with any format and costs “only” $400. It is shutdown when i don’t need it.

      On the contrary, my audio player is a Mele, always up and available to launch bit perfect audio playback. TV off.

      The mele a2000 is fun, definitively worth a try if you have a bit of time to play with it.


  • Hi Guillaume,
    Thanks for your fast reply. Thr thing is that I have an old shuttle running ubuntu which just consumes way too much power. Ever since I put a bunch of solar panels on my roof, I wanted to monotor energy consumption and production which is where using the shuttle 24/7 was not good. I ended up replacing it with a raspberry pi which is a great little low cost box. The key downside is that it’s not particularly stable when doing many things at the same time. I got it to log everything (panels scanning my SMA inverter using bluetooth and a spa-spot, my electricity meter using an FTDI uart and some shell scripts) and I managed to get mpd working as well. As soon as I add HP video play back, it just crashes at some point (kernel messes itself up whilst doing bluetooth comms). That gives em a choice: add another pi for the video or use another box. The mele seemed like an interesting alternative but, from your feedback, it will be hard to get it to (in a stable way) play 1080p movies, correct?
    Anyways, thanks for the response. Appreciated!

    • Hi,
      For audio, the Pi fails in high rate bitperfect with many dac – buggy usb2 async interface. The mele is more faster and stable on this.
      For video, like i said previously, i don’t think it’s performing better than the mele.
      Perhaps you could try the xbmc over android with the mele. GFX is better supported.

      The fact is you can not hope getting a 64bit 2-3GHz performance from an arm 32bit 1GHz platform. Many highres video format require some cpu computing.

      Like i said, at $50, it’s worth a try. You can always reuse it as a file server, network service or audio player. I have 250 days of uptime on my mele cluster.

    • Saw this earlier. I was actually looking at the slav box. Had they produced a slav mx2 then that would be fun. Just ordered one fron the US. If you are interested, I will let you know how it performs. Thanks again. H

  • Hi Guillaume, Thank you for you work. This image is the only usable one on my brand new I succeed to get 816M of free mem without touching your kernel with rebuilt upstream u-boot-sunxi when I boot from SD card but I still get only 300+M of RAM when I boot from NAND even with new TheSeven/u-boot-sunxi in /user/local/pimpmymele/nanda and mem=1024M in params. And roootfs copying to NAND soo slooow – it takes 13min to copy 2Gb SD card to nandb. Where can be the problem? What I am missing with porting PIMP_MY_MELE to other board?


    • Hi,

      In fact, PimpMyMele is not deploying any uboot when preparing and copying to nand.
      On the Mele, at the time i’ve done it, the stock uboot was the only usable uboot.

      You should mount /dev/nanda and copy your uboot in it like you have done with the SDcard.
      It will work.
      Check the directory structure of the /dev/nanda to see if all is ok (in the directory linux ?).
      Change the linux/u-boot.bin with yours.
      Check also the script.bin and your boot parameters.
      Umount / sync / reboot.

      For the slow nand install, it’s strange to get 13 min. It’s taking 5-6 minutes max on the Mele.
      Marsboard and Mele have the same nand.
      But it’s a one time process and it’s not really critical.


      • Do you mean that u-boot.bin you copy to /dev/nanda is the same as you dd if=u-boot.bin of=/dev/mmcblk0 bs=1024 seek=32?
        It does not work for me with tthe latest linux-sunxi/u-boot-sunxi branch.
        But thank you very much for the lead, I will try another branches tonight.

        • Oh no, nanda is a partition.
          u-boot.bin is a BIN, a single file.

          You have to mount the nanda:

          mount /dev/nanda /mnt/

          And check the structure in /mnt/, look for a linux directory. You will just have to replace the stock u-boot.bin in it.

          Umount and reboot.


          • It’s a pity but it does not work with Mars Board. Neither with u-boot.bin from your image neither with u-boot.bin which allows to boot MarsBoard from SD and gives 816M of total memory… mem=512M in params was changed so the problem is somewhere else.

  • Hi Guillaume,

    Thanks again for this image. It runs quite well on my A2K v1.7 and keeps it from becoming just another brick on the shelf. It has been about a year since I got my Mele and my plans for it have changed from a XBMC+MAME-box (due to Allwinner’s lack of Lunix support) to a low power media, web and file server.

    Since both SD-card and NAND speeds are quite low, I decided to try out a Samsung SSD and connect it to the SATA-port in order to improve file system access. What I found when I tested this briefly (just with hdparm and dd to and from /dev/null and /dev/zero) was that SATA was very slow (only slightly faster than USB disk speeds). Is this due to the hardware implementation of SATA on A10 – does it go through USB like Ethernet does, is it just a bad HW design or is it a driver thing?

    Secondly I wanted to boot from NAND and mount SATA as root file system in order to check out how fast it would be in action. Normally I would change params on NANDA to reflect the new root device, but since SATA is a module, it would not be present in the kernel at rootfs mount time? I though about using NANDB as sort of a “initramfs” – a second stage where the SATA module could be loaded before the SATA rootfs takes over. Is this the way to go or are there better options?

    all the best,

    — Inge

    • Hi Inge,

      Sata is not slow as described on mine, at least with hdparm.
      It’s a simple ssd OCZ AGILITY3 60Go.

      Timing cached reads: 624 MB in 2.00 seconds = 311.56 MB/sec
      Timing buffered disk reads: 274 MB in 3.02 seconds = 90.81 MB/sec

      dd if=/dev/zero of=/opt/zero bs=1M count=1000
      1000+0 records in
      1000+0 records out
      1048576000 bytes (1.0 GB) copied, 17.9653 s, 58.4 MB/s

      It’s not ultra fast – don’t use it as a database server 😉 – but far more enough for the 100Mbps interface. It’s probably because of the small amount of ram… a 512Mo mele.

      For the sata boot, with the module, it’s the best way to do it. initramfs in a nandb.
      uboot is not supporting sata boot…
      Or if it’s just for testing:

      man pivot_root


      • Hi,

        Thanks for your feedback Seems like my results are a bit different from yours. Running hdparm with and without –direct had strongly fluctuating results on NAND and SATA measurements. MMC has stable results, though (11-12MB/s). Below are typical results:

        root@mao:/dev# hdparm –direct -tT /dev/nandb

        Timing O_DIRECT cached reads: 12 MB in 2.16 seconds = 5.55 MB/sec
        Timing O_DIRECT disk reads: 18 MB in 3.11 seconds = 5.78 MB/sec

        root@mao:~# hdparm –direct -tT /dev/mmcblk0p2

        Timing O_DIRECT cached reads: 24 MB in 2.06 seconds = 11.67 MB/sec
        Timing O_DIRECT disk reads: 36 MB in 3.09 seconds = 11.66 MB/sec

        SATA (SSD):
        root@mao:/dev# hdparm –direct -tT /dev/sda1

        Timing O_DIRECT cached reads: 52 MB in 2.04 seconds = 25.52 MB/sec
        Timing O_DIRECT disk reads: 82 MB in 3.01 seconds = 27.27 MB/sec

        DD test on SATA (SSD):
        root@mao:~# dd if=/dev/zero of=/mnt/speedy/zero bs=1M count=1000
        1000+0 records in
        1000+0 records out
        1048576000 bytes (1.0 GB) copied, 28.6485 s, 36.6 MB/s

        I tried pivot_root and the feel is *much* better than with MMC. I will try to use an intermediate rootfs and test it properly.

        BTW: When I log in, motd says:

        “New release ‘13.04’ available.
        Run ‘do-release-upgrade’ to upgrade to it.”

        Would 3.0.42 still be usable wit 13.04?

        all the best,

        — Inge

      • Hi again,

        I understand that this issue isn’t very important to you. If anyone else have SATA throughput that seems even close to the benchmarks for A10 on (219MB/s), please let me know what software, hard drive and Mele hardware version you are running.

        all the best,

        — Inge

      • Salut Guillaume,

        sorry for this somewhat off-topic question regarding SATA speeds. I’m trying to collect informations about what sequential throughput can be achieved with A10/A20:!category-topic/cubieboard/tD0AxHx5Ync

        In your test above you didn’t use oflag=direct and you used a rather limited file size (twice the size of the RAM). So this might have tested partially just OS buffers. Do you mind to repeat the test 2 or 3 times with the following settings please?

        dd if=/dev/zero of=/path/to/SSD/testfile oflag=direct bs=1M count=1500

        Thx, Thomas

  • Hi Guillaume, i tried this version, and works fine, but…sata don’t works, and if i try to use some updates of yours, they don’t work 🙁
    If i try to install on nand with PmM, the result is:
    cp: writing `/mnt/linux/linux.ini’: No space left on device
    cp: failed to extend `/mnt/linux/linux.ini’: No space left on device
    cp: writing `/mnt/linux/params’: No space left on device
    cp: failed to extend `/mnt/linux/params’: No space left on device
    cp: writing `/mnt/linux/u-boot.bin’: No space left on device
    cp: failed to extend `/mnt/linux/u-boot.bin’: No space left on device
    cp: writing `/mnt/linux/uImage’: No space left on device
    cp: failed to extend `/mnt/linux/uImage’: No space left on device

    I tried to update memory at 1gb too (960mb), but nothing change…always 512 🙁

    Have you some suggestion to what i could try to solve?
    ps: xbmc seems to works fine :)))
    Best regards

  • Hi Guillaume, and thanks for your answer 🙂
    Unlukly i tried with kernel 3.0.42-6, 7, and 8, and with 57 too…always without success 🙁
    Followed the link for 1gb memory too, but yet without success…
    this is the result of mount nanda:
    root@mele:/# mount /dev/nanda /mnt
    root@mele:/# cd /mnt
    root@mele:/mnt# ls
    boot.axf boot.ini linux script.bin u-boot.bin uImage

    I really don’t understand what happens…
    Thanks a lot

  • Hi Guillaume, after some tries, i finally installed v2 on nand, and may be i found where the problem was…i have to do some test, but if i’m right PmM will work well with cubieboard too, after a copule of changes.
    For now, i will confirm you that sata works, and memory is set to 836mb.
    Thanks for now, and i hope to give you some good news 🙂

  • Again me (lol)
    Made a lot of test on nand, done manual partition, formatted, rebuild, etc…but my purposes was not confirmed 🙁
    At the end, using your image and update 42-8, i made a simple script to install it on cubieboard nand, whit choice between 720 and 1080: In the next days i will test if all works. If all is ok, it’s possible to publish the full image?
    Thanks for your great works 🙂

    • No problem, post your install command lines here or a diff against PmM.
      I’ve done it fast for the mele in a real couple of hours (2) and didn’t secure/check the return of shell command. It’s quite far from a stable bullet proof release and it was not the goal 😉

  • The script is pretty simple, just a drag’n’drop of the standard nand install, with some little mods…but at the moment i have a problem with run 1gb boot.scr, because cubie reboot every time, and i don’t understand why 🙁
    this is the content of boot.scr:

    setenv console ‘ttyS0,115200’
    setenv root ‘/dev/mmcblk0p2’
    setenv panicarg ‘panic=10’
    setenv bootdelay ‘2’
    setenv extra ‘mem=960M rootwait’
    setenv loglevel ‘8’
    setenv boot_mmc ‘fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x48000000 ${kernel}; if fatload mmc 0 0x43100000 uInitrd; then bootm 0x48000000 0x43100000; else bootm 0x48000000; fi’
    setenv kernel ‘uImage’
    setenv boot_mmc ‘fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x48000000 $
    setenv bootcmd ‘run setargs boot_mmc’

    simply added mem=960M to setenv extra, and first time i used, it worked.

  • And this is the script i made for the nand-install:


    dd bs=4096 if=cubie_nand_uboot_partition_image.bin of=/dev/nand
    sleep 2
    mount /dev/nanda /mnt
    rm /mnt/script.bin
    cp script-cubieboard-720p60/script.bin /mnt
    umount /mnt
    mkfs.ext4 /dev/nandb
    mount /dev/nandb /mnt
    mkdir /mnt/boot
    cp linux-armhf-gfx-3.0.42-8/p1/uImage /mnt/boot/uImage
    rsync -avc –exclude-from=esclusi / /mnt
    cp -a linux-armhf-gfx-3.0.42-8/p2/lib /
    chown root:root -R /lib/modules
    sleep 1
    shutdown -h now

    note: the script.bin used don’t light up green led, so don’t wait it to see if works

    When my sdcard crashes, i was tring to use your script.bin, just to have back the green led.
    Hope this may be of some help.

  • Hi, Guillaume,

    I’m very interested in your images and want to have a try. But I’m not be able to download your images, either by wget or download directly from firefox. It always stop download after a few megabytes(not more than 20MB), never succeed. Don’t know if there is a problem with your server?


    • Hi,
      No problem with my server or with my network.
      Try to bypass varnish and go to the port 81 like this with the ‘continue’ option of wget:

      For example:

      wget -c

      And relaunch it as many time as you need to get the file completely.

      • Hi, Guillaume,

        Thanks a lot for the help! I have download the image successfully, and will have a try later. I just clicked the new URL in your reply and it downloaded happily and fastly. But if I click the upper URL, the same problem will happen again. I tried other links in your site, they all behaves the same. By changing to the :81 port, they all downloaded successfully.

        Anyway, great work!

  • Hi Guillaume, yesterde i tried version 3.0.57-w/gfx on cubie nand. The only issue i find, is whith hd movies…when there is a lot of white in the images, it crash a bit turning to purple, and after a bit it come back to normal. With sd movies, no problem, they works well. So, there is some changes in xbmc between version .57 and .46-8? i haven’t had chance to try it at the moment, but if there are no difference, i’ll upgrade it to .57 too.
    ps: if you are interested, is online kernel .62+ here:
    Thanks for your great works, you are awesome!!!

  • Hi,
    I have tried your image again on the Mele board marked AB10-CG32-V1.20-2.
    Unfortunately kernel hangs with following output

    [ 2.140000] regulator_init_complete: axp20_buck3: incomplete constraints, leaving on
    [ 2.140000] regulator_init_complete: axp20_buck2: incomplete constraints, leaving on
    [ 2.150000] regulator_init_complete: axp20_ldo4: incomplete constraints, leaving on
    [ 2.160000] regulator_init_complete: axp20_ldo3: incomplete constraints, leaving on
    [ 2.170000] regulator_init_complete: axp20_ldo2: incomplete constraints, leaving on
    [ 2.180000] regulator_init_complete: axp20_ldo1: incomplete constraints, leaving on
    [ 2.180000] sunxi-rtc sunxi-rtc: sunxi_rtc_gettime
    [ 2.190000] sunxi-rtc sunxi-rtc: read time 2010-1-1 0:0:21
    [ 2.190000] sunxi-rtc sunxi-rtc: setting system clock to 2010-01-01 00:00:21 UTC (1262304021)
    [ 2.200000] Waiting for root device /dev/mmcblk0p2…
    [ 2.960000] [mmc]: mmc 0 detect change, present 1
    [ 3.260000] [mmc]: mmc 0 power on !!
    [ 3.300000] [mmc]: sdxc_request_done(L1113): smc 0 err, cmd 52, RTO !!
    [ 3.300000] [mmc]: sdxc_request_done(L1113): smc 0 err, cmd 52, RTO !!
    [ 3.310000] [mmc]: sdxc_request_done(L1113): smc 0 err, cmd 5, RTO !!
    [ 3.320000] [mmc]: sdxc_request_done(L1113): smc 0 err, cmd 5, RTO !!
    [ 3.330000] [mmc]: sdxc_request_done(L1113): smc 0 err, cmd 5, RTO !!
    [ 3.340000] [mmc]: sdxc_request_done(L1113): smc 0 err, cmd 5, RTO !!
    [ 3.440000] mmc0: new high speed SD card at address 0710
    [ 3.440000] mmcblk0: mmc0:0710 SD02G 1.83 GiB
    [ 3.450000] mmcblk0: p1 p2
    [ 3.530000] EXT3-fs (mmcblk0p2): error: couldn’t mount because of unsupported optional features (240)
    [ 3.540000] EXT2-fs (mmcblk0p2): error: couldn’t mount because of unsupported optional features (244)
    [ 5.960000] EXT4-fs (mmcblk0p2): recovery complete
    [ 5.970000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 5.980000] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 5.990000] devtmpfs: mounted
    [ 5.990000] Freeing init memory: 160K
    [ OK ]ding cpufreq kernel modules…
    /etc/rc.local: 15: /etc/rc.local: fbset: not found

    As one of the last messages consider cpufreq, I suppose that there could be some issue with clocking. Do you please have any solution? I have tried to downgrade kernel as proposed on earlier comments but without success.


  • Guilhaume, the command:

    apt-get install xterm …

    give me a message of error about the packages zabix, yorick and many others. “Unable to correct problems you have broken packages”

    I have to install “xbmc” by hand with apt-get install xbmc.

    Thanks for this great work!

  • Just another bit of tests.
    Version 42.-8 gave me some problem, no working display when attached at my tv (hdmi to hdmi cable), but worked with the monitor (hdmi to dvi).
    Installed version 57, seems works fine, but crash when i try to install wvdial.
    Confirm that xbmc has some prolbems hd movies (may be on my tv, which works at 720? if someone may try with a 1080 tv…i think it may depend by 720-screen to 720-movie); sd movies are working very fine.

    Just a little tricks: lxde don’t need a login manager, such slim or others, just edit the file /etc/lxdm/lxdm.conf and set the user you want for the automatic login, and, if you prefer start in shell mod, move the file /etc/init/lxdm.conf in /etc/init/lxdm.con-no_boot, then if you want to start lxde give “lxdm start &” (without quotes).


  • Another test report (vers. 3.0.57):
    If i install lxde, when i start xbmc (even from shell, without active lxde) it crash, and give “segmentation fault”. If i remove lxde, xbmc start again without problem.
    Ps: about sata is my fault: disk start, but not sda dev listed.

  • When I install on NAND, I can not get Ubuntu to display the image on my TV screen NTSC.
    Using the memory card, everything works fine, including XBMC.

    Tried to update kernel, but the driver MALI crashes. The machine is unusable. So I get back to the original kernel.

    How can I solve this problem the TV output? I have to copy some file? There is an issue with PIMP_MY_MELE?

  • About PIMP_MY_MELE script:
    with vi or nano edit line :
    `cp -a /bin /boot /dev /etc /home /lib /opt /root /run /sbin /tmp$
    `cp -a /allwinner /bin /boot /dev /etc /home /lib /opt /root /run /sbin /tmp$

    to got XBMC copied in NAND install.

    Can’t understand why my PIMP_MY_MELE don’t change TVMODE at NAND install.

    #cd /mnt
    #mkdir nanda
    #mkdir mmcblk0p1
    #mount /dev/nanda /mnt/nanda
    #mount /dev/mmcblk0p1/mnt/mmcblk0p1
    #cp /mnt/nanda/script.fex /mnt/nanda/script.old
    #cp /mnt/nanda/script.bin /mnt/nanda/script.bin.old
    #cp /dev/mmcblk0p/script.fex /mnt/nanda/script.fex
    #cd /usr/local/sunxi-tools
    #./fex2bin /mnt/nanda/script.fex /mnt/nanda/script.bin
    #cd /mnt/nanda
    #cat boot.ini

    got this:
    start_os_name = linux
    timeout = -1
    display_device= 3
    display_mode = 2
    erase_flash = 1


    Edit with nano
    #nano boot.ini

    to this:
    start_os_name = linux
    timeout = -1
    display_device= 2
    display_mode = 14
    erase_flash = 1


    restart the system.
    But still don’t have video at my TV. Just lines blinking…

    Why PIMP_MY_MELE don’t save the configuration of MEDIACARD on NANDA install?

    • I believe that is some mistake at files copied by PIMP_MY_MELE…

      I don’t know PERL, but I will try to figure it out.

      Soon as I can make it work, I will write a step by step tutorial for newbies like me…
      Thanks for this marvelous job, man!

  • Hi again Guillaume 🙂
    I tried to compile xbmc by myself, and strangly it works!! (with hd modvies too 😮 )
    i used sunxifb drivers, and my xorg.conf is very poor (only these settings)
    Section “Device”
    Identifier “Allwinner A10/A13 FBDEV”
    Driver “sunxifb”
    Option “fbdev” “/dev/fb0”

    If you want make some tests, i can give it to you (is version 12.2)
    Another tihng is that sunxi seems a little bit better than mali driver, i haven’t purple strips using hdmi -> dvi cable.
    Let me know, and a great thanks for your works!! :))

  • Hi Modstan, i made it with berryboot and linaro. If you want i could try to make an image of it, or if you prefer i can upload a tar file with xbmc.
    Let me know your preference 🙂

  • sir ,
    sorry to bother you. i understand that you are a very busy person.
    i dd’d the image and pimped it for vga.
    i cannot get xorg to start even after installing openbox+slimdm
    the odroid guys really pulled off something with the mali
    any fix?

  • Sorry for the delay, i’m a bit busy at the moment 🙁
    I made some test with linaro, and it has a lot of issue. And xbmc this version of xbmc has some purples images with some hd movies.
    “My image” is nothing special, i used berryboot and installed linaro, and it’s not like Guillaume images (they are more powerfull and more flexible, imho).
    Berryboot use initramfs, and this is good to have working sata disk before kernel is loaded (this was one of my purpose to build a nand image, but i’m not able to do it).
    If you want to test xmbc you can take it here:
    For mali drivers, i’ve only followed Guillaume instructions.

  • Hi

    I have purchased a Mele A2000G, Build v.2.0.1 and Kernel 3.0.8+ and I want to put Ubuntu on it.

    I have a 2GB MMC and i used dd for windows to write it using your image “ubuntu_12.10_armhf_v2_mele_xbmc.img”. I’ve connected the Mele via VGA to a monitor. I inserted the MMC while the Mele was powered of and powered on afterwards. Unfortunately I do not see anything on the monitor and the lights on the front are blue. When I boot up the Mele without the MMC then i’m getting the Mele menu without issues. Any hints are appreciated. Thank you very much

  • Hi everyone,

    is there a tutorial or blog post that explains how to install the root fs on the sata drive ?

    I’m quite new to this 🙂

    I’ve managed to install the given ubuntu img on micro sd.

    What do I have to do now, in order to copy the root fs accross to a linux partition on the sata and run from there ?



  • Hey ciao!
    Grazie per la guida!
    Sono connesso, riesco ad utilizzare ping.
    Non riesco ad usare apt-get .
    Ad esempio facendo “apt-get update” ottengo:

    Get:1 quantal InRelease [2,255 B]
    Get:2 quantal Release.gpg [2,256 B]
    Get:3 quantal Release [2,256 B]
    Err quantal Release

    Fetched 6,767 B in 1s (5,526 B/s)
    Reading package lists… Done

    Io utilizzo la Vodafone Station e non ho configurato alcun proxy, sapresti trovare una soluzione?
    Per connettermi ad una wireless protetta che cosa devo fare?

  • Hey!
    Thanx for your tutorial!

    I have a network issue.
    I am connected to the router (with cable) and i can use ping but i can’t use “apt-get”.

    When i try “apt-get update” it say:

    Get:1 quantal InRelease [2,255 B]
    Get:2 quantal Release.gpg [2,256 B]
    Get:3 quantal Release [2,256 B]
    Err quantal Release

    Fetched 6,767 B in 1s (5,526 B/s)
    Reading package lists… Done

    I am using Vodafone Station and i haven’t configured proxy.

    How can solve the problem?

    How can i connect with wireless?

    thank for all!

  • When I try to do-release-upgrade I get this. Is possible to fix it?

    root@mele:~# do-release-upgrade
    Checking for a new Ubuntu release
    Traceback (most recent call last):
    File “/usr/bin/do-release-upgrade”, line 145, in
    fetcher.run_options += [“–mode=%s” % options.mode,
    AttributeError: type object ‘DistUpgradeFetcherCore’ has no attribute ‘run_options’


  • I need to compile git clone git:// for my wifi, it’s 0bda:8179 vendor and the mod is 8188EU for working it.
    Can you help me and provide me a file 8188eu.ko or tell me a link for download it for my mele?
    PD. Sorry for my English

    • Hi Jan,
      Sorry for the delay.
      I have only mele with a 8192cu (and don’t use wifi 😉
      Which mele version is using this module ?

  • Thanks Guillaume for your answer and your great compilation for mele. Working fine on my Mele A1000G that has the wifi chip rtl8188eu. The purpose of this is to use it as a media center with xbmc so it is necessary for the functioning wifi and it can be replaced with my current raspberry pi. In xbmc android does not work nimbly. Your complete compilation four A1000G would be a breakthrough.

    Thank you for your attention.

  • Well, I am a new member and I have never used Ubuntu before. Yesterday, my mele a1000g single core mini pc arrived in the mail. I tried to use berryboot to install Ubuntu, but it didn’t work. So, I dd’d the image of ARM Ubuntu specific for my device to an SD Card. I used the SD Card to transfer that image to the NAND Partition and can now boot Ubuntu without the SD Card. Anyway, it boots quickly, but I cannot see the entire desktop. I can see a sliver of the menu, but none of the text or anything and I have no idea what I am doing. For the most part, all that I can see is the Ubuntu icon in the center of the screen on a black backround. I am used to windows 7. So, I would like some way to resize the desktop slightly smaller so that I can see the entire thing. I have tried changing the display mode on my monitor, but it only resizes the image that it was originally displaying and it doesn’t add any more of the edges of the desktop that weren’t being displayed. So, that is a useless idea. I would prefer some sort of graphical way of doing this, as I can’t do much of anything in the text only environment except typing “startx” and booting Ubuntu. Keep in mind that this is ARM Ubuntu 12.10 running on the mele a1000g single core. I am using the image from this link:

    Also, Some users of my device have had trouble accessing all of their RAM when booting with this image. For some reason Ubuntu only recognizes 512 mb of the 1 gb RAM that this device has. I would like a quick way to check how much RAM Ubuntu is running on/able to access. Last Question 🙂 Does Ubuntu come with a web browser and how do I find and run it? If not, how would I go about installing one? Thanks so much for all of your help! Keep in mind that I am a complete beginner.

    • Hi,
      First of all, i’ve made an gfx (ubuntu) image for fun 😉
      The main purpose of this work was a proof of concept: the usage of the mele as a server with sata and ssd (headless with debian).

      For your screen problem, are you using it on a TV ?
      A lot of tv monitors crop edges in 1080 or 720. this is why players like xbmc manage internal interface resize.

      For the ram problem, the kernel is not detecting properly the ram on mele. You have to force it.
      To get 1G with nand, you will have to install one of my 1G kernel package.
      Go to this page:

      For the distrib internals, to install packages, ‘apt-get install ‘.
      It’s a classic ubuntu and you can find a huge number of howto online.


      • Yes, I am using a 50” HDTV. I am having trouble getting it to connect to WIFI as well and I can’t see the toolbar or menus at all! I am really not that good with Linux though and have no previous experience. Is there some easy way to restore the original Android OS that it came with? That is starting to look like my best option!

  • I originally posted this on Ask Ubuntu, but of course no one could answer it. I figured this might be a better place to ask! 🙂

  • Ubuntu 14.04 LTS is about to be released, Can you make a ROM for mele?

    Ubuntu 12.10 support is about to finish, porting to Ubuntu 14.04 will have support and updates until 2019.

    Thank you

  • There are several (tausends of) devices around the world running your image as a base working 24/7. How about some update, so or devices would stay fresh.

    • Hi irrs,

      You can upgrade the ubuntu version directly via apt-get.
      It’s working.
      I don’t feel the need to change the image since it’s pretty stable and light like this.
      If you need specific/adhoc stuff, you can compile everything you need on it.

      For the ubuntu armhf, you have a list of available versions here:

      The current version in my image is the ‘precise’ (12.10).
      Edit /etc/apt/sources.list and you can upgrade the target to the ‘saucy’ and after the ‘trusty’ which are respectively the 13.10 and 14.04.

      apt-get update
      apt-get dist-upgrade



      • Hello

        There is no way to upgrade to 13.10 and 14.04.

        Seems like do-release-upgrade is failing when fetching archives, I tried to use old-release repositories but still failing.

        can you please tell us how to update, thank you.

  • Hi Guillaume, long time i don’t post your blog 🙂
    I tried to do my own image, and finally i think to arrived at the end. Is ubuntu 12.04 based, and it has smplayer with full-hd support, a couple of media server to stream around the network, gnome as default desktop, and lxde & xfce too. Chrome with flashplayer (slow, i admit) and now xbmc with working full-hd. It is for cubieboard 1, so i think it should works on mele too.
    I should be able to upload the images (sd and nand) in the next week.
    If you wanna give a look, here is some info:,1700.0.html (at the moment the images take near 3.6gb 🙁 )
    Best regards, and thank for your all your help in these years 🙂

  • I think it may be usefull if you add a new entry explaining the way to update, cause it is very tricky since old repositories are over.


  • I managed to Update to 13.10, but when “”””””http/ saucy””””””” is over (in the next few months will be unsuported) update will be impossible for all.

    Quantal is already over.

    A 14.04 image would be great.

  • I can’t see screen display if I don’t plug eth0 when booting Mele.

    Is it normal? Can I run it without LAN cable? only with a screen and a keyboard, is my intention.

  • Hello,
    Have you ever had a go with the A1000G quad?
    I’d like to run ubuntu on the device, but i don’t know where to start.
    Any help would be appreciated.

Leave a Reply to Nick Cancel reply

Your email address will not be published. Required fields are marked *