Skip to content

Golden boot log

Ralf Steinert edited this page Nov 26, 2026 · 1 revision

The "Boot log" step compares the serial console output of each boot with the log of a known-good board, using boot-log-diff. It catches what the rest of the sequence does not ask about: a SATA link at half speed, a CAN controller whose driver no longer loads (see Fault walkthrough).

Recording the golden log

Take a board you know is good and let the station boot it once. The run's result.json holds the whole console output; the golden log is the part up to the login prompt:

bench run --serial GOLDEN
python - reports/GOLDEN_*/result.json <<'PY'
import json, re, sys
log = json.load(open(sys.argv[1], encoding="utf-8"))["console_log"]
end = re.search(r"login:", log).end()
open("golden_boot.log", "w", encoding="utf-8").write(log[:end] + "\n")
PY

Put golden_boot.log next to your station.yaml:

boot:
  golden_log: golden_boot.log

Read it through once before you use it: a golden log that already contains a warning makes that warning look normal. Record it again whenever the BIOS, the kernel or the image changes on purpose.

Noise that differs between good boards

boot-log-diff already masks timestamps, addresses, MAC addresses, UUIDs and other values that change from boot to boot, and ignores the order in which drivers probe. What is left are values that are specific to your boards — a host name with the serial number in it, a calibration value, a module that is only fitted on some variants:

boot:
  golden_log: golden_boot.log
  mask: ['epc-[0-9a-f]+']        # replaced by <MASK> on both sides
  ignore: ['optional-module']    # lines dropped before the comparison

If a deviation shows up on good boards, it belongs in mask or ignore. If it shows up only on bad ones, it is what the step is for.

Your own known faults

A deviation fails the step either way. A known fault also gets a title and a repair diagnosis in the report — the part that saves the repair technician the most time. boot-log-diff comes with a list of common ones (sata-link, can-missing, boot-incomplete, DDR training, eMMC, PHY, USB and many more); add what you know about your boards in a TOML file:

# our-boards.toml
[[fault]]
id = "fpga-config"
title = "FPGA not configured"
pattern = 'fpga.*done pin (?:low|timeout)'
diagnosis = """
The FPGA did not load its bitstream. Check the configuration flash and the
1.8 V auxiliary supply (TP14)."""
boot:
  rules: [our-boards.toml]       # relative to station.yaml, checked before the built-in ones

The rule format, including faults for lines that are missing, is described in the boot-log-diff README.

When the boot hangs

If no login prompt arrives within boot.timeout_s, the "Boot" step fails with the last console line, and the comparison still runs on what did arrive. The missing rest is reported once as boot-incomplete, and a fault in the lines before it — such as the SATA reset loop of --fault boot_hang — gets its own diagnosis.

Clone this wiki locally