Skip to content

The BMC reboots without cutting the nodes' power, and updates are safer and can be cancelled

A reboot of the BMC is now a kexec, ported from Joerg Jungermann's (@j0ju) work, so on a v2.4 board the nodes should keep their power; we measured it on two v2.5 boards only, where the network is cut for about 15 s instead of about 25 s, and have not yet tested it on a v2.4 board. The update path no longer arms an update before its notes are on flash, lets two installs race, or leaves a staged version behind after a power cut, all found by Adrian Berger's (@adberger) simulation of power cuts, reboots and concurrent installs and not yet tested with real power cuts. A staged update can be cancelled (tpi firmware unstage, or "Cancel staged update" on the Firmware page) and a node in mass-storage mode gets a stable /dev/disk/by-tpi/nodeN link, thanks to Daniel Steinhauf (@danste22), who asked for the first in #124 and wrote the second. One change for scripts: a reset of a node that is off is now refused; use type=power to switch it on.

Firmware v2.58.0, 6 December 2026. Every item below is the repository's own changelog entry, taken apart; the whole entry is a click away under each one.

Pins bmcd 2.51.3 (v2.57.0 had 2.50.2), tpi 2.1.0 (2.0.1) and BMC-UI 4.9.1 (4.8.1). The kernel stays at 6.18.63.

Not yet tested with real power cuts, which a simulation cannot replace: the window in #126 depends on how long the NAND takes to write. It ships in firmware v2.58.0, with bmcd 2.51.x and tpi 2.1.0; tpi firmware unstage needs bmcd 2.51.0 or newer, and the new bmcd needs the new scripts.

A reboot of the BMC is a kexec, so the nodes keep their power on a v2.4 board

Section titled “A reboot of the BMC is a kexec, so the nodes keep their power on a v2.4 board”

Ported from Joerg Jungermann (@j0ju)'s kexec reboot in j0ju/sbc-fw-alchemy, which he tested on v2.4 and v2.5.1 boards; its device tree work is his.

The whole entry

/sbin/kexec-reboot loads the kernel and device tree of the running FIT (with regulator-boot-on on every node rail that is on) after rcK, and starts them at runlevel 6 only. It falls back to a normal reset when /run/nokexec exists, when nextboot is armed or unreadable (a staged update must boot through U-Boot), on a safe-mode or postupdate boot, off any root but rootfs, and on any error. A kexec boot has /proc/device-tree/chosen/bmc-kexec. Also from him: the RTL8201F reset is held released by a gpio-hog instead of the PHY's reset-gpios (else "EMAC reset timeout" after a kexec), and the realtek-smi command lock is a mutex ("scheduling while atomic" under GPIO traffic). Adds kexec-tools, dtc programs and dumpimage to the image.

The exec step runs after swapoff -a and before the inittab's umount -a -r, and runs that umount itself just before kexec -e: BusyBox umount -a -r unmounts every filesystem that is not busy, /proc and /sys among them, so the step mounts both again for kexec -e.

Each reboot leaves a log that survives it, /mnt/overlay/kexec-reboot.log (the last 300 lines), with a copy of each line on /dev/kmsg: the runlevel, why a kexec is or is not allowed, every tool with its exit status, and exec: starting kexec -e after sync and umount -a -r as the last line before the kexec. At boot S95kexec-status adds one verdict: boot: kexec boot OK, boot: normal U-Boot boot, or which step failed (the kexec did not reach the new kernel, kexec -e returned, or the exec step left no trace). kexec-reboot status prints it, kexec-reboot check says whether a reboot now would be a kexec.

