Skip to content

monolithic self-update optimizations#743

Open
bigbrett wants to merge 4 commits intowolfSSL:masterfrom
bigbrett:monolithic-self-header-flag-removal
Open

monolithic self-update optimizations#743
bigbrett wants to merge 4 commits intowolfSSL:masterfrom
bigbrett:monolithic-self-header-flag-removal

Conversation

@bigbrett
Copy link
Copy Markdown
Contributor

@bigbrett bigbrett commented Apr 1, 2026

  • Monolithic self-updates now force DISABLE_BACKUP=1, eliminating the swap partition and all swap-based update code (wolfBoot_copy_sector, wolfBoot_update, etc.) and partition state checks from monolithic builds, since they were unused
  • Compile-time guards in wolfboot.h enforce that DELTA_UPDATES, NVM_FLASH_WRITEONCE, and non-RAM_CODE configurations are incompatible with monolithic self-update
  • Fixed partition sizing in sim-self-update-monolithic.config (256KB was too small for the monolithic payload; now 512KB). Never failed since we forgot to add to CI (oops)
  • Added missing test-sim-self-update-monolithic and test-sim-self-update-monolithic-self-header CI test coverage

Copilot AI review requested due to automatic review settings April 1, 2026 20:34
@bigbrett bigbrett self-assigned this Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR streamlines monolithic self-update builds by removing swap/backup-based update machinery, simplifying the monolithic boot flow, and expanding simulator/CI coverage to validate monolithic self-update behavior (including optional self-header persistence).

Changes:

  • Force-disable swap/backup in monolithic self-update builds and compile out swap-based update code paths.
  • Simplify monolithic boot failure behavior (panic instead of swap/fallback update flow) and add compile-time incompatibility guards.
  • Update simulator configuration sizing and add/extend simulator tests + CI steps for monolithic self-update (including self-header persistence).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/test.mk Removes swap partition creation for monolithic test; adds a new simulator test validating persisted self-header bytes.
src/update_flash.c Compiles out swap-based update machinery for monolithic mode and removes emergency update flow when boot verification fails.
options.mk Forces DISABLE_BACKUP=1 for monolithic self-update; tweaks swap address defaults when backup is disabled.
include/wolfboot/wolfboot.h Adds compile-time guards to enforce monolithic self-update prerequisites and incompatibilities.
config/examples/sim-self-update-monolithic.config Increases partition sizing and removes swap partition address for monolithic simulator config.
Makefile Makes swap region assembly conditional when backup is disabled.
.github/workflows/test-sim-self-update.yml Adds CI steps for monolithic self-update test targets, including self-header persistence verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #743

Scan targets checked: wolfboot-bugs, wolfboot-src

No new issues found in the changed files. ✅

@bigbrett bigbrett marked this pull request as ready for review April 2, 2026 14:32
Copilot AI review requested due to automatic review settings April 2, 2026 14:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bigbrett bigbrett assigned danielinux and unassigned bigbrett Apr 2, 2026
@bigbrett bigbrett requested a review from danielinux April 2, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants