Compile Armbian for Pi, Pi, CubieBoard Banana Orange… [Exclusive Guide]

2:21 pm March 3, 201710134

Armbian proposes to download images lend to be installed on SD card, but it is also possible to compile yourself Linux for many Mini PC system map including the Orange Pi . In December 2016, the Linux kernel is passed to the version 4.9 which will improve management of SoCs (microprocessors) Allwinner fitted to the Orange Pi. It is the association to make 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 build Armbian tools and create an image for a Orange Pi Plus 2 (comparison of the range Orange Pi to read here ). It may seem a little scary like that, but in fact everything happens only after selecting the desired configuration. We need this work at Igor Pečovnik .

to compile Armbian, we will need a machine running Linux, Igor recommends Ubuntu 16.04 x 64. If you have a PC running on Ubuntu, it’s okay, we’ll create one in the form of a virtual machine or a Docker (temporarily). There are so many possible solutions

you understood, let’s create a machine free and virtual with VirtualBox virtualization Open Source software supported by the Oracle Corporation. Cot configuration, it is best to have a PC or a Mac with at least 4GB of Ram to allocate at least 2 virtual machine. For this tutorial, I used a Mac Mini (Late 2012) equipped with an [email protected] and 4 GB of Ram. It’s far from being a State of the art last machine but I can compile an image in about 30 minutes (after the first compilation that… a few hours because you have to download all sources and compile all the Linux libraries). The Mac running macOS Sierra (10.12.1). In conclusion, no need to have a machine overkill to get there!

install the version of VirtualBox that matches your machine. The download page is here .

virtualbox

take the opportunity to install the expansion pack to manage the USB 2.0 and 3.0 that allows you to prepare the SD using etch at the end of the creation of the image. Once download, just run the executable to add the extension to VirtualBox.

then go to retrieve the Ubuntu Desktop version 16.04 image here . The language is chosen at installation time.

one time recovered, start VirtualBox and click New

virtualbox installation ubuntu 16.04 lts

name the machine, for example Ubuntu 16.04. VirtualBox is capable of pre-select the system type and version. Do next

virtualbox installation ubuntu 16.04 lts

specify 2048Mo for the size of the memory (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 a virtual hard disk now and create .

virtualbox installation ubuntu 16.04 lts

choose the type of hard drive. For example type VDI, the standard format of Virtual Box.

virtualbox installation ubuntu 16.04 lts

I advise you to create a disk that is dynamic, IE it increases as the needs of Ubuntu. As all sources must be downloaded and compiled, this option is perfect.

virtualbox installation ubuntu 16.04 lts

create a virtual hard disk of at least 30GB for more comfort.

virtualbox installation ubuntu 16.04 lts

now press start (green arrow).

in the dialog that opens, enter the image path Ubuntu (it is in the downloads folder) then Start

virtualbox installation ubuntu 16.04 lts

the Ubuntu Installer starts as on a Live CD (IE a version that you can boot 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 to install Ubuntu installation then .

virtualbox installation ubuntu 16.04 lts

choose wipe the drive and install Ubuntu . You don’t have to encrypt the drive.

virtualbox installation ubuntu 16.04 lts

choose the layout of the keys of the keyboard

virtualbox installation ubuntu 16.04 lts

finally set your user account. Enter a password (careful, the keypad is not active by default). Check login automatically .

virtualbox installation ubuntu 16.04 lts

press continue to start the installation.

virtualbox installation ubuntu 16.04 lts

If you are new to Linux and Ubuntu, don’t worry, you will quickly find your bearings compared to Windows or macOS. Ubuntu comes with the suite desktop LibreOffice, the internet browser Firefox, Thunderbird (email), Rhythmbox music… Here, we just need the Terminal!

virtualbox installation ubuntu 16.04 lts terminal

to be able to use the SD card directly on Ubuntu, you need to install the VirtualBox tools. Go to the menu Devices in VirtualBox and select Insert Guest Additions CD Image

a CD Rom is mounted on Ubuntu which offers to automatically install the software it contains. Agree. You will be asked your password

virtual box installation outils guest tools

now that Linux is ready, we will be able to install the build of Armbian tools. To do this, run these commands successively. The first is to add the git command that can manage codes sources from GitHub. The second allows to recover local project of Igor.

I propose therefore to create an image Armbian for a Orange more 2nd IP. The preparation of the system is carried out by the compile.sh script that launches it like this . / compile . sh . It is possible to pass parameters to the launch or change settings before launching by editing with nano.

that’s what Let’s start to change the language by default so that you have directly the French system (with the exception of the keyboard). Open the script sudo nano compile . sh and go to the line DEST_LANG . Replace the value with en_US. UTF-8 . Save (CTRL + X then Y).

all available parameters are detailed on the official documentation of Armbian here . We won’t get into all the technical details in this tutorial first.

now, run the script to compile with the command

KERNEL_CONFIGURE = YES option to choose the branch of the kernel (optional). It is necessary to grant Root privileges to the script, enter your password.

armbian build start compile

a small summary of the situation before you continue

armbian build compilation

choose OS Image for Installation to SD card

armbian build compilation image sd u-boot

select your card and the model. Attention to can’t go wrong you because compiling is long

armbian build compilation choix carte board

you can create an image based on Ubuntu Xenial 16.04 LTS (the same as the virtual machine) or Jessie, the basis of Raspbian of the Raspberry Pi

armbian build compilation jessie xenial ubuntu

Finally choose the server (without a graphical desktop) version or Desktop (desktop)

armbian build compilation server desktop

it is left for compiling. On my Mac Mini (above configuration), it takes about 30 minutes for the version server and about 70 minutes for the Desktop version. A large part of the work is done in the file output (cache, image…). At the end of the creation, the image of the system lies in the image folder. The image weighs about 1.3Go for the server version and 2.3Go for the desktop version.

armbian creation image terminee

you can make the SD card order online, but Etcher does very well this work with a nice graphic interface then why make it complicated. Retrieve Etcher for Linux x 64 here .

after the decompression, Ubuntu will offer you to install etch, agree. Open Etcher from the Ubuntu menu.

insert the SD card (using a USB, for example). It must be mounted automatically. If this is not the case, check that it for not been mounted on the host computer. In this case, check the following

  • the Virtual Box tools have been installed
  • the expansion pack that supports USB 2/3 for been installed
  • the USB for been assigned to the virtual machine (in the Device menu / USB)

select the Armbian image

armbian gravure etcher selection image

Etcher automatically selects the SD card. If this isn’t the case, which for certainly not been mounted on the virtual machine. Run the copy. You will be asked for your password.

armbian etcher authentification necessaire

the operation only takes a few minutes.

armbian preparation carte sd etcher en cours

after the audit, the SD card is automatically dismounted.

that is, the system is ready. This tutorial just to follow to complete the Setup (creating a user, keyboard layout, setting the video output…).

attention. Like all models in the range Orange Pi , you may encounter display problems on older DVI or VGA monitors. Connect the Orange to a TV. Everything is explained in the above tutorial.

Armbian’s perfectly functional.

armbian orange pi plus 2e build linux sd card image
click to enlarge

the XFCE4 Office that is installed on the Ubuntu distribution. Many productivity software are already pre-installed

logiciels installes armbian ubuntu xfce

set up the system in French

by changing the parameter DEST_LANG, the system is partly in French. We have some adjustments to make. Open the menu Applications then parameters and finally languages support. Ubuntu made a check and offers to install the language packs. It’s normal, the script did not recover all the language at the time of the compilation of the image packs. Agree.

ajout support de langue

when the installation is complete, choose French in the list and press apply to the entire system. Now all the messages, buttons, menus will be in french.

set the keyboard for french

open the menu Applications then parameters and finally keyboard . Go to the layout tab. Click Add at the bottom of the box and choose French in the list

armbian choix francais clavier

use the arrow to move the french in the first position. The keyboard is now configured in AZERTY.

I also tried to compile Armbian for a Orange Pi Lite (Wi – Fi version) and an Orange Pi Plus 2. If the image creates works perfectly with the stable branch for linux 3.x and 4.4.x, is unfortunately not the case for the branch under development that interests me. The SD card starts but the OS doesn’t boot not. I get the flashing red Led. The Orange Pi Lite seems for the moment excluded from this branch. If someone for solved the problem, feel free to share your experience in the comments.

in the next tutorial, we’ll see how to install Armbian on memory eMMC which equips more Mini PC card.