Using the Allwinner A10/A20 as a home server
Contents
-
- Benchmarks
What is the Allwinner A10?
It is an ARM SoC (System on Chip) that integrates a 1GHz ARMv7 CPU, Mali400 video accelerator and the CedarX video decoder. It also has support for USB 2.0, Ethernet and SATA, HDMI and VGA displays.
Why choose it?
It is more than fast enough
1024MB of RAM and a 1 GHz ARMv7 CPU are more than enough to run any 'home server' task one might think of. It can run Web/Mail/DNS/DHCP/VPN/Jabber/Mumble/Tor servers, if you attach a hard drive it can also act as a small NAS. It can easily be a FreedomBox implementation for you and your family/friends.
It runs GNU/Linux
Thanks to the flexible nature of the A10 (without any convoluted hacking or soldering, it always looks for a boot loader on an inserted SD card first), it can run not only Android, but any other OS which supports this type of system, for example a GNU/Linux distribution. Debian, Arch, Fedora, etc., can be used, all with a quite recent Linux kernel (3.4 or with some limitations, just the mainline).
It is very cheap and easily obtainable
No expensive shipping or pre-order queues. A10 devices can be easily purchased for very cheap (below $35) with free shipping from China.
Example devices
Also see this Hackable Gadgets list, which currently features two A10 devices in the top two spots.
MK802
The MK802 is “the original” flash-stick-sized PC that may have started the whole wave of similar devices. It's intended to be connected to a large-screen TV via HDMI to use Android applications and games, watch movies or online video, etc. But of course you can use it in any other way you like, thanks to the ability to load a full GNU/Linux OS on it, two USB ports and built-in WiFi.
- Modding it into a server: http://networkhax.blogspot.com/2013/07/low-power-small-form-factor-and-high.html
Mele A1000 or A2000
An “Android media player set-top box”, has perhaps the fullest set of the A10 features readily available out of the box: Ethernet, SATA, VGA, Composite video and optical audio outputs.
Banana Pi
“The Banana Pi is a small single board computer. Both its name and board layout might suggest it's compatible with the well known Raspberry Pi but that's definitely not the case. At its heart is a different SoC (system on a chip) which features a different GPU than the RasPi and more importantly contains both SATA and Gbit Ethernet.”
Cubieboard
Cubieboard is a small (10x6cm), hacker friendly, extendable and very low-cost while powerful ARM board with Allwinner A10 (and later A20) SoC. It comes with 1GB RAM, 4GB NAND Flash, 10/100 MBit Ethernet, HDMI output, 2x USB Host port, 1x USB OTG port, a microSD socket, a SATA interface, an IR sensor and 2 headers to access extra pins such as GPIOs, I2C, SPI,VGA pins, CVBS pins etc.
Comparison to alternatives
Why not a GuruPlug/SheevaPlug/DreamPlug?
- Price and availability
First of all, the A10 devices are a lot cheaper than the *Plugs (e.g. the MK802 is from about $34 at the time of writing, vs $100-120+).
Second, they can be easily ordered directly from China via Aliexpress (see the link above), with free shipping worldwide.
The *Plugs typically ship only from the US or UK, with either something silly like $40 shipping fee, or do not ship to a lot of countries including mine at all.
Why not a Raspberry Pi?
- Specs
The A10 provides a massively better bang for the buck! Typical devices feature 1024MB of [4x faster DDR3] RAM instead of R Pi's 512, a CPU that's generations newer and many times faster, and a built-in WiFi.
The Raspberry Pi compares unfavorably with the Mele A1000, and a lot of what's mentioned there applies to comparison against all A10 devices in general.
- What's included
The A10 devics typically come with a nice case, a PSU and some cables, all included in the nice retail box that you get, unlike the Raspberry Pi, where for $35 + shipping you get only the bare board.
- More reasons, see this nice series of videos:
Why not an x86-based machine?
- Power consumption
The A10 consumes about 4 Watts at full load, over 10x less than what would be considered “low-power” for an x86 box.
Before you say “who cares about power consumption, it's not a mobile device” (and perhaps electricity in your area is cheap), consider this. An average UPS will have no problems keeping a 4 Watt device up and running for perhaps tens of hours. So when you have a power cut, you could still have your home network services fully operational for its whole duration, in case you need to connect from e.g. a laptop or a smartphone.
A10 buyer's guide
When choosing an A10-based device, be careful to not accidentally order a device based on a different SoC. Two caveats here:
- There are some clones or “advanced versions” of MK802, based on the Rockchip RK3066 SoC. They carry different model numbers, for example “MK808” or “MK802 IIIs”. For the uninitiated an RK3066 may seem like a better deal, with it being a Dual core 1.6 GHz CPU, and not that much more expensive; but in reality I wouldn't say it is. The reason to avoid it, is a much worse GNU/Linux support situation around the RK3066. As far as I know there is only one GNU/Linux distribution that works on it, called PicUntu; it also uses an old and partially binary-only kernel from Android.
- There is the A10S. It is a cheaper and for now not as well supported variant of the A10 (or actually A13), you should avoid it for time being. So pay attention that the product you get says “A10” and not “A10S” in its description.
USB NICs buyer's guide
Despite the A10 having built-in Ethernet controller, some A10 devices do not feature an Ethernet connection (e.g. the HDMI stick devices like the MK802), so if you need an Ethernet connection, you will need to add an USB adapter for this.
The Linux kernel has a lot of USB NIC drivers included, and generally any USB NIC you try should work; but the ones I personally tried and can recommend are:
- 100 Mbit: MosChip MCS7830: DX, Aliexpress; benchmarks at up to 94 Mbit/sec in
iperf
when used with an MK802. - 100 Mbit: ASIX AX88772A; Aliexpress; the performance seems to be about the same as with the MCS7830, but there's a number of different revisions of this chip, e.g. there's also an AX88772B, which works much worse and has connection drops or various other problems with the current Linux driver.
- 1 Gbit: SMSC LAN75XX; Aliexpress; This one does not list the chip model in its specs, so in theory you might get a revision with a different chip; but as long as the product generally looks the same as the one I linked, I'd say chances of that are pretty low. The device itself works well after a couple of workarounds applied; speeds up to 280 Mbit/sec with an MK802 and 320 Mbit/sec with a Cubieboard.
Beware of buying “just any cheap one”. There is an enormous number of devices which only support USB 1.1 speeds (around 10 Mbit/sec maximum transfer rate).
How do I begin?
If you just got an A10-based device and want to set up some GNU/Linux on it, you can try my Debian minimal "server" image, or choose one of the other available operating systems.