Embedded Linux Boot Time: Where the Seconds Go

An embedded Linux device passes through several stages between power-on and a working application: boot ROM, bootloader, kernel, user-space initialisation and the application itself. Each adds its own delay, and on an untuned system some of that delay does nothing useful, such as a bootloader countdown or kernel messages printed to a slow serial console. This article breaks boot time down by stage and lists the changes that usually save the most.

At a glance

bootdelay
The U-Boot variable that sets the autoboot countdown. Production images usually set it to zero.
quiet
A kernel command-line option that suppresses most console messages during boot.
11.5 kB/s
Approximate throughput of a 115200 baud serial console with 8N1 framing.
Falcon mode
A U-Boot feature in which the first-stage loader starts the kernel directly.

The problem

Boot time is rarely specified until a prototype takes too long to start. By then the time is spread across components owned by different people, and nobody has measured how long each stage takes.

Guessing at causes wastes effort. Teams compress the kernel harder or switch filesystems when the real delay is a driver waiting on a timeout, a network service blocking the application, or a bootloader pausing for a key press.

Measure every stage before changing anything. The largest delay is seldom where the team expects it.

Measuring each stage

Timestamp the serial console output on a separate machine, so every line from boot ROM to application carries a time. Enable kernel message timestamps, and use initcall_debug to see which drivers take longest to initialise. In user space, systemd-analyze reports how long each service took and which ones lie on the critical path.

With measurements in hand, the usual savings are well known: remove the bootloader countdown, load the kernel and device tree directly, drop drivers the product does not use, add quiet to the kernel command line and start the application before services it does not depend on.

What good looks like

Set a boot time target in the requirements, measured from power-on to a specific visible point such as the first screen or the first message sent.

Measure each stage with timestamped console output and the kernel and init tools, and rank the stages by time.

Work on the largest stage first, re-measure after each change, and keep the measurement in the build so regressions are caught.

Where the time goes
StageWhat happensCommon savings
Boot ROM and first stageLoads the first-stage loader, initialises DRAMFaster boot media and interface settings
BootloaderLoads the kernel and device treeNo countdown; Falcon mode
KernelDecompresses and initialises driversFewer drivers; quiet console; faster decompression
User-space initMounts filesystems, starts servicesFewer services; start the application early
ApplicationLoads libraries, draws the first screenFewer dependencies; defer non-essential work
Typical stages of an embedded Linux boot and the usual levers. Durations depend heavily on the system.
Time to print 10,000 bytes of console output
s
9600 baud10.42
57600 baud1.74
115200 baud0.87
230400 baud0.43
921600 baud0.11
Calculated for a serial console with 8N1 framing, 10 bits per byte. Shown on a logarithmic scale.

What it changes

Faster Start

The product reaches a usable state sooner after power-on.

Focused Effort

Time is spent on the stages that dominate, not on guesses.

Regression Control

Automatic measurement catches boot time creeping back up.

Better Experience

Users see a responsive product rather than a long blank screen.

Where to go next

If part of the product must respond faster than Linux can start, such as a camera view or a safety output, give that job to a companion microcontroller or a dedicated early-boot path.

Review boot time again after each major software update. New services and drivers tend to add time quietly.

Problems this prevents

  • Seconds lost to a bootloader countdown
  • Kernel messages slowed by a serial console
  • Services that block the application at start-up
  • Boot time that grows with each release

Discuss your project

Email support@aavico.com or use Get in Touch when the website finishes loading.