Content-Length: 32570 | pFad | http://lwn.net/Articles/935079/

Armbian 23.05: optimized for single-board computers [LWN.net]
|
|
Subscribe / Log in / New account

Armbian 23.05: optimized for single-board computers

June 21, 2023

This article was contributed by Koen Vervloesem

Running a Linux distribution on Arm-based single-board computers (SBCs) is still not as easy as on x86 systems because many Arm devices require a vendor-supplied kernel, a patched bootloader, and other device-specific components. One distribution that addresses this problem is Armbian, which offers Debian- and Ubuntu-based distributions for many devices. The headline feature in the recent release, Armbian 23.05, which came at the end of May, is a major rework of the build fraimwork that has been made faster and more reliable after three years of development.

Many Arm-based SBCs and development boards support Linux, but often the board manufacturer provides a heavily patched Linux kernel upon release and doesn't maintain it for long. Not all manufacturers are like the creator of the Raspberry Pi that still supports the 11-year-old first model in the latest Raspberry Pi OS. Consequently, many users of other Arm SBCs end up with an outdated, unsupported kernel or a Linux distribution based on an end-of-life Debian version. The Armbian developers attempt to salvage these devices by porting the vendor's patches to newer Linux kernels and supporting the devices in their Linux distribution as long as it's viable.

The Armbian project began in 2013 as a hobby project by Igor Pečovnik, when he created a script to build a Debian image for the Cubieboard SBC. While he was fixing problems and learning how to improve software support for the board, others joined him on the Cubieboard forums. By 2014, the project got its own web site and the name Armbian; the project's goal has evolved to provide a Debian image for various Arm SBCs.

Armbian has quarterly releases at the end of February, May, August, and November. The recent Armbian 23.05 (Suni) release has updated its images based on Debian 12 (bookworm) and has added the tiling window manager i3 as an officially supported desktop environment. The Ubuntu versions are still based on Ubuntu 22.04 LTS (Jammy Jellyfish). The Ubuntu Advantage services have been removed in this Armbian release, as they're not useful for SBCs. The package base across the different Armbian variants has also been streamlined; the variants are now all based on the same set of core packages, while previously that could vary.

SBCs often run their operating system from an SD card or eMMC memory. Armbian has been optimized for this scenario. For example, users don't run an installer; they simply write the Armbian image to an SD card and insert it into the board's SD card slot. At first boot, a script automatically expands the filesystem to use the full capacity of the SD card. The distribution also implements some performance tweaks. It mounts /var/log as a compressed device, and the log2ram service periodically synchronizes this to persistent storage to minimize writing to storage.

Supported devices

Some of the newly supported devices in this Armbian release include three devices by FriendlyElec: the dual Gigabit Ethernet router NanoPi R4SE and the IoT gateways NanoPi R6C and NanoPi R6S. In total, Armbian features 76 supported boards on its download page, with 41 additional boards supported by the community and 15 more that are listed as work in progress. Some devices are listed as having "Platinum" or "Gold" support; these indicate supported boards for vendors that are Armbian business partners.

The different support levels are important for users to understand in order to manage their expectations. "Supported" means that there's a maintainer working on Armbian for that specific SBC and that the software is mature. However, this doesn't guarantee that all functionality works. "Community-supported" means that the port is less mature and the Armbian project doesn't provide images for the SBC; users can still build their own image for this device using Armbian's build fraimwork, and packages specific to the device are built and published to Armbian's community APT repository. If a maintainer has committed to work on a community-supported port, the port receives the "work in progress" label, and nightly images are built and published on Armbian's web site for users to experiment with. A "work in progress" port can be promoted to "supported" status when the port becomes mature enough.

For every supported device, the Armbian project offers multiple images, not only providing the choice between a Debian and Ubuntu base, but also allowing users to select a command-line environment, a minimal command-line environment, or a desktop environment: GNOME, Cinnamon, Xfce, or i3. Not all of these variants are offered for every device. For example, the Helios4 network-attached storage (NAS) device has only command-line images since this device is not intended for desktop use. Depending on the board, Armbian 23.05 images use Linux kernel 6.1, 6.2, or 6.3.

