</>EmbeddedInterview

How do you reduce boot time on an embedded Linux device?

MediumEmbedded Linux & Boot

Short answer: Measure first, then remove or defer work at every stage: shorten the bootloader (no countdown, minimal init, or Falcon mode), make the kernel smaller and quieter (only needed drivers built in, quiet, fast decompression, deferred probing), and start the critical application early in user space (fewer services, read-only compressed root, no unnecessary waits).

Measure

  • Timestamp the serial output: grabserial -t or the terminal's timestamp option.
  • Kernel: printk.time=1, initcall_debug (shows how long each driver init takes), bootgraph.pl.
  • User space: systemd-analyze, systemd-analyze blame, systemd-analyze critical-chain, bootchart.

Bootloader

  • bootdelay=0 (or -2) to remove the autoboot countdown.
  • Remove unused drivers and commands; skip USB/network init unless needed.
  • Load only what is needed, from the fastest storage; use DMA and the highest eMMC bus speed.
  • Falcon mode: SPL loads the kernel directly, skipping U-Boot proper.

Kernel

  • Build in only the drivers needed for the boot path; make the rest modules loaded later, or remove them.
  • quiet (printing to a 115200-baud UART can cost seconds).
  • Use LZ4 or an uncompressed image if storage is fast (decompression is CPU time).
  • CONFIG_PRINTK_TIME for measurement, then disable debugging options.
  • Async probe and deferred initcalls for slow, non-critical devices.
  • Use rootwait only where needed and avoid unnecessary delays such as rootdelay=.

User space

  • Start the critical application first (a dedicated early systemd unit, or directly from init).
  • Remove unused services; avoid network-wait targets unless needed.
  • Use a read-only SquashFS/EROFS root (no filesystem check), prelink or statically link the main application, reduce shared library count.
  • Show a splash screen or "early camera" output from the bootloader or kernel to improve perceived boot time (automotive rear-view cameras must show within about 2 seconds).

Results: with this approach, 1–3 seconds to the application is achievable on modern Cortex-A SoCs. Hibernation-based "snapshot boot" can be faster still for complex systems.