Embedded Linux
Linux on handhelds, routers, single-board computers and appliances.

What makes it embedded
Embedded systems run Linux on limited hardware for a specific job. They use trimmed kernels, small C libraries, compact tools such as BusyBox and read-only system images, exactly the ideas pioneered on handhelds like the Agenda VR3.
Building images
Build systems such as Buildroot and the Yocto Project compile a cross-toolchain, the kernel and selected packages into a complete image for a target board.
Learning on a budget
Single-board computers are a low-cost way to learn: install a Linux image, use the serial console, experiment with GPIO and practise cross-compiling.
Boot flow and the device tree
An embedded Linux board rarely boots like a PC. There is usually a small boot ROM in the processor, then a bootloader, then the kernel, and only then the root filesystem and user space. Each stage has a narrow job:
- the ROM finds the first bootable code
- the bootloader initialises enough hardware to load a kernel
- the kernel brings up drivers and mounts a root filesystem
- init starts the services or application that make the device useful
On many ARM systems the bootloader also passes a device tree blob to the kernel. That file describes built-in hardware that cannot be discovered automatically: UARTs, GPIO controllers, regulators, storage buses, screens and pin assignments. A board can fail in odd ways because of a tiny device tree mistake. The kernel may boot, but a serial port, network chip or backlight never appears.
For learning, the serial console is usually more useful than HDMI or SSH. It shows early messages before networking is configured and before a graphical stack exists. Get comfortable reading boot logs and kernel parameters from the Command line. Common failures are plain once you know where to look: the wrong root= value, a missing console= setting, an incompatible device tree, or an init process that cannot mount the root filesystem.
Some systems also use an initramfs for early setup, especially when storage, decryption or firmware loading needs a first stage before the real root filesystem is available. That sounds advanced, but the practical lesson is simple: know which stage is failing before you change anything.
Storage layout for reliable systems
Desktop habits do not always fit embedded storage. SD cards, eMMC and raw NAND all have different failure modes and performance quirks. ext4 on SD or eMMC is common because it is familiar and easy to inspect. Raw NAND usually needs flash-aware layers and filesystems such as UBI and UBIFS, because bad blocks and wear management are part of the normal design, not rare exceptions.
A read-only root filesystem is common in appliances because it boots into a known state and copes better with sudden power loss. A practical layout often looks like this:
- a compressed read-only system image, often SquashFS
- a small writable area for configuration and persistent data
tmpfsin RAM for transient files such as/run, sockets and some logs
Another approach is overlayfs. The base system stays unchanged, while local changes are written to an upper writable layer. That is handy for testing and for rollback, but it forces you to decide what must survive a reboot: host keys, network settings, application data, logs and crash dumps.
Write volume matters. Verbose logs, package caches and databases can wear removable media faster than expected. Trim unneeded services, rotate logs, and place temporary files in RAM where that makes sense. Before moving paths around, understand the File system and how your image mounts it at boot. If the device is exposed on a network, combine that storage plan with basic Security: correct permissions, no forgotten debug accounts, and a safe place for keys and certificates.
Updating and recovering without surprises
The awkward part of embedded Linux is not the first successful boot. It is getting from one working image to the next without leaving a dead device behind. If the unit can lose power during an upgrade, avoid rewriting the only root filesystem in place. A safer pattern is two system slots, often called A/B. The new image is written to the inactive slot and only marked good after a full boot. If it fails, the bootloader can fall back to the previous slot.
Even on a development board, keep a recovery path. That may be a bootloader menu on the serial port, a rescue image on removable media, or a documented way to boot from USB or network. Test it before you need it. A recovery plan that has never been tried is just a hopeful note.
When something goes wrong, collect the basics first:
- bootloader output from the serial console
- kernel messages from
dmesg - free space and mount status
- the exact image or package version
- whether a clean reboot changes the symptom
That small checklist saves time and makes Troubleshooting more direct. Many embedded faults are mundane: a full writable partition, a renamed device node, weak power, or a service starting before the hardware it needs is ready.