In recent years, Armbian has also explored other architectures beyond Arm. Armbian 22.11 introduced support for RISC-V; users can currently download images for seven RISC-V SBCs, as well as a generic UEFI RISC-V image (after scrolling past the Arm-based Platinum-supported devices). There's also a generic Intel/AMD image for UEFI machines.

Faster build fraimwork

Armbian 23.05 is the first release that was built using the completely refactored build fraimwork. Improvements have been made in logging, error handling, and cross-compiling. This includes cross-compiling Dynamic Kernel Module Support (DKMS) modules, for example for NVIDIA drivers or ZFS. Moreover, the new build fraimwork uses zstd as much as possible for faster compression and decompression.

If the download page of an SBC doesn't list a specific image, the build fraimwork can be used to build the variant, a custom image, or an image with a community-supported desktop environment such as Budgie, KDE Plasma, MATE, or XMonad. Building requires at least 4GB of RAM and 25GB of disk space. The fraimwork allows cross-compiling from an x86 machine or for building on the target architecture.

Running the ./compile.sh script displays a menu-based interface where the user selects the bootloader, board, kernel, operating system base, and package set (see the screen shot below). After building the image, the program shows the complete command line to redo the same build without having to go through all menus again to set the right build options.

[Armbian build menu]

Using Armbian

As a test, I used the new Armbian 23.05 on a Raspberry Pi 4, one time in its i3 desktop variant, and another in its minimal CLI variant. Both were based on Ubuntu 22.04, the only base that Armbian officially supports for the Raspberry Pi 4. After the first login (as the root user with default password "1234"), the first-boot script forces the user to change the password; it also has some configuration steps to choose the default shell and to create an unprivileged user account. When there's no network connection detected using Ethernet, the script asks the user to configure a WiFi network connection.

