Armbian offers to download images ready to be installed on SD card, but it is also possible to compile oneself the Linux system for many Mini PC card including Orange Pi. In December 2016, the Linux kernel moved to version 4.9 Which will improve the support of the Allwinner SoC (microprocessors) that equip the Orange Pi. It is the association to do the first tests on this branch. We will see how to create a virtual machine using Virtual Box running Ubuntu 16.04 LTS, install the Armbian compilation tools and create an image for an Orange Pi Plus 2e (comparative of the Orange Pi range to read here). It may sound a bit frightening like that, but in fact everything is done by itself after selecting the desired configuration. We owe this work to Igor Pečovnik.
- 1 System Requirements to Compile Armbian
- 2 Create an Ubuntu 16.04 LTS virtual machine
- 3 Find the Terminal
- 4 Installing VirtualBox Tools
- 5 Install Armbian compilation tools
- 6 Compile Armbian (3.x) for an Orange Pi Plus 2e
- 7 Preparing the SD card with Etcher
- 8 Starting on the SD card
- 9 Compiling Armbian with kernel 4.x for Orange Pi
System Requirements to Compile Armbian
To compile Armbian, we are going to need a machine running Linux, Igor advocates Ubuntu 16.04 x64. If you do not have a PC running on Ubuntu, it does not matter, we’ll create one in the form of a virtual machine or a Docker (temporarily). There are therefore several possible solutions
- Ubuntu Xenial 16.04 x64 in a VirtualBox or other virtual machine,
- Ubuntu Xenial 16.04 x64 in a virtual machine that is managed using Vagrant. This is possible but not recommended (read Armbian with Vargant README for more information),
- Ubuntu Xenial 16.04 x64 in a Docker, systemd-nspawn. Also theoretically possible but not recommended.
- Ubuntu Xenial 16.04 x64 on a PC or a server. This is the ideal solution but we do not necessarily want to go into an installation to compile an OS.
- Ubuntu Trusty 14.04 x64 is not recommended,
- 20GB of hard disk space minimum and minimum of 2GB of RAM
You understand, we will create a virtual machine using VirtualBox, a free and open source virtualization software supported by Oracle. On the configuration side, it is better to have a PC or a Mac with at least 4GB of Ram so that it can allocate at least 2 to the virtual machine. For this tutorial, I used a Mac Mini (Late 2012) equipped with an firstname.lastname@example.orgGhz and 4GB of Ram. It is far from being a state-of-the-art machine but I can compile an image in about 30 minutes (after the first compilation that lasts … a few hours because you have to download all the sources and compile all the Linux libraries). This Mac runs under MacOS Sierra (10.12.1). In conclusion, no need to have an overpower machine to get there!
Create an Ubuntu 16.04 LTS virtual machine
Install the version of VirtualBox that corresponds to your machine. The download page can be found here.
Take advantage of it to install the expansion pack to manage USB 2.0 and 3.0 which will allow you to prepare the SD card using Etcher at the end of the creation of the image. Once downloaded, just run the executable to add the extension to VirtualBox.
Then go to retrieve the image of Ubuntu 16.04 Desktop version here. The choice of language is made at the time of installation.
Once recovered, launch VirtualBox and click New
Name the machine, for example Ubuntu 16.04. VirtualBox is able to pre-select the system type and version. Next
Specify 2048MB for the memory size (or more if you want). It is possible to change the amount of memory at any time (when the virtual machine is stopped).
Choose Create virtual hard disk now and then Create.
Choose the type of hard drive. For example the VDI type, the standard format of Virtual Box.
I advise you to create a disk whose size is dynamic, ie it increases as Ubuntu needs. As all sources must be downloaded and compiled, this option is indicated.
Create a virtual hard disk of at least 30GB for more comfort.
Now press Start (green arrow).
In the dialog that opens, specify the path of the Ubuntu image (it is in the downloads folder) and then Start
The Ubuntu installer starts as on a Live CD (ie a version that can be started from a CD or a USB key to test Linux without having to install it). We need to install Ubuntu on the virtual machine, first choose the language of installation then Install Ubuntu.
Choose Clear Disk and install Ubuntu. There’s no need to encrypt the disk.
Choose the keyboard layout. Finally, define your user account. Enter a password (note that the numeric keypad is not active by default). Check Automatically log on.
Press Continue with start installation.
Find the Terminal
If you’re starting out on Linux and Ubuntu, no worries, you’ll quickly find your marks over Windows or MacOS. Ubuntu comes with the office suite LibreOffice, Firefox internet browser, Thunderbird (email), Rhythmbox music … Here we will just need the Terminal!
Installing VirtualBox Tools
To use the SD card directly under Ubuntu, you must install the VirtualBox tools. Go to the VirtualBox Devices menu and select Insert Guest Additions CD Image
A CD Rom is mounted on Ubuntu which offers you to automatically install the software it contains. Accept. Your password will be asked.
Install Armbian compilation tools
Now that Linux is ready, we will be able to install Armbian compilation tools. To do this, execute these commands successively. The first is to add the git command to manage source code from GitHub. The second one allows the Igor project to be retrieved locally.
apt-get -y install git git clone https://github.com/igorpecovnik/lib --depth 1 cp lib/compile.sh .
Compile Armbian (3.x) for an Orange Pi Plus 2e
So I suggest you create an Armbian image for an Orange Pi Plus 2e. The preparation of the system is carried out by the script compile.sh which is launched like this ./compile.sh. It is possible to pass parameters at launch or modify the parameters before launching it by editing the latter with nano.
This is what we will start by doing to change the default language so as to have the system directly in your language (with the exception of the keyboard). Open the sudo nano compile.sh script and go to the DEST_LANG line. Change the value to fr_FR.UTF-8 for example. Save (CTRL + X then Y).
All available parameters are detailed on the official Armbian documentation here. We will not go into all the technical details in this first tutorial.
Now run the build script with the command
The KERNEL_CONFIGURE = YES option lets you choose the kernel branch (optional). It is necessary to grant Root privileges to the script, enter your password.
A short summary of the situation before continuing
Choose OS Image for Installation to SD card
Select your card and model. Be careful not to go wrong because the compilation is long
One can create an image based on Ubuntu Xenial 16.04 LTS (the same as the virtual machine) or Jessie, the Raspbian base of Raspberry Pi.
Finally choose the version server (without desktop) or with Desktop.
It’s gone for the compilation. On my Mac Mini (configuration above), it takes about 30 minutes for the server version and about 70 minutes for the Desktop version. Much of the work is done in the output folder (cache, final image …). At the end of the creation, the image of the system is in the image folder. The image weighs about 1.3GB for the server version and 2.3GB for the desktop version.
Preparing the SD card with Etcher
One can realize the SD card in command line, but Etcher does very well this work with a nice GUI so why make it complicated. Go to the site of resin.io to recover Etcher for Linux x64.
After the decompression, Ubuntu will propose you to install Etcher, accept. Open Etcher from the Ubuntu menu.
Insert the SD card (for example, using a USB flash drive). This must be mounted automatically. If it is not, verify that it was not mounted on the host computer. In this case, check the following points
- Virtual Box Tools have been installed
- The expansion pack that supports USB 2/3 has been installed
- The USB key has been assigned to the virtual machine (in the Device / USB menu)
Select image Armbian
Etcher automatically selects the SD card. If this is not the case, it certainly has not been mounted on the virtual machine. Start the copy. Your password will be requested.
The operation lasts only a few minutes.
After verification, the SD card is automatically disassembled.
Starting on the SD card
So, the system is ready. It only remains to follow this tutorial to complete the configuration (creation of a user, configuration of the keyboard, adjustment of the video output …).
Warning. Like all models in the Orange Pi familly, you may experience display problems on older DVI or VGA monitors. Connect the Orange to a TV. Everything is explained in the tutorial shown above.
And here, Armbian is perfectly functional.
The XFCE4 desktop is installed on the Ubuntu distribution. Many productivity software are already pre-installed
Compiling Armbian with kernel 4.x for Orange Pi
I also tried to compile Armbian for an Orange Pi Lite (Wi-Fi version) and an Orange Pi Plus 2e. If the image creates works perfectly with the stable branch of linux 3.x and 4.4.x, this is unfortunately not the case for the branch in development that interests me. The SD card starts but the OS does not boot. I am entitled to the flashing red LED. The Orange Pi Lite seems for the moment excluded from this branch. If someone has solved the problem, do not hesitate to share your experience in the comments.
In the next tutorial, we will see how to install Armbian on the eMMC memory that equips more and more Mini PC card.
- Install Java 8 on Armbian (Orange Pi Lite or higher)
- Blynk: installing a private local server on Orange Pi under Armbian (Ubuntu 16.04LTS)
- Cayenne: Install the librairie on an Orange Pi under Armbian Jessie
- Install Jeedom on an Orange Pi Lite (or Orange Pi+ 2e) running under Armbian Jessie
- Armbian: How to update the Kernel and test the versions Nightly
- How to build Armbian SD Card image for Orange Pi, Banana Pi, cubieboard …