Skip to the content ForoHackers
Log inJoin

Embedded Linux: start here

Embedded Linux
#2945 · · Quote · Report

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

  1. Linux from the shell: processes, files, permissions, networking.
  2. Boot a single-board computer from a serial console and read every line it prints.
  3. Build an image with Buildroot; then the same with Yocto, and compare the trade-offs.
  4. Write a device tree node and a small kernel module for a GPIO or I2C device.
  5. Design an update that survives power loss halfway through.

Related tags

#linux #kernels #device-drivers #bootloaders

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply