Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Boot-failure diagnostics omit a terminal recovery record, incorrectly record blank fallback slots, and lose known image versions.
3 open issues
What changed in this PR
Adds persistent failure diagnostics and OS-visible stage timing to wolfBoot’s disk boot path.
Changes:
- Records slot refusal causes and reports the latest stored failure.
- Exports boot-stage timestamps through
/chosen/wolfboot,boot-times. - Adds diagnostic test variants and documents configuration and behavior.
| File | Description |
|---|---|
| tools/unit-tests/unit-update-disk.c | Tests encrypted and plain disk failure records. |
| tools/unit-tests/unit-update-disk-confirm.c | Tests diagnostics for unconfirmed and refused slots. |
| tools/unit-tests/Makefile | Registers three diagnostic test variants. |
| src/update_disk.c | Adds failure recording, reporting, and boot timestamps. |
| include/wolfboot/wolfboot.h | Defines decrypt, version, and read failure causes. |
| docs/compile.md | Documents boot-stage timing. |
| docs/API.md | Documents disk diagnostics and storage configuration. |
Review effort: Balanced
dgarske
force-pushed
the
disk_boot_diag
branch
from
December 3, 2026 22:23
f1d6364 to
fbd2f3e
Compare
dgarske
requested review from
bigbrett and
danielinux
and
a balanced review from Copilot
December 3, 2026 22:23
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Empty-slot exclusions remain incomplete: stale TESTING trailers can produce rollback records for blank slots, and blank golden slots can still produce BOOT failure records.
2 open issues
3 resolved since last review
Review effort: Balanced
dgarske
force-pushed
the
disk_boot_diag
branch
from
December 3, 2026 23:04
fbd2f3e to
1f7d6c8
Compare
dgarske
force-pushed
the
disk_boot_diag
branch
from
December 4, 2026 03:44
1f7d6c8 to
7cba1ed
Compare
bigbrett
reviewed
Dec 4, 2026
bigbrett
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
WOLFBOOT_PERSIST_FAILURE_STATUS), with the slot aspartition: header, read, decrypt, hash, signature, version and unconfirmed-slot causes. A recovery record follows when nothing boots, and the newest record prints at the next boot.WOLFBOOT_FAILURE_CAUSE_DECRYPT,WOLFBOOT_FAILURE_CAUSE_VERSIONandWOLFBOOT_FAILURE_CAUSE_READ.BOOT_BENCHMARK=1, per-stage timestamps (entry, load, decrypt, hash, verify, handoff) go to the OS as/chosen/wolfboot,boot-times.On ZynqMP SD boot the store lives in QSPI (
EXT_FLASH=1 WOLFBOOT_DIAGNOSTICS_EXT=1).Testing
unit-update-disk-diag,-diag-plain,-confirm-diag).Validated on a ZCU102 (SD boot, BL33) with an earlier revision of this change: a modified slot recorded in QSPI and printed at the next boot, and the boot times read from
/proc/device-tree/chosen.