A friend just sent me two Cubieboard2 development boards. These little devices are slightly larger than a credit card and are similar to the well-known Raspberry Pi series of miniature computers.
The Cubieboard2s have the following specs:
- Allwinner A20 dual-core 1GHz SoC
- Mali-400MP2 GPU (1 vertex core, 2 fragment cores)
- 1GB RAM
- 2x USB
- microSD slot with support for <=32GB cards
- 4GB embedded NAND flash
- HDMI out
- Standard headphone/microphone jacks
All in all, a pretty nice set of hardware squeezed into a tiny device.
The Cubieboard2 is supposed to come with Android 4.x on its NAND, but since these devices are used, the NAND was wiped. No problem; I opted to install Cubian X1, a set of Cubieboard support packages on top of an ARM Debian build, onto a 32GB microSD card. I wanted to see if I could use the tiny Cubieboard2 as a replacement for my power-hungry desktop, so I decided to install the full desktop version, which comes with LXDE.
Installation is easy using the standard Linux tool dd on another computer. Connect the microSD card to your computer using a card reader and run the following commands, replacing sdX with the proper device letter for your microSD card:
dd if=/path/to/cubieboard.img of=/dev/sdX bs=4k sync
Getting the boards to boot proved to be more difficult. The first board I tried froze at different places during bootup, only occasionally getting to the login screen. Thinking it was a bad microSD card, I tried another card–same problem. I also tried the 2nd Cubieboard and got the same results; Cubian hung on boot.
Some Google sleuthing yielded this page, which describes a fix. Most (all?) Allwinner devices use a binary file called script.bin to initialize the board, setting things like core voltages and memory speeds. Apparently the released version of Cubian X1 optimistically tries to set voltages towards the low end of the usable range on the A20 SoC, and marginal units will sometimes hang or otherwise misbehave. The solution is to patch the file using slightly higher voltages (25-50mV higher core and memory voltages). I used the provided precompiled file and dropped it into /boot using a microSD card reader, and the problems were gone.
If you have a unit that is misbehaving, you can also decompile the script.bin file yourself and apply the changes. To do so, you’ll need to set up sunxi-tools. Follow the directions on the page to set up the tools, then run bin2fex on script.bin to decompile it to a .fex text file. Apply the patch, blob the .fex file back up with fex2bin, and drop the file back in /boot.
Stay tuned for future posts on getting the Lightweight Java Game Library to run on the Cubieboard!