Appendix — Userspace tooling reference¶
What this is. Throughout the book, chapters reach for
bluetoothctl,nmcli,gst-launch-1.0,alsamixer,wpa_supplicant,i2c-tools,mosquitto-clients,tcpdump,iperf3,gpsd,chrony,libnfc,mtd-utils,gdbserver, … without saying where they come from. They come from whatever rootfs you built or chose. This appendix collects every tool referenced anywhere in the book and tells you how to install it on the three rootfs paths.TL;DR. During learning, use Ubuntu-base (Ch 35A) and
apt install .... When you ship, use Buildroot (Ch 35) and flip the corresponding Kconfig flag. BusyBox-only (Ch 31) does not have most of these.
A.1 Three rootfs paths, briefly recapped¶
Rootfs |
Size |
Get tools by |
Best for |
|---|---|---|---|
BusyBox hand-built (Ch 31) |
~3 MB |
hand-cross-compile each tool; mostly not worth it |
“Hello, world” + learning the boot pipeline |
Buildroot (Ch 35) |
30–80 MB |
|
Production shipping |
Ubuntu-base (Ch 35A) |
~600 MB |
|
Learning, prototyping, dev kit |
The choice is not permanent. Many teams develop a feature on Ubuntu-base, validate, then port the same configuration to Buildroot for the shipping image.
A.2 Why BusyBox-only doesn’t get you very far¶
BusyBox is one binary with ~240 applets (ls, sh, mount, ip, mdev, …). It covers the GNU coreutils + a slice of net-tools + sysvinit. What it does not contain is anything specialised: no alsa-utils, no bluez, no gstreamer, no chrony, no gdbserver. The applet list is fixed at compile time. Adding bluetoothctl to a BusyBox-only system means cross-compiling BlueZ separately and installing it next to BusyBox — which is what Buildroot does for you with one Kconfig flag.
Reach for BusyBox-only when the goal is to understand what an init does and what a rootfs minimum looks like. Once you want to do something with hardware (audio, BT, WiFi, modem, GPS, …) you need either Buildroot or Ubuntu-base.
A.3 Tool index — every name used in this book¶
For each tool: what it is, chapters that use it, Ubuntu-base install, Buildroot Kconfig, and a short note.
Networking + iproute2¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
52, 55C, 91–94, 102, 108, 115 |
preinstalled |
|
|
24, 52, 91–93 |
preinstalled / |
|
|
various |
|
|
|
91–94, 102 |
|
|
|
24, 52, 102, 108, 115 |
|
|
|
52, 55E, 91–94, 115 |
|
|
|
52, 115 |
|
|
|
52, 102, 120 |
preinstalled |
|
|
24, 31, 35A |
|
n/a (host-only) |
|
24, 26 |
|
n/a (host-only) |
WiFi + wireless¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
55E, 91–94 |
|
|
|
91–94 |
|
|
|
91 |
|
|
|
91 |
preinstalled |
|
|
91 |
preinstalled (deprecated, merged into kernel) |
typically not needed on modern kernels |
WiFi firmware blobs |
91–94 |
|
|
Bluetooth¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
BlueZ stack ( |
95–97 |
|
|
|
95–97 |
bundled with bluez |
bundled |
|
95–97 |
|
|
|
97 |
|
|
Pre-built BT firmware |
95–97 |
|
per-chip firmware package |
Cellular (modems)¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
24, 55F, 103 |
|
|
|
55F, 102 |
|
|
|
55F, 102 |
|
|
|
55F, 102 |
|
|
|
107 |
|
|
|
102 |
not in apt; build from NXP/Quectel repo |
not in mainline Buildroot |
Audio (ALSA, PulseAudio, GStreamer)¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
53, 78, 89, 90 |
|
|
ALSA libraries ( |
53, 89, 90 |
preinstalled / |
|
|
optional (Ch 53 sidebar) |
|
|
|
optional (Ch 53 sidebar) |
|
|
|
54B, 87, 88 |
|
|
GStreamer plugins (base/good/bad/ugly) |
54B, 87, 88 |
|
|
|
54B, 87 |
|
|
GPIO / I²C / SPI / sensors / IIO¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
18B, 44, 78, 99, 111 |
|
|
|
18, 46, 64–117 (most cookbook) |
|
|
|
47 |
|
|
|
45, 55G, 86, 106 |
|
|
|
86 |
|
|
|
86 |
|
|
IIO sysfs ( |
all sensor chapters |
kernel-provided; no userspace install |
kernel |
|
various |
|
|
Storage / filesystem / flash¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
54A, 64 |
|
|
|
54A |
bundled with |
bundled |
|
19, 31, 121 |
preinstalled |
|
|
19, 31, 35B |
preinstalled |
|
|
121, 125 |
preinstalled |
|
|
124 (sidebar) |
|
|
|
124 |
bundled with cryptsetup |
bundled |
|
35B |
n/a |
kernel |
Time + NTP + PPS¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
107, 117 |
|
|
|
117 |
|
|
|
107 |
|
|
|
18C, 117 |
preinstalled (util-linux) |
|
CAN / RS-485 / industrial¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
55C, 110 |
|
|
|
55C, 110 |
|
|
|
108 |
|
|
|
108 |
|
|
Identification / NFC / Fingerprint¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
105 |
|
|
|
105 |
|
|
|
105 sidebar |
|
not in mainline Buildroot |
|
106 |
|
|
|
106 |
|
|
Smart-home / mesh / IoT¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
100, 114, all MQTT examples |
|
|
|
as above |
|
bundled when mosquitto enabled |
|
100 |
Node 18+: |
non-trivial; usually run from a separate container |
OpenThread Border Router ( |
100 |
build from |
non-trivial; typically self-built |
|
100 |
build from |
non-trivial |
Debug / tracing / profiling¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
|
118, 120, 125A |
|
n/a (host-only) |
|
120, 125A |
|
|
|
120 |
|
|
|
120 |
|
|
|
120 |
|
|
|
120 sidebar |
|
|
|
119 |
|
|
|
119 |
|
|
|
120 |
bundled with systemd |
requires systemd init |
OpenOCD (host) |
118 |
|
n/a (host-only) |
Build infrastructure (host)¶
Tool |
Chapters |
Ubuntu-base (host) |
|---|---|---|
Cross toolchains ( |
3, 6, 122 |
Arm GNU Toolchain tarballs installed under |
|
122 |
|
|
25, 122 |
|
|
27, 27A |
|
|
11, 19, 23 |
|
|
35A |
|
|
35A |
|
|
3, 8, 24, 121A |
|
OTA / images / production¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
RAUC ( |
125 |
|
|
SWUpdate |
125 |
build from source (sbabic/swupdate) |
|
Mender ( |
125 |
|
|
|
125 |
|
|
|
123A |
bundled with Yocto / bitbake |
n/a |
Secure boot / TEE¶
Tool |
Chapters |
Ubuntu-base |
Buildroot |
|---|---|---|---|
NXP CST (Code Signing Tool) |
124 |
download from NXP site; non-redistributable |
not in Buildroot |
|
124 |
preinstalled |
|
OP-TEE ( |
124 |
build from |
|
|
124 |
from NXP CST tarball |
not in Buildroot |
A.4 Quick-start “install everything” cheat sheets¶
Ubuntu-base one-liner¶
For a learning dev kit (any chapter in the book usable after this):
sudo apt update
sudo apt install -y \
i2c-tools spi-tools gpiod libgpiod-dev \
alsa-utils libasound2-dev \
gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
v4l-utils libv4l-dev \
bluez bluez-tools \
wpasupplicant iw hostapd wireless-regdb \
network-manager modemmanager libqmi-utils libmbim-utils \
ppp \
gpsd gpsd-clients pps-tools chrony \
can-utils libsocketcan-dev libmodbus5 libmodbus-dev \
libnfc-bin libnfc-dev neard \
fprintd libfprint-2-2 \
mosquitto mosquitto-clients \
mtd-utils dosfstools parted cryptsetup \
iperf3 tcpdump ethtool \
gdb-multiarch gdbserver strace ltrace valgrind \
trace-cmd \
rauc casync \
device-tree-compiler u-boot-tools
That’s about 400 MB of additional disk on the target. Drop the lines you don’t need.
Buildroot Kconfig fragment¶
Drop into your configs/myboard_defconfig (or merge via make menuconfig):
BR2_PACKAGE_I2C_TOOLS=y
BR2_PACKAGE_LIBGPIOD=y
BR2_PACKAGE_LIBGPIOD_TOOLS=y
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_LIB=y
BR2_PACKAGE_GSTREAMER1=y
BR2_PACKAGE_GST1_PLUGINS_BASE=y
BR2_PACKAGE_GST1_PLUGINS_GOOD=y
BR2_PACKAGE_GST1_PLUGINS_BAD=y
BR2_PACKAGE_V4L_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_IW=y
BR2_PACKAGE_HOSTAPD=y
BR2_PACKAGE_NETWORK_MANAGER=y
BR2_PACKAGE_MODEM_MANAGER=y
BR2_PACKAGE_LIBQMI=y
BR2_PACKAGE_LIBMBIM=y
BR2_PACKAGE_PPP=y
BR2_PACKAGE_GPSD=y
BR2_PACKAGE_PPS_TOOLS=y
BR2_PACKAGE_CHRONY=y
BR2_PACKAGE_CAN_UTILS=y
BR2_PACKAGE_LIBSOCKETCAN=y
BR2_PACKAGE_LIBMODBUS=y
BR2_PACKAGE_LIBNFC=y
BR2_PACKAGE_NEARD=y
BR2_PACKAGE_FPRINTD=y
BR2_PACKAGE_MOSQUITTO=y
BR2_PACKAGE_MTD=y
BR2_PACKAGE_DOSFSTOOLS=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_PARTED=y
BR2_PACKAGE_CRYPTSETUP=y
BR2_PACKAGE_IPERF3=y
BR2_PACKAGE_TCPDUMP=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_SERVER=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_LTRACE=y
BR2_PACKAGE_VALGRIND=y
BR2_PACKAGE_TRACE_CMD=y
BR2_PACKAGE_RAUC=y
BR2_PACKAGE_CASYNC=y
BR2_PACKAGE_OPTEE_CLIENT=y
This will bloat the image by ~40 MB. That’s expected for a dev-image; production images trim to only what they ship.
A.5 Per-Part cheat sheets¶
If you only want the tools for the Part you’re reading right now:
Part VI — Driver development¶
# Ubuntu-base on target
apt install i2c-tools gpiod alsa-utils v4l-utils gstreamer1.0-tools \
bluez wpasupplicant iw modemmanager libqmi-utils \
mtd-utils can-utils evtest
Part VII — Device cookbook¶
Same as Part VI, plus:
apt install libnfc-bin neard fprintd \
libmodbus-dev mosquitto-clients \
gpsd gpsd-clients pps-tools chrony \
iperf3 tcpdump
Part VIII — Debug, production, advanced¶
# On the host
apt install gdb-multiarch openocd build-essential bison flex bc libssl-dev \
qemu-user-static binfmt-support u-boot-tools device-tree-compiler
# On the target (debug image only — strip for production)
apt install gdbserver strace ltrace valgrind trace-cmd perf \
rauc casync
Part IX — Applied virtualization¶
# On the host
apt install qemu-system-arm qemu-system-aarch64 gdb-multiarch \
device-tree-compiler u-boot-tools bridge-utils
# Hypervisor builds also need the normal kernel/U-Boot build tools above.
# Xen, Jailhouse, Zephyr, and STM32MP1-specific tooling are pinned inside
# their chapters because version drift matters.
A.6 Pitfalls¶
libgpiod v1 vs v2. The CLI changed:
gpioget --chip=gpiochip0 18(v2) vsgpioget gpiochip0 18(v1). Ubuntu 24.04+ ships v2; older Buildroot trees ship v1. Match documentation to your version.GStreamer plugin sets. “
base” + “good” + “bad” cover ~95 % of pipelines; “ugly” adds patented-codec elements (h264, mp3). Addgstreamer1.0-libavfor ffmpeg-backed elements. Ubuntu separates these into named packages; Buildroot usesBR2_PACKAGE_GST1_PLUGINS_*=y.WiFi firmware blobs are non-redistributable. Ubuntu ships them in
firmware-iwlwifi,firmware-realtek, etc.; Buildroot has corresponding packages but you may needBR2_LEGAL_INFO=yand to accept the licenses.bluez5.x vsbluetooth-meshd. Mesh support is a separate daemon (bluetooth-meshd); installingbluezalone does not give you mesh.mosquittobroker + clients. “Clients” without “broker” still works — you just connect to a remote broker. DropBR2_PACKAGE_MOSQUITTO=yand keepBR2_PACKAGE_MOSQUITTO_CLIENTS=yif you don’t host the broker.zigbee2mqttis Node.js, not a C package. Run from npm, or containerize.OpenThread / Matter require building from source. No clean apt or Buildroot package; expect 30–90 min of build time and tracking upstream master.
NXP CST (Code Signing Tool) is not redistributable. Download from the NXP site after registration; do not check it into a public repo.
mfoc/mfcukare offensive-security tools. Many jurisdictions restrict cloning RFID cards. Use for authorized assessment only.systemd-only utilities.
journalctl,coredumpctl,systemd-analyzeonly work if your init issystemd. BusyBox-init / runit / sysvinit systems usedmesg,gdb on /var/lib/cores/*, and their own benchmarking instead.pip installon production images. Convenient on dev kit; ruins reproducibility on shipping firmware. Use Buildroot’sBR2_PACKAGE_PYTHON3_*packages or vendor your wheels.
A.7 Going deeper¶
Buildroot manual, “Package recipes” chapter — the canonical reference; lists every
BR2_PACKAGE_*symbol.Yocto Project Layer Index (https://layers.openembedded.org/) — search any tool name to find the recipe.
Debian / Ubuntu packages.ubuntu.com — search to verify the exact package name for any tool.
apt-file(apt install apt-file && apt-file update) — search “which package ships this binary?”:apt-file search bin/gpioget.Per-chapter “Tooling” boxes — most chapters that depend on a specific tool now carry a one-line install hint at the top of the chapter; this appendix is the canonical full reference.