Tested with v2.58.0-rc.7 on two v2.5 boards (2026-12-06), a U-Boot reboot and a kexec reboot each: /chosen/bmc-kexec and the memreserve@47fb9000 node are there, PSCI brings the second CPU back, the verdict is kexec boot OK, the nodes keep their power (their uptimes run on), bmcd adopts the live power state, and there is no "EMAC reset timeout" or "scheduling while atomic". The network is cut for 14–15 s instead of 24–28 s: the new kernel starts about 2 s after kexec -e, and most of the rest is the rtl8365mb probe, which still resets the switch (its ports are up at about 9.5 s). Not tested on a v2.4 board, where the kexec matters most (the node rails hang on PD4–PD7); ours is out of service.

  • A node in mass-storage mode gets a stable /dev/disk/by-tpi/nodeN link (#145, landed as #148, Refs #140). A node attached with tpi advanced msd -n N showed up as /dev/sdX, a name that changes between attaches. The new mdev-tpi-msd-symlink helper maps a whole-disk sd[a-z] on hub port 1-1.N or 2-1.N to /dev/disk/by-tpi/nodeN and removes the link when the disk or the hub port goes away. Written by Daniel Steinhauf (@danste22), who ran it on node 1 of one board; we will check nodes 2 to 4 on ours.
  • /sbin/osunstage cancels a staged update (#124, Daniel Steinhauf). Under the staging lock it clears nextboot first (the commit point of a cancel), then removes both notes and what an interrupted stager left in the staging directories. It leaves the rootfs_new volume, which nothing boots without nextboot and the next staging removes, and the images parked on the SD card. With nothing staged it says so and succeeds. Refused with exit status 4 while a tentative boot is being judged, and 75 while a stager holds the lock. bmcd runs it for POST opt=set&type=firmware_unstage, tpi firmware unstage calls that, and the Firmware page has a "Cancel staged update" button.
  • firmware_unstage in the daemon, tpi firmware unstage, and "Cancel staged update" on the Firmware page (bmcd 2.51.0 and bmcd#92, tpi 2.1.0 and tpi#36, BMC-UI 4.9.0 and BMC-UI#74; BMC-Firmware#124, asked for by Daniel Steinhauf, @danste22). POST opt=set&type=firmware_unstage (also POST /api/bmc/firmware/unstage) runs osunstage. The command names what it cancelled, says so when nothing was staged (not an error), and says when it removed the note of an update that was never armed. The page asks for a confirmation that names the version and what stays. tpi and the page need bmcd 2.51.0 or newer on the board; an older one is told so.
  • One staging lock in the daemon, shared with the firmware's scripts (bmcd 2.51.0, bmcd#92, BMC-Firmware#127): a second stager gets a 409 an update is being staged; try again when it has finished, before any byte is sent.
  • The Console says when its output looks like the wrong speed, and shows each node's speed (BMC-UI 4.9.1, BMC-UI#75). A module whose console runs faster than the node's stored speed shows replacement characters and control bytes, and nothing on the page said why. When a high share of the last 4 KiB is unreadable, a notice says "This looks like the wrong console speed. RK1 uses 1500000, CM4 and most others 115200.", names the speed the node is set to, and links to Power Control. Reported by DingoDogz on Discord.
  • force=1 means "cancel what is staged, then stage this". On both the upload and firmware_install (#128, Adrian Berger).

    The whole entry

    firmware_install answered 409 "pass force=1 to replace it" and then refused force=1: bmcd skipped its own check and ran tpi-selfupdate, which has no force option. The upload path honoured it by writing over the staged volume with nextboot still pointing at it. Both now unstage first, under the lock. If the install that follows fails, nothing is staged and the board boots what it runs. The 409 names the three ways out: reboot, unstage, force=1.

  • A firmware transfer is refused while another transfer runs. Instead of replacing it (#127, in bmcd).

  • The promotion history counts "tentative boot; checking" lines. Not any line with "tentative boot" in it, so the new discard line is not an attempt (bmcd).

  • The kernel no longer probes the unused display pipeline. (#143, landed as #146, Refs #138).

    The whole entry

    The BMC has no panel, but the display mixers and timing controllers were enabled in the kernel's device tree and printed Fixed dependency cycle(s) at boot. Five nodes are now disabled for the kernel; U-Boot's device tree is unchanged. Written by Daniel Steinhauf (@danste22).

  • The kernel mounts the EROFS root without probing every filesystem first. (#144, landed as #147, Refs #139).

    The whole entry

    boot.scr passed root= without rootfstype, so the kernel tried each built-in filesystem and logged exFAT and F2FS errors against the root device. It now passes rootfstype=erofs; the NAND and the SD root are both EROFS, and an F2FS or exFAT card still mounts. Written by Daniel Steinhauf (@danste22); an SD-card boot is still to be confirmed.

  • A reset of a node that is off is refused with a 409. Where it used to power the node on, and a node that was running is switched back on after a flash (bmcd 2.51.0, bmcd#88).

    The whole entry

    Behaviour change: a client that used type=reset to switch a node on must use type=power, and anyone who relied on a flashed node staying off must switch it off before flashing.

  • tpi firmware install --force cancels what is staged, then installs. (tpi 2.1.0, tpi#36, BMC-Firmware#128, found by Adrian Berger). The flag is unchanged; its help now says what it means.

  • tpi's AUR workflow is removed and its install instructions point at this fork. (tpi 2.1.0, tpi#35, BMC-Firmware#123, found by Daniel Steinhauf). The workflow never ran, could not have published, and would have built the wrong thing.

tests/osupdate.sh (the order, with a trace of every tool and what was on disk when nextboot was armed; the lock), tests/osunstage.sh, tests/selfupdate-failure.sh (the note is handed over before osupdate runs; the lock; EBUSY) and tests/gate.sh (notes missing, notes stale, the lock held, start() end to end, the stager's retries). The CI mutation step has a mutation for each of these, so a suite that cannot say no fails.

  • tests/hw-validate.sh is a script to run on a flashed board (it is not installed in the image). It compares br0 with the EEPROM MAC, fails the USB getty check only when the getty is respawning, and takes dsa as the CPU conduit (#142, by Daniel Steinhauf, @danste22).

    The whole entry

    The three changes above each add a check to it.

  • tests/kexec-reboot.sh checks the kexec reboot's decisions with stubs for kexec, fw_printenv, mount, umount and the device tree tools: every refusal ends in a normal reboot, exec starts only what was loaded, in the order sync, umount -a -r, /proc and /sys again, kexec -e; the log's lines, its cap and every status verdict. It runs in CI under dash and busybox ash.

  • A node in mass-storage mode got no /dev/disk/by-tpi/nodeN link on a v2.4 board. (Refs #145, #148, #225).

    The whole entry

    Measured on our own v2.4 board with firmware v2.58.0-rc.2: tpi advanced msd -n 1 on a Raspberry Pi CM4 attached the disk (/dev/sda, the Raspberry Pi boot loader's mass-storage device, below 2-1), and no link appeared. The helper mdev-tpi-msd-symlink, written by Daniel Steinhauf (@danste22) and credited under Added, names the node from the hub port, 1-1.N or 2-1.N, which is the v2.5 layout. v2.4 has no hub: the BMC multiplexes one node at a time onto the root port, so the disk is on 2-1 (or 1-1), the path says nothing about the node, and the helper ignored it. On a board whose device tree model is Turing Pi 2 (v2.4) the helper now takes the node from the USB mux itself: bmcd holds the four select lines (PG0..PG3 of gpiochip0) as outputs, and the kernel lists a claimed line with its level in /sys/kernel/debug/gpio. The image did not mount debugfs, so a new S00debugfs mounts it at boot (the helper mounts it too if it is missing), and the helper reads the header gpiochip0: 224 GPIOs, ... this kernel prints. Exactly one enable line low is a route, and the select line of that mux says which of its two nodes. It needs no token and no change in bmcd. When the lines cannot be read or make no sense, there is no link, not a guess. The link goes when the disk does, as on v2.5, and the USB remove of 1-1 or 2-1 also sweeps one whose disk is gone. v2.5 and v2.5.1 behave as before: the hub port names the node and the mux is not read. The new tests/mdev-tpi-msd-symlink.sh runs the helper against a scratch tree for both layouts (all four nodes on both root ports, removal, the mux moving between nodes, unreadable states) and runs in CI under dash and busybox ash, with debugfs lines copied from the board. The line levels for nodes 1 to 4 were read on the v2.4 board and match the table; the link itself is not yet checked there with the new image.

  • v2.58.0-rc.1 could not be installed from stock upstream firmware: the gate rejected the missing note. (Refs #126). Found on our own v2.4 board during a migration test, with stock v2.1.0 (bmcd 2.3.4) installing the release through its web interface.

    The whole entry

    The stock installer writes rootfs_new and arms nextboot and has never heard of our notes, so the tentative boot found no staged note, logged FAILED: no staged note on a tentative boot, and the board rolled back to stock. The rule was right for an interrupted fork staging and wrong for any stager of another firmware, a third one this gate cannot ask to change. v2.57.0 and earlier had no such rule, so the migration worked until now. The gate now records, on every normal boot of this firmware and at every promotion, which UBI volume is running (/mnt/overlay/running-image: the volume id and data_bytes of the volume named rootfs). On a tentative boot with no staged note it compares that marker with the volume it replaces. A match means the old image was this firmware and the missing note is still a rejection, as in #126. No marker, or a marker for a volume that is gone (a board that went from this fork to stock and back), means the old image never recorded one: the boot is accepted, the log says why, and the version and gateway comparisons are skipped as they were before #126. Everything else the gate asks (bmcd, switch ports, uplinks, EEPROM, RTC, /metrics) still applies. The first update from a fork older than this marker (v2.57.0 and earlier) is read the same way, since those images wrote none; the update after that is protected again. tests/gate.sh covers both directions.

  • Every note the promotion gate reads is written, and synced, before nextboot is armed. (#126, Adrian Berger). osupdate armed nextboot first and the notes after.

    The whole entry

    A power cut or a reboot from another client in that window produced a tentative boot with neither note, the gate logged "no staged note; version check skipped" and "no gateway answered before the update; gateway check skipped", and an image whose switch registers its ports and carries no frame was made permanent. osupdate IMAGE [NOTE] now takes the staged-version note from the stager (tpi-selfupdate and bmcd write it before they call it), writes the gateway note, writes both through a rename, syncs, and arms nextboot as its last step. If anything fails before that, the notes are removed again.

  • S99postupdate rejects a tentative boot with no staged note. (#126). A staged note that says the gateway note was written first (GATE_NOTES=1, written by the new osupdate) and finds none is rejected too.

    The whole entry

    A staged note from an older stager does not carry the mark, so the first update from an older firmware keeps the old reading of a missing gateway note, which is "recorded nothing" on a board with no default route; and a board with no overlay directory, which cannot hold a note, is not refused.

  • stage-gateway-note tries five times before it records none. (#126). A network blip during one 2 s ping recorded GATEWAY_PING=none right after a download through the same gateway had worked, and the gate then skipped its network check for that image.

    The whole entry

    It also always leaves a note now: a board with no default route records GATEWAY_PING=none and an empty gateway, so a missing note is only ever an interrupted staging.

  • Installs are serialised. (#127, Adrian Berger).

    The whole entry

    One flock on /run/firmware-stage.lock, held for the whole of an upload through bmcd, of firmware_install, of tpi-selfupdate and of osupdate run by hand. A second stager is told an update is being staged; try again when it has finished and nothing is touched (bmcd answers 409). The lock is taken before the "already staged" question, which is only a true answer while no other stager is between "started" and "armed", and before anything is downloaded.

  • tpi-selfupdate no longer says "power-cycle the board" for a busy volume. (#127). ubirmvol: error 16 (Device or resource busy) now says the volume is busy, that nothing was changed, and not to power-cycle for it; a power cycle hard-cuts all four compute modules.

    The whole entry

    The advice stays for the write errors that switch UBI read-only.

  • A power cut during the first boot of an update no longer leaves a staged version on the page for ever. (#131, Adrian Berger).

    The whole entry

    U-Boot deletes nextboot before it boots the staged volume, so a cut before the gate decided left the old image running with the notes still on the overlay. On a boot that is not tentative, with nextboot unset, S99postupdate now removes the notes and logs tentative boot did not complete; staged vX discarded to postupdate.log. It leaves them alone when nextboot cannot be read, and when a stager holds the lock (it has written its notes and not armed yet).

  • tpi-selfupdate says what to do with an update that is already staged. (#128, Adrian Berger): reboot to take it, or tpi firmware unstage, instead of the fw_setenv nextboot it used to ask people to type.

  • The web serial console stays open when the browser falls behind the UART. (bmcd 2.51.1, bmcd#96). At 1500000 baud it ended with close code 1011: channel lagged by 2: the read fan-out held 8 chunks.

    The whole entry

    A client that lags now stays attached and the stream carries a line where the output was lost; the fan-out holds 256 chunks, 2 MiB at most per node. Reported by DingoDogz on Discord, from an RK1 running Talos.

  • The "last power on" time restarts when the BMC reboots and powers the nodes back on. (bmcd 2.51.2, bmcd#98). On a v2.4 board a BMC reboot cuts the power of the nodes and the daemon switches them back on at start, but left the time of the last switch from the UI or the API, so the page showed a stale one.

    The whole entry

    A cold boot stamps every node it powers on; a restart of the daemon under running nodes keeps the stamps. Reported by DingoDogz on Discord, from a v2.4 board.

  • A node's power-on time is no longer inflated, or cut short, by a step of the clock. (bmcd 2.51.3, bmcd#100).

    The whole entry

    The time was the difference of two readings of the wall clock, and a v2.4 board has no battery: after a BMC reboot the kernel starts from a stale time and chronyd steps the clock about two minutes later. On our own v2.4 board (firmware v2.58.0-rc.2, bmcd 2.51.2) chronyd stepped it by 130.4 s and node 1 reported 139 s and then 153 s after about 30 to 45 s on. The stamp now also records the boot clock, which a step of the wall clock does not move, and the time within one boot is its difference. The original report was DingoDogz's, on Discord.

  • A node that was running is switched back on after a flash. And type=reset goes through the same path as a power request, so the state the API reports and the rails agree (bmcd 2.51.0, bmcd#88, BMC-Firmware#122 and #129; #122 reported by Daniel Steinhauf, the power-state problem found by Adrian Berger's simulation).

    The whole entry

    See Changed for what a client may notice.

  • Every request of the web interface has a limit, so a lost board shows within seconds. (BMC-UI 4.9.0, BMC-UI#71, BMC-Firmware#121). Reads time out after 8 seconds, state changes after 15, long operations after 2 minutes; a change that got no answer says "The board did not answer.

    The whole entry

    The change may or may not have been applied", and the page never reloads itself during an upload, install, flash or backup. Found by Daniel Steinhauf in Safari 26.6.2.

  • The serial console shows its last line. (BMC-UI 4.9.0, BMC-UI#72, BMC-Firmware#125). The terminal was fitted one row too tall, so the line with the cursor ran under the clipped edge. Found by Daniel Steinhauf in Safari.

  • The install dialog no longer allows a second install, and closes when you confirm. (BMC-UI 4.9.1, BMC-UI#76). It stayed open until the board answered and "Continue" stayed enabled, so pressing it twice started a second install while the first was still writing the spare slot.

    The whole entry

    Progress, a failure that stays until dismissed and the "Staged" notice with "Reboot to apply" show on the page. Reported by DingoDogz on Discord.


Every release of the firmware · the roadmap · follow by feed

Last updated: