OpenBoot
Draft: this page is not reviewed yet.

Write-gate migrationDraft

Until this change a write-capable build was named by a gate id chosen for the run: NVME_NO_WRITE=0 NVME_WRITE_GATE=<id>, the same id in the image banner (nvme: build NO_WRITE=0 gate=<id>), in the obans package (build.cmd write <id>) and in the hw-run flags. The id said nothing about which blocks of the disk the image could touch.

That is replaced by two things that do.

The release profile#

OB_PROFILE=release builds the one write-capable image. It is the same bytes for every machine: no gate id, no constant of any disk. Its write latch is enforced (NVME_WLATCH=1 follows from the profile) and it opens only for the window the install slot names (see Storage). The image carries a positive marker, ob-release-marker: profile=release v1, exactly once, and prints

nvme: build WRITE-CAPABLE profile=release
nvme: build WRITE-CAPABLE profile=release lab-hold=<0|1> slot=<empty|id> window=<first>-<last>|refused <why>

The second line comes with the slot decision. With an empty slot it reads slot=empty window=refused slot-empty.

lab-hold=<0|1> is the build's OB_HOLD (a published object says lab-hold=0). The boot also prints sb: keyset <name>, the OB_KEYSET build value (the key-set id sealed in seal.json as secureboot_keyset; default unset).

OB_PROFILE=gate (the default) is the compile-time-proof class: NVME_NO_WRITE=1, every write and flush path compiled out, nvme: build NO_WRITE=1.

What now refuses#

Old Now
NVME_WRITE_GATE=<id> in a make line or in hw-run --flags build error, pointing here
NVME_NO_WRITE=0 without OB_PROFILE=release build error, pointing here
OB_GATE_IGNORE_PARENT_SLOT=1 build error: use --no-parent-slot (below)
obans build.cmd write <id>, a WRITE <id> package write is an error; build the release package
tools/obans_package_mode.sh saying write <id> refuses the package; only ro and release exist
tools/install/build-install-object.sh write and WRITE_GATE use release
tools/build_dual_gate_image.sh tools/build_release_image.sh

hw-run classes#

hw-run reads the class from the flags and from the slot of the object (obpack.py slot-digest says whether the slot is filled, obslot.py parse whether it is a valid slot and its mode).

Class Image What the run needs
gate OB_PROFILE=gate, no slot the no-write proofs (check_nvme_nowrite, nowrite_proof) must pass; no owner flag
release, empty or read-only slot OB_PROFILE=release check_nvme_slotgate.sh must pass, --no-parent-slot, and the image must report slot=empty and window=refused ..; a window opening fails the run
release, window slot OB_PROFILE=release, a slot that holds a window --write-image-owner-ok "<reason>"; the launch is uefi launch target=auto (the ESP inside the window, no other)

A slot that does not parse is refused in every class. An object that holds a window slot is refused without the owner flag.

--no-parent-slot makes the hand-over sideload image ... noslot: the installed OpenBoot leaves the new image no install slot. It can only remove authority. It needs an installed OpenBoot built from the change that added the noslot word; an older one refuses the unknown word and nothing is handed over.