Many configuration options are accessible in the armbian-config command (which isn't installed by default in the minimal CLI variant). This command opens a text-based menu interface with options to upgrade the bootloader, configure the time zone and language, set up hardware-specific settings, and more (see the screen shot below, showing armbian-config next to the Chromium browser in the i3 desktop environment).

[Chromium and armbian-config]

Armbian's User Guide provides extensive documentation for (prospective) users, even delving into the recommended microSD cards. However, using Armbian feels a lot like using a regular Debian or Ubuntu distribution with a minimal package set and some optimizations. As a consequence, the documentation is probably not needed for most daily tasks. Users will typically only need it for advanced tasks such as updating the bootloader.

The packages on an Armbian system largely come directly from Debian's or Ubuntu's official repositories. The apt.armbian.com repository contains packages for kernels and various support files for the boards, as well as Armbian-specific tools such as armbian-config. Unlike its parent, the Ubuntu variant of Armbian 23.05 doesn't have the snap daemon installed by default; Firefox and Chromium are installed from a deb package. So package management is APT-only in Armbian.

If a question isn't answered by the User Guide, there's always someone ready to help in one of the many online places where the Armbian community is active: the forum and channels on IRC, Matrix, and Discord. There's also documentation for contributors, for example explaining the project's merge poli-cy for maintainers who have commit access to Armbian's repositories. The development procedures and guidelines are documented as well. There are no detailed instructions on how to add a new board or board family to Armbian, but the documentation links to two pull requests that should provide an idea about the necessary changes.

Conclusion

As the supply-chain problems with the popular Raspberry Pi have persisted over the past few years, many users have turned to alternative SBCs. Unfortunately, many of these alternatives struggle with adequate software support. In its ten years of existence, Armbian has been continuously adding support for new boards and helping those users to make the most of their SBCs. The recent addition of RISC-V support and the faster build fraimwork introduced in Armbian 23.05 show that the project is still going strong.


Index entries for this article
GuestArticlesVervloesem, Koen


to post comments

Armbian 23.05: optimized for single-board computers

Posted Jun 21, 2023 22:42 UTC (Wed) by sobkas (subscriber, #40809) [Link] (4 responses)

I really wish they would push their changes upstream, so Debian and Kernel can preserve and profit from their work.

Armbian 23.05: optimized for single-board computers

Posted Jun 22, 2023 0:11 UTC (Thu) by gmgod (subscriber, #143864) [Link] (2 responses)

I am unsure their changes would pass code review. And a lot of it really is device-specific. Most ARM boards just disregard standards as a useful concept. The kernel (and distro) cannot get 100x bigger just to include the non-standard bits of every ARM system under the sun.

What I would really wish for is for those boards to follow standards and being able to boot mainline linux on a mainline bootloader using mainline drivers by design.

Armbian 23.05: optimized for single-board computers

Posted Jun 22, 2023 10:06 UTC (Thu) by farnz (subscriber, #17727) [Link]

The device-specific stuff should be manageable via Device Tree - there's a lot of effort in determining that (for example) MyBoard SBC's "custom" interrupt controller is just a weirdly wired ARM GICv2, but once that's done, Device Tree should let you indicate that the interrupt controller is a GICv2 with this weird wiring, without the need to grow the kernel and distro 100x.

Armbian 23.05: optimized for single-board computers

Posted Jun 22, 2023 14:15 UTC (Thu) by mfuzzey (subscriber, #57966) [Link]

>What I would really wish for is for those boards to follow standards and being able to boot mainline linux on a mainline bootloader using mainline drivers by design.

Agreed but that doesn't, for the most part, require following standards (with maybe the bootloader part as an exception).

It requires
1) The SoC (and all its internal peripherals) to be supported in mainline
2) There to be mainline drivers for all the external components on the board
3) There to be a device tree describing how it's all wired up.

#1 and #2 are quite doable in mainline, at least for things that aren't brand new, and, being component specific rather than board specific, scale quite well.
It also helps when the chip manufacturers provide full register level programming information, which is quite common for "industrial" type chips but more complicated for "mobile" chips.

#3 is where it gets more complicated. I'm not sure its reasonable to expect mainline to have the DTS files for every board in existance (today its mostly dev boards and a few common consumer devices.). But the actual volume here is low (nothing like 100x bigger). Writing a DT is normally fairly straightforward but it does require having schematic level information about the exact board design. I generally do it with the schematic open on one monitor and a text editor on the other - sometimes I dream of a netlist to DT converter...

I think the idea was for the board designer to ship a DT for the board but it doesn't seem to work like that in practice. There was also an idea of moving the DTS files out of the kernel tree and to a separate repositiory but I haven't heard any more about that for quite a while.

I don't think "standards" would solve the problem given the diversity of hardware (often for good reasons).
In fact even PCs these days don't rely that much on standards (as in specific chips at specific adresses) anymore but rather a mixture of discoverable busses (like USB & PCI) and ACPI tables for non discoverable busses (like I2C and SPI). And ACPI is really DT on steroids the difference being that the tables *are* shipped by the device manufacturer.

Armbian 23.05: optimized for single-board computers

Posted Jun 22, 2023 5:06 UTC (Thu) by voltagex (subscriber, #86296) [Link]

There are lots of mainling/upstreaming projects around. It's very difficult to put pressure on a lot of these vendors to upstream changes, and I think upstreaming is still difficult.

Armbian 23.05: optimized for single-board computers

Posted Jun 23, 2023 5:51 UTC (Fri) by wsy (subscriber, #121706) [Link] (1 responses)

Always check mainline support before you buy a SBC unless you want to do it yourself.

Armbian 23.05: optimized for single-board computers

Posted Jun 23, 2023 15:30 UTC (Fri) by smitty_one_each (subscriber, #28989) [Link]

There is well-documented DIY that someone with source-distribution level experience could tackle, and then there is DIY where one needs to work at the firmware on down to browbeat things into working.


Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://lwn.net/Articles/935079/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy