I started looking into a number of devices based on Allwinner A10 SoC — this appears to be a very popular chip in China, and there are endless varieties of cheap tablets and HDMI media players. Among the most known are Mele A1000/A2000, MK802, MK802+, MiniX media players — they all provide HDMI interface, one or two USB ports, and some of them come with a built-in WiFi adapter. The chip also supports OTG USB interface, and some of those devices also provide it. Also MK802 can be powered from the USB port.
Those devices come usually with pre-installed Android 4.0. Typically the OS supports only a limited range of screen resolutions and frequencies (I couldn’t get a decent picture on my Sony Bravia TV and on a computer monitor via a HDMI-to-DVI adapter).
Anyway, I’m a server guy, and my primary interest is in “server” applications, even on such small appliances. So, I don’t really care about graphics.
Jean-Luc Aufranc in his blog pointed to a method to build a “server” image for A10-based devices. It almost works: the “sudo lb build” command is stuck in the middle, and then it requires “sudo lb clean; sudo lb build” in order to finish building the Ubuntu filesystem for ARM CPU. Strange that “sudo lb clean” before building does not help.
Also Jean-Luc has organized nightly builds of Linux kernel for A10 devices. Also there are scripts which format the SD card and install the required kernel and the filesystem.
As Jean-Luc mentioned, MK802 currently fails to boot the image for some reason. Also the device has quite inconvenient way to attach the serial console, so I didn’t go far with this.
Ok, on to the new stuff: I found and ordered another such device from China. It has an Ethernet port, which is quite important for most of my uses. The specs also mention an OTG port, but it doesn’t look like it exists. It took a bit of an effort to open the enclosure, but it was worth it: the board has quite easy (and marked properly!) connectors for attaching the serial console. At 115200 baud, I could easily see the boot log, and the nightly build (mele-a1000-server_hwpack_2012.07.26) kernel has successfully booted.
The boot log is available here.
The filesystem build process still needs some improvement: there are lots of error messages during the boot, and also the SSH daemon cannot find the host keys (for some reasons they were not present in the filesystem). Also the image tries to launch MySQL server, unsuccessfully because of missing files or directories.
The WiFi antenna is quite small in this device. I didn’t yet test the signal quality, but I wouldn’t expect a revolution here.
The device has an SD slot, so you need an microSD-to-SD adapter. Also the card goes into it only half length, so the rest pops out outside the enclosure.
The good thing is that the kernel immediately recognizes the onboard NAND flash and allows writing to it. So, the development plan would be as follows:
- Make an SD card image which boots on most of those devices. It should bring up automatically all available Ethernet ports (built-in and USB Ethernet cards), and also all available WiFi adapters with a predefined SSID and password, and configure the DHCP client on them.
- Ideally, if the device has an OTG port, initialize the gadget driver and emulate a serial port with a TTY attached. This way the device could be managed via a serial terminal without the need to attach the serial console.
- Make a set of scripts which re-format the onboard NAND flash and install the production Linux system on it. This would be most probably Ubuntu because of better hardware support. This should be a minimal instance with SSH daemon, graphics disabled and all RAM available for applications, and the network interfaces and OTG port would be automatically configured as specified above.
- Ideally, this would be the same kernel filesystem as on the SD card. Then the installation script would simply clone the whole running system from SD to NAND.
UPD: PCB pictures
1. The overall view. The UART serial contacts are at the bottom, near the LED
2. The WiFi chip and what they call an antenna