The bootloader counts a slot's retries down on every boot until the slot is marked successful, and at 0 stops on "image destroyed" without falling back to the other slot (measured). qcom-ab-slot (soc/sm8150/rootfs, POSIX sh) sets the successful bit of boot_<slot> in byte 6 of its GPT attributes, in the primary and the backup table with both CRCs, checking both before and after -- the edit qbootctl makes (docs/reference/ qbootctl.txt). The runit service slot-successful runs it once sshd runs; tools/mkrootimg.sh copies soc/<soc>/rootfs and rootfs-<base> into the image. Measured on hotdogb: after a flash (retry 7, not successful) the first boot marks the slot at 6.4 s; fastboot then reports slot-successful:a:yes and the retry count no longer drops. devices/hotdogb/AGENTS.md: a rarer hang remains, 2 of 10 boots with kernel patch 0003. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
docs/reference/ -- documentation read before changing something
The rule from the root AGENTS.md: read the documentation first, save what
you read here, with source and date, and quote the sentence that settled the
question. One topic per file, <topic>.txt.
Files
boot-cfg-timeout.txt-- how theboot.cfgtimeout reaches a medium (source: tree, importe523df740, read 2026-11-04). Basis of patch 0007.install-image-boot.txt-- what the amd64 install image writes into itself at boot (tree, read 2026-11-04).installcd-console-and-cgd-boot.txt--installboot(8)console option and the cgd boot path (tree, read 2026-11-05). Basis of patch 0008.cgdroot-guide.txt-- the NetBSD wiki page on encrypted root, text extracted (wiki.netbsd.org/security/cgdroot, fetched 2026-11-05).make-release-build.md--src/BUILDINGonrelease(read 2026-11-05).qbootctl.txt-- where a Qualcomm ABL phone keeps its A/B slot state in the GPT, from linux-msm/qbootctl (GitHub, commit 39a6e6d, fetched 2026-11-07). Basis ofmobile/soc/sm8150/rootfs/usr/bin/qcom-ab-slot.cgdroot-tree.txt-- the encrypted-root machinery the NetBSD tree already carries (cgdroot.rc, the miniroot module, what is on the CD), tree and ISO read 2026-11-06; its last section lists what is still unread.cgdroot-design.txt-- boot.cfgload, theNAME=cgd.confmount, the gpt/cgdconfig calls, and the design of the encrypted install in sysinst (tree, read 2026-11-06); its last section lists what the test must decide.cde-colours.txt-- slot 5 of Default.dp is the window colour, measured on a running CDE (2026-11-06); the other slots are not mapped.sysinst-survey.txt-- what sysinst already does about colours, whole-disk install and cgd, with file:line (tree, read 2026-11-06; a first pass with grep, the "Not yet read" list at its end is what is still open).
Caveats
- These are records of what was read, not of what is true now. A conclusion
that went into a patch no longer in
patches/src/(the cgdroot ones) is history; the quoted sentences from upstream remain valid. - The cgdroot guide says sysinst does not support an encrypted root. That is
a statement about the wiki on its date, to be checked against
src/usr.sbin/sysinstbefore the sysinst fork designs around it (GOAL.md, "Offen"). - Add a file for every area before you change it; do not paraphrase from memory.