Building your own Armbian image

Armbian is a Linux distribution for small devices energy efficient devices. It supports a range of devices and is meant specifically for computers and other devices using Arm based processors, which is what most of our cellphones, routers, most IoT devices and other small electronics run nowadays. Many of those devices can boot from a USB drive or microSD card. You can download pre-made Armbian images to install a full desktop linux version on them like any regular computer, or server based images to setup your own webserver, database server or IoT application. For more information on where to download and install them, see the Armbian Documentation. Those images come with a bunch of software already installed and you can add and remove software as you like. But if you need to install the same software very often on the same, or even multiple devices, setting up a device can become time consuming. For that reason, it can be a good idea to make you own custom image, that contains all the software you need. You can then use that image to flash to new microSD cards, every time you need to install a devices, so afterwards it has all the software and configuration you need. This is how we made our own custom IoT image for the Pine64.

If you want to build your own image, there are a bunch of guides out there. The Armbian people did a good job of documenting the process, both in their documentation, and there is also a forum post discussing it and even a youtube movie. The post on DIY project is also a good step-by-step guide. Check those out if you want to build your own custom image.

Here are some additional notes on top of those pages:

If you want to customize the configuration files and installed software in the image, the easiest way is to create a custom script that gets run after the building process is done. The Armbian build process provides for this with "user patches". In the build data, there is a directory called userpatches. If there is a script customize-image.sh in there, this script will be run to modify the image after the kernel has been built. You can put your custom script in there to modify the armbian image. Since Armbian is based on Debian or Ubuntu, commands that work on those distributions should work in the script too. To test your script, the easiest is actually to have a separate regular Debian or Ubuntu virtual machine, and run the script directly on that for testing. If that works, it should also work on Armbian. For more information on the scripts, see the Armbian documentation and our own customization script on Github.

This page is subject to our Disclaimer.