Embedded Linux is Linux on a device that is not a general-purpose computer: a router, a camera, a single-board computer in a machine. The kernel is the same; what changes is that you build the whole system yourself, small, reproducible and able to update in the field.
Key concepts
- Boot chain: boot ROM, then a bootloader such as U-Boot, then the kernel with a device tree, then user space.
- Device tree: a description of the board's hardware the kernel reads at boot, instead of hard-coding it.
- Root filesystem: everything after the kernel, built by Buildroot or the Yocto Project, or taken from a distribution.
- Cross-compilation: building on a fast machine for the device's architecture with a matching toolchain.
- Updates: A/B partitions or a recovery image, so a failed update never bricks a device.
Vocabulary
- BSP: board support package, the vendor's kernel, bootloader and drivers for a board.
- SoC: system on chip, the CPU with most of the computer's peripherals beside it.
- Overlay: a fragment of device tree that changes a base one, for an add-on board.
- Init: the first user-space process, such as systemd, BusyBox init or your own.
What to study, in order
- Linux from the shell: processes, files, permissions, networking.
- Boot a single-board computer from a serial console and read every line it prints.
- Build an image with Buildroot; then the same with Yocto, and compare the trade-offs.
- Write a device tree node and a small kernel module for a GPIO or I2C device.
- Design an update that survives power loss halfway through.