Skip to content

Topic/wrynose - #146

Merged
otavio merged 2 commits into
wrynosefrom
topic/wrynose
Nov 24, 2026
Merged

otavio merged 2 commits into
wrynosefrom
topic/wrynose

Conversation

@mdrodrigo

Copy link
Copy Markdown
Contributor

No description provided.

… set

UPDATEHUB_BOOTSCRIPT_BEFORE_BOOTCMD runs after the kernel of the selected
installation set is loaded, too late for a fragment to change the set.
UPDATEHUB_BOOTSCRIPT_BEFORE_SELECT runs before the boot count check, so a
board-specific fragment that finds the update does not boot can set
'bootcount' to make the script revert to the other installation set.

(cherry picked from commit 54cc6d9)
…other eMMC boot partition

A first-stage loader that keeps A/B firmware in the eMMC boot partitions,
such as TF-A BL2 with STM32MP_EMMC_BOOT_FALLBACK, counts boot attempts in
a register kept across resets and loads the firmware of the other boot
partition after too many. The old firmware would then boot the rootfs of
the update, and the boot would pass validation.

UPDATEHUB_BOOTSCRIPT_FIRMWARE_FALLBACK_REG sets the register address. The
script then clears it on every boot it reaches, and when the loader fell
back while an update is being validated it reverts to the other
installation set. On its next start, the agent switches the eMMC boot
partition back to the active set and confirms the rollback. This leaves
no board-specific code in Linux.

(cherry picked from commit 207d466)
@mdrodrigo
mdrodrigo requested a review from otavio November 24, 2026 17:11
@otavio
otavio merged commit 5a0e99a into wrynose Nov 24, 2026
@otavio
otavio deleted the topic/wrynose branch November 24, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants