Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

175.1. fwupd-2.1.7

Daemon and client for updating device firmware

Version 2.1.7, release 2
Shelf boot — Everything before userspace: the kernel, microcode, firmware for the host, bootloader and EFI tooling
Phase 42_graphics (Graphics Stack), 63 of 189 in build order
Licence LGPL-2.1-or-later
Homepage https://fwupd.org
Build time 1.5 SBU
Installed size 9.6 MiB in 103 files
Recipe ports/core/boot/fwupd/kpkgbuild

About

fwupd is the daemon and the fwupdmgr client that update device firmware from the LVFS, the Linux Vendor Firmware Service: SSDs, docks, USB peripherals, and system firmware shipped as a UEFI capsule. On KDOS the system bus starts the daemon on first use; nothing supervises it. How a person uses it, and where the capsule goes on the ESP, is in Thunderbolt, phones, smart cards and firmware updates.

Why it is in KDOS

The comment above fwupd and fwupd-snapshot in script/phases/42_graphics/packages.d/boot.txt:

Firmware updates: UEFI, SSDs, docks, peripherals. fwupd-efi is the capsule loader the UEFI plugin boots into, and gnu-efi is what it is linked against.

Sources

Dependencies

Depends on: meson, ninja, pkgconf, python3, python3-jinja2, gettext, glib, libxmlb, libusb, sqlite, curl, zlib, xz, gnutls, polkit, dbus, util-linux, libdrm, libmnl, readline, bash-completion, tpm2-tss, hwdata, modemmanager, libqmi, libmbim, fwupd-efi, elogind.

Required by (3): discover, fwupd-snapshot, kinfocenter.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install fwupd'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/boot/fwupd.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/boot/fwupd
echo '472e9426f7a1b18fa9d199666c15482d4ee51ea35e916ca53bb3ca25919edb10  fwupd-2.1.7.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/fwupd
SRC=$SRC_ROOT/fwupd-2.1.7
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf fwupd-2.1.7.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/esp-mount-path.patch"

meson setup build --prefix=/usr --sysconfdir=/etc --libdir=lib --localstatedir=/var \
	--buildtype=release \
	--wrap-mode=nodownload \
	-Dtests=false \
	-Ddocs=disabled \
	-Dman=true \
	-Dintrospection=disabled \
	-Dsystemd=disabled \
	-Dlogind=enabled \
	-Defi_binary=true \
	-Defi_os_dir=kdos \
	-Dplugin_uefi_capsule_splash=false \
	-Dplugin_modem_manager=enabled \
	-Dpassim=disabled \
	-Dp2p_policy=none \
	-Dumockdev_tests=disabled \
	-Dvalgrind=disabled \
	-Dgnutls=enabled \
	-Dopenssl=disabled \
	-Dpolkit=enabled \
	-Dblkid=enabled \
	-Dlibdrm=enabled \
	-Dlibmnl=enabled \
	-Dreadline=enabled \
	-Dbluez=enabled \
	-Dhsi=enabled \
	-Dbash_completion=true \
	-Dfish_completion=false \
	-Dsupported_build=enabled \
	-Dlvfs=disabled \
	-Dvendor_ids_dir=/usr/share/hwdata
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
rm -rf "$PKG/etc/grub.d"

cat > "$PKG/etc/fwupd/fwupd.conf" <<'EOF'
[fwupd]
# use `man 5 fwupd.conf` for documentation
EspLocation=/boot/efi
EOF
chmod 640 "$PKG/etc/fwupd/fwupd.conf"

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/fwupd, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf fwupd-2.1.7-2.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/fwupd, and runs the triggers its paths call for.

Contents

Installed programs: dbxtool, fwupdmgr, fwupdtool.

Installed libraries: libfwupd.so.

Installed directories: /etc/fwupd, /etc/pki, /usr/include/fwupd-3, /usr/lib/fwupd-2.1.7, /usr/share/fwupd/__pycache__, /usr/share/fwupd/metainfo, /usr/share/fwupd/quirks.d, /usr/share/fwupd/remotes.d/vendor, /usr/share/licenses/fwupd.

Short descriptions

dbxtool modify the dbx revocation list
fwupdmgr firmware update manager client utility
fwupdtool standalone firmware update utility
fwupd.pc fwupd is a system daemon for installing device firmware

Notes