FOSDEM: A port for BSD from fwupd for firmware updates

Not only mainboards, but a whole range of devices on the PC require new firmware from time to time. Under Linux, the update process was mostly problematic or not possible at all, because manufacturers usually only delivered firmware updates bundled with Windows programs. Meanwhile the situation has changed.

Five years ago, Gnome developers started together with Dell to develop the update tool “fwupd”, which offers hardware manufacturers a standard interface for firmware updates under Linux. The tool retrieves available, suitable updates for detected, supported devices from the Linux Vendor Firmware Service (LVFS), a growing online repository. The response to the project from hardware manufacturers was astonishingly good and there are now over 2400 firmware updates from more than 100 different manufacturers in this directory. The Linux Vendor Firmware Service accessing it was able to break the 20 million downloaded firmware update mark in 2020. According to a talk at FOSDEM 21, a port from “fwupd” will soon make the LVFS updates available for BSD systems as well.

The head behind the planned port from Linux to BSD and behind the talk about Fosdem 21 is Norbert Kamiński, embedded developer at the Polish company 3mdeb, which also creates firmware for hardware manufacturers. Both customers and the BSD community kept asking whether fwupd could run under BSD. Kamiński was already responsible for a special version of fwupd for the Linux-based VM operating system Qubes OS.

There is also a concrete plan to address the port. The first clear goal is to compile fwupd on FreeBSD. Because the large BSD variant can meet most of the dependencies via the package manager.

Systematically address the differences between Linux and FreeBSD: The first goal with porting fwupd is to remove unsatisfiable dependencies and compile the code on FreeBSD.

(Bild: FOSDEM / Norbert Kamiński)

First, the ported fwupd should be enabled to supply connected USB devices with firmware updates. A requirement that has not yet been completely solved is the “libgusb” library, which in turn must first be ported from Linux to the BSDs. Another developer has already done this work independently of the Efforts at fwupd started three years ago. FreeBSD uses the device state change daemon “devd” – and not “udev” as in Linux – for enumerating USB devices, which will also entail some adjustments.

In the second step, updates via the Unified Extensible Firmware Interface (UEFI) are to be added to the capabilities of fwupd. UEFI uses the EFI System Resource Table (ESRT) to provide a list of system components in the system that accept firmware updates.

The listing of components by UEFI requires the support of the running kernel. And so far FreeBSD does not have it and the information is not available that way. Also, on Linux fwupd runs in the background over systemd, but BSD systems use their own traditional init systems with rc.d scripts. According to Norbert Kamiński, these differences will also require some workarounds. In the subsequent question-and-answer chat, which was attached to the recorded talk, the developer has to dispel some doubts. The hope is that fwupd can only be compiled on FreeBSD once the unsatisfiable dependencies are removed.

There is consensus that this port is an important project for BSD and that the LVDF is a treasure, especially since the firmware updates are cryptographically signed. After all has dealt with NLNet also found a foundation that financially supports the port on FreeBSD, OpenBSD, NetBSD, and Dragonfly BSD. The associated, clearly structured slides on Norbert Kamiński’s talk can be found as PDF on the FOSDEM 21 website.


To home page