Conversation
42760ac to
ef73b41
Compare
There was a problem hiding this comment.
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.hhook API and new docs describing hook points and build flags - Adds hook call sites in loader init, boot handoff (
wolfBoot_start()variants), andwolfBoot_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.
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.
No description provided.