Saltar al contenido ForoHackers

Embedded Linux: start here

Linux embebido
#439 · Ophuscado · · Denunciar

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

Inicia sesión o únete para responder.