Skip to content

boot: bootutil: introduce boot_load_image_to_sram hook - #2741

Open
danieldegrasse wants to merge 1 commit into
mcu-tools:mainfrom
danieldegrasse:feature/boot-sram-hook
Open

boot: bootutil: introduce boot_load_image_to_sram hook#2741
danieldegrasse wants to merge 1 commit into
mcu-tools:mainfrom
danieldegrasse:feature/boot-sram-hook

Conversation

@danieldegrasse

Copy link
Copy Markdown
Contributor

This hook allows to define a custom way of handling loading an image to SRAM. This can be useful if a system needs to override image loading routines (for example, if a security enclave needs to perform loading and validation)

This hook allows to define a custom way of handling loading an image to
SRAM. This can be useful if a system needs to override image loading
routines (for example, if a security enclave needs to perform loading
and validation)

Signed-off-by: Andrei Narkevitch <andrei.narkevitch@analog.com>
Signed-off-by: Daniel DeGrasse <daniel.degrasse@analog.com>
Comment on lines +240 to +241
int boot_load_image_to_sram_hook(int image_index, int slot,
uint32_t *img_dst, uint32_t *img_sz);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this doesn't make sense vs what boot_load_image_to_sram has?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, not 100% clear here. The intention of this call is that we can hook the SRAM load process to replace the decryption and memory copy routines, for cases where we have custom hardware that handles those routines. Are you saying that the documentation here isn't clear, or that the hook should behave differently?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should have the same function arguments that the normal function has to allow it to do a variety of different things. Also not sure how this would work loading since you have no information from the image?

@de-nordic de-nordic added the area: core Affects core functionality label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Affects core functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants