«

»

Sep 07

Introducing the MK802 FreedomStick.

Recently a whole range of cheap Android devices have become available, all powered by the Allwinner A10 SOC. Thanks to the way A10 devices boot they are very easy to hack. All that is needed is a bootable SD card. How to make such a card is no big secret, and there are now multiple SD card images available. You can boot for example Lubuntu or Debian instead of Android. One A10 device, the MK802 stick computer, is almost ideal for a small home server. I bought one to examine its potential for the FreedomBox.

What makes A10 devices special?

Before i share my experiences with the MK802 i have to write something about its hart, the Allwinner A10 SOC. This remarkable 400 pin (!) chip only costs about $7 and houses the following:

  • A one core Cortex A8 ARM processor, typically running at 1GHz.
  • A MALI400MP OpenGL 2.0 GPU
  • DDR3 800 MHz controller
  • Hardware accelerated video playback
  • Video outputs for: HDMI, VGA, Analog video, and LCD.
  • A 10/100 MHz Ethernet controller
  • A NAND Flash controller
  • USB Host controller + USB OTG controller
  • A SATA-II controller
  • Etc, Etc, Etc….

Wow!

Apart from all the hardware features its boot process is also interesting. Booting goes as follows:

  1. Check if the reset pin is pressed. If so, load new firmware from the USB port.
  2. Check if there is a SD card present. If it contains a bootable image, boot from the SD card.
  3. Boot from the internal NAND storage (boot Android).

Step 1 can recover a “bricked” device. Step 2 makes loading an alternative OS possible. Very hacking friendly!

What A10 devices are available?

The A10 is used in a whole range of products, from tablets to TV multi media boxes to stick computers. The most popular devices are:

The $70 Mele A1000. This is a complete computer. Some specs: 512 Mb RAM, SD slot, support for SATA Hard-disks, connectors for multiple types of monitor (VGA/HDMI/Analog video), 10/100 Ethernet connector, WIFI, Audio out and two USB host ports.

The $65 MK802. This is a stick sized computer (0.47 x 3.46 x 1.38 inch) that has (of course) less connectors than the Mele A1000. The specs are: 1024 MB RAM (older versions 512 MB), microSD slot, HDMI video out, WIFI, one USB host port and one USB-OTG port.

You will probably agree with me that the $70 Mele is a better deal – the MK802 is overpriced. It would not surprise me if the MK802 drops in price to about $40 in the near future.

Booting an alternative OS.

A10 devices have become very popular the last few months and a lot of development is going on. Most development targets Lubuntu (Ubuntu + LXDE) and the Mele A1000.

The best way of running an alternative OS is download a ready made SD image for your device and write this to a cheap SD card (8GB class 4 is fine). On my MK802 i successfully tried the following images:

A Lubuntu 12.04 desktop version, downloaded from miniand.com. This version has a fixed 720p HDMI output with no hardware acceleration. While i’m not very interested in desktop use, i found the desktop performance quite acceptable. This Lubuntu version seems stable too.

The Linaro-alip armhf version. This image is made by Toby Corkindale and has an 1080p HDMI output, again with no hardware acceleration. Desktop performance is acceptable, stability is OK.

How does the MK802 perform?

A small internet-connected server like the FreedomBox should meet the following performance requirements:

  • It should be fast enough for simple tasks like serving web-pages.
  • Ethernet/WIFI must be fast enough.
  • Because the device runs 24/7 energy consumption must be low.

All of these can be measured easily. Measurements are more interesting if you can compare them for different systems, so i decided to do the same measurements for the following systems:

  1. My current FreedomBox. This is an 1.2 GHz Marvell Kirkwood 6281 system. The same SOC is used on the DreamPlug.
  2. The MK802, which uses an 1 GHz Allwinner A10.
  3. An Intel Atom 330 system running at 1.6 GHz
  4. My Desktop system with a dual core G620 Pentium processor.

Except for the MK802, all systems have a wired 1Gb Ethernet connection. For the MK802 i did two measurements: one with WIFI Ethernet and one with a wired 100Mb USB-Ethernet dongle.

To measure the performance i used an experimental python-powered version of my blog. This version does not use a database, but stores the individual postings in a simple directory structure. For each request 10 postings are read from disk and served as one HTML page that looks (almost) exactly like my normal blog. The size of this page is 64.9 Kb.

Apache bench was used to measure the performance in pages/sec. I requested 1000 pages with a concurrency of 10. The results are:

Marvel
6281
MK802
WIFI
MK802
Wired
Atom
330(*)
Desktop
G620 (**)
Pages/sec. 25 12 39 174 805
MB/sec. 1.64 0.77 2.5 11.2 52
Power (W) ~13 3-4 4 35 45
Pages/sec/W 2 3 10 5 18

(~) estimation, could not measure without ruining my uptime :-)
(*) 4 threads were used.
(**) 2 cores (= 2 threads) were used.

From the results the following conclusions can be drawn:

  • The WIFI of the MK802 performs poorly. However, a bandwidth of 770 KB/sec is still well above the upstream speed of most households so it may be considered acceptable.
  • The 1 GHz A10 processor is much more powerful than the 1.2 GHz Kirkwood processor of my FreedomBox. Personally, i find the performance of my FreedomBox (which runs several virtual machines with WordPress blogs) quite acceptable. A10 devices will do well as FreedomBoxes.
  • The A10 performs roughly equal to a 1.6 GHz single core Intel Atom (with no hyper-threading).
  • Using an Intel Atom or even a desktop computer seems overkill. An A10 powered device should be powerful enough.
  • Pages/sec/W is a measurement of the energy efficiency. To be honest, these values are not fair because the MK802 is the only device without a hard-disk. A hard-disk consumes about 5 W so it has a big impact. The energy efficiency of the MK802 is excellent.

My overall conclusion is that the MK802 should do well as a FreedomBox. It’s a pity that it has no wired Ethernet connection. It has however an USB-OTG port which could be programmed to behave like an Ethernet dongle (just like those WIFI sticks – you plug one in and it is detected as a new network interface)

Links.

Here are some links to start with if you are interested in A10 devices:

Much pioneering work on the A10 was done by Luke Kenneth Casson Leighton. Luke is the one behind Rhombus Tech. A Community Interest Company, which is developing an open hardware Computer-on-Module that uses the A10. Lots of info can be found at:

http://rhombus-tech.net/allwinner_a10/

A good place to buy an A10 device is “The Cubies hacker shop” at:

http://www.aliexpress.com/store/511685

Tom Cubie (alias hipboi) is very actively involved in getting GNU/Linux working on the A10. Just like Luke he is planning to release open hardware based on the A10.

http://cubieboard.org/

Both the SD card images i used come from the miniand.com website. Miniand sells A10 devices and has a busy forum at:

https://www.miniand.com/forums/

MK802 images are available at:

https://www.miniand.com/forums/forums/development/topics/mk802-guides-and-images

Another company that sells the MK802 and other A10 devices is Rikomagic.

http://www.rikomagic.co.uk/
forum:
http://www.rikomagic.co.uk/forum/viewforum.php?f=2&sid=3c3ef83dd83af61f8af6a82c6b28cf47

Someone named gnexus has a very interesting site about A10 devices:

http://a10linux.org/

Last but not least – i enjoyed the info at Jeff Doozan’s site.

http://forum.doozan.com/list.php?6

6 comments

Skip to comment form

  1. Nick Hardiman

    A fantastic post. I am inspired to buy one.

    Thanks for your hard work on this. You helped me understand.

    1. robvanderhoeven

      You can’t go wrong with this device. If you don’t like it you can easily sell it (i bought mine second hand). Or you can use it to turn your TV into a big Android tablet :-)

  2. Olivier

    Hello,

    Just to tell you know, I built my own NAS with a MK-802 + 500GB USB drive:

    -Lubuntu 12.04 from Rikomagic
    -Webmin
    -Ajaxplorer
    -Samba
    -Netatalk
    -Apache/PHP5/MySQL

    All done with tutorials for Ubuntu, works like a charm as a time machine backup!

    NAS perf is arround 7-8MB/s throught MK802=> WIFI => Router =>WIFI => Mac
    I should try with a gigabyte adapter between the MK and the router!

    1. robvanderhoeven

      Wow, that’s an excellent WiFi performance! What version of the MK802 are you using?
      It’s always fun to try a Gigabit adapter but don’t expect too much. My Marvell ARM system tops at 20 MB/s for a Samba share and this system does not have USB bottlenecks (USB Harddisk and USB Ethernet).

  3. rm

    Hello!

    Was surprised to find your article, it’s almost exactly in the same spirit with what I wrote some time ago on my page advocating the use of MK802 as a small home server: http://romanrm.ru/en/a10/mk802-server

    1. robvanderhoeven

      Hi,

      I have visited your site some time ago when i was looking for a Debian image. It’s a small world :-) Stick computers will probably be the hardware for the FreedomBox. The only thing we are all waiting for is good support for the kernel developers. Hopefully some brave (and clever, think about the Raspberry Pi success) manufacturers will provide it in the future…

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>