Previously in this series, we investigated building and running a minimal linux server on the Allwinner A80 Optimusboard. While that was a great exercise in learning about the A80 and its SDK, the output of that work was not all that useful. Additionally, we were still missing major hardware components such as ethernet, wi-fi, and NAND. More recently, the pcDuino team released both a Fedora and a Lubuntu beta image for the pcDuino8 board (recently renamed Arches). Their Lubuntu build is made up of two pieces: a kernel image and a rootfs image. The kernel image is 3.4.39, and it simply boots the board and then points over to the rootfs. However, they utilized an older Lubuntu 12.10 image, which also inherently provides the LXDE desktop, neither of which is optimal when looking to deploy a server.
To build an ideal microserver, we really needed a bare minimum Ubuntu LTS system. Thus, we kept the 3.4.39 kernel they provided, but we swapped in a freshly built Ubuntu 14.04 LTS file system created by mk-sbuild. There is no window manager, no video acceleration, and no packages above and beyond what is needed to bring up the system. It is up to the user to install whatever software they want, whether that is a LAMP stack, nodejs, ruby, FTP, DNS, Gnome, VNC, etc, etc.
Here is how to make use of this image:
First and foremost, you’ll need to download 3 files that we are going to use. One file will be used by LiveSuit, and the other 2 files we are going to place on a microSD card. Here are our downloads:
- optimusboard-a80-ubuntu-kernel-20141008.img (credit for this goes to the pcDuino team)
- update.sh script (credit for this also goes to the pcDuino team)
- ubuntu-trusty-arm-mininodes-20141227.img.gz (our newly built rootfs)
After they are finished downloading, we need to uncompress the ubuntu-trusty-arm-mininodes-20141227.img.gz image file.
gzip -d ubuntu-trusty-arm-mininodes-20141227.img.gz
Next, copy update.sh and ubuntu-trusty-arm-mininodes-20141227.img to a microSD card and then set it aside, we’re going to need it later in the process.
Now, we are ready to start. First, load LiveSuit and select the kernel file so that it is ready to format / flash when the board is powered up.
Next, we need to connect the serial cable to the Optimusboard, open up a screen session (or use Putty if on Windows), and apply power. Quickly press any key to interrupt its boot process and drop to the u-boot shell. Type ‘efex’ (without the quotes) and press Enter.
LiveSuit will now find the board, and flash the kernel to the NAND (/dev/nanda to be exact). It only takes a moment, because we are simply flashing the kernel at this point.
Once finished, the Optimusboard will reboot itself, and attempt to boot, but it fail with an error of “No valid rootfs found”. Now it is time for the micro SD card.
Place the micro SD card in the slot, and the board will recognize that it contains an update.sh file. It will immediately begin copying the contents of ubuntu-trusty-arm-mininodes-20141227.img to the NAND (/dev/nandd).
After approximately 5 minutes it will finish copying the data, and we can safely remove the SD card.
Once it’s removed, press the Reset button on the Optimusboard, and we should now boot up cleanly, and after a moment arrive at an Ubuntu login prompt. The default username / password combo is ubuntu / ubuntu.
The build script only gets us to a minimal working state, so, let’s finish bringing the system all the way up and prepare it for use. First, lets expand the filesystem to use all of the available space on the NAND (roughly 8gb):
Then to verify the results:
Obviously we’ll want to change the passwords, for security purposes:
Finally, lets bring up the ethernet port and grab a DHCP ip address, so we can access the internet.
ifconfig eth0 up
If all goes according to plan, you should now have a minimal Ubuntu 14.04 LTS ARMv7 install running on your Allwinner A80 Optimusboard! From here, you can customize the system to best suit your needs!