Create Minimal Debian Upstream Images with Debos and Armbian

[Update June 28: Post updated with correct procedure thanks to Collabora help]

Armbian provides lightweight Debian or Ubuntu images for various Arm Linux SBC, and over the years has become the recommended source for stable firmware images for boards part of Orange Pi & Banana Pi families, and others.

Uncompressed images are still over 1GB and come with Armbian-specific tools, kernel and bootloader. If you’d like to leverage Armbian images, but instead create a Debian upstream image with only the packages you intend to use, Collabora explains how to do just that with Orange Pi Zero +2 H5 and Libre Computer AML-S905X-CC (aka Le Potato) boards using Debos Debian OS builder.

Debos Armbian Debian Orange Pi Zero Plus 2 H5

I’ve decided to give a try at the instructions for Orange Pi Zero Plus2 H5 in my laptop running Ubuntu 18.04 to better understand how this all works.

I’ll assume you’ve already installed Docker, and made sure you’ve got it working as a non-root user, so we can install Debos as follows:


Configuration for Debos is made through a YAML files. Collabora has already provided such file for Orange Pi Zero 2+ board: orangepi0p2.yaml. You’ll need to modify it to your version of Armbian as I did below. Note getting the latest version number for Armbian is critical, or the script will fail with something like:


I’ve also added comments explaining a bit more about each sections:


The next command requires KVM for QEMU, and we should run it as normal user:


Logout and login again. Now in theory this command should create  our image:


But sadly, I’ve run into permissions errors, I’ve been unable to fix after a couple of hours:


My username is part of kvm and docker groups:


and the KVM modules are indeed loaded:


I got stuck here, but with Frédéric Danis’ help (see comments below), I could solve the permission issue:


The /recipes/scripts directory is however missing, and that’s because I wrongly assume debos would just need to be feed the yaml file. Instead we also need to get scripts and overlays directories from gitlab, and copy our updated yaml file into debos-armbian2debian/1-ArmbianKernel directory:


Now we can enter the directory, and run the previous command to generate the minimal image:


After a few minutes, the image should be generated:


You’ll find it in the working directory:


Now you can flash the image to your SD card as follows:

Support CNX Software - Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples
Subscribe
Notify of
guest
19 Comments
oldest
newest most voted
Advertisements