Skip to content

Hooks#16

Closed
bigbrett wants to merge 1 commit intomasterfrom
hooks
Closed

Hooks#16
bigbrett wants to merge 1 commit intomasterfrom
hooks

Conversation

@bigbrett
Copy link
Copy Markdown
Owner

@bigbrett bigbrett commented Mar 3, 2026

No description provided.

@bigbrett bigbrett closed this Mar 3, 2026
@bigbrett bigbrett reopened this Mar 3, 2026
@bigbrett bigbrett force-pushed the hooks branch 2 times, most recently from 42760ac to ef73b41 Compare March 3, 2026 17:18
@bigbrett bigbrett requested a review from Copilot March 3, 2026 17:21
Copy link
Copy Markdown

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

Adds a user-configurable hooks framework to wolfBoot so downstream integrators can inject custom logic at key points in the loader/boot/panic flow.

Changes:

  • Introduces include/hooks.h hook API and new docs describing hook points and build flags
  • Adds hook call sites in loader init, boot handoff (wolfBoot_start() variants), and wolfBoot_panic()
  • Extends build system and CI to compile user-provided hook implementations and validate hook behavior in simulator runs

Reviewed changes

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

Show a summary per file
File Description
src/update_ram.c Calls optional boot hook before do_boot() for RAM-loaded images
src/update_flash_hwswap.c Calls optional boot hook before do_boot() for HW swap flow
src/update_flash.c Calls optional boot hook before do_boot() for flash flow
src/update_disk.c Calls optional boot hook before do_boot() for disk flow
src/loader.c Adds optional preinit/postinit loader hooks around initialization
options.mk Adds build flags and hook source-file integration to link hook implementations
include/loader.h Integrates panic hook into wolfBoot_panic() and includes hook declarations
include/hooks.h New hook API header (prototypes gated by hook macros)
include/hal.h Removes an extraneous blank line
docs/hooks.md New documentation for hook points, build configuration, and boot flow
docs/README.md Links new hooks documentation
.github/workflows/test-hooks-simulator.yml Adds CI workflow to exercise hook call counts on simulator

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

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.

2 participants