Skip to content

No mcuboot header when secondary - #728

Open
de-nordic wants to merge 3 commits into
nrfconnect:mainfrom
de-nordic:no-mcuboot-header-when-secondary
Open

No mcuboot header when secondary#728
de-nordic wants to merge 3 commits into
nrfconnect:mainfrom
de-nordic:no-mcuboot-header-when-secondary

Conversation

@de-nordic

@de-nordic de-nordic commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Add NCS_KEEP_MCUBOOT_HEADER_IN_SECONDARY_MCUBOOT option that allows to control whether MCUboot will copy MCUboot image header with MCUboot image update to s0/s1 slot.

Depends on:
#725

manifest-pr-skip

@de-nordic
de-nordic force-pushed the no-mcuboot-header-when-secondary branch from ded261a to ea715c4 Compare August 18, 2026 14:37
Add 'auto' parameter to --header-size that calculates minimal required
header size needed to store all information in current header version.
--header-size has been made optional and if not provided, 'auto'
will be assumed.
'auto' should not be used if there is specific alignment of executable
required, when image is automatically padded, or when image is
already shifted internally to required alignment and proper header
size is needed for MCUboot to know where to jump while booting the
image.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Commit adds NCS_KEEP_MCUBOOT_HEADER_IN_SECONDARY_MCUBOOT Kconfig,
default y, that controls whether MCUboot will keep MCUboot image
header while moving update to s0/s1 slot. This allows to reduce
siez of image in transfer, as smalles possible header can be used
without alignment to VTOR, and allows more space for s0/s1 binary
image.
The option is by default set to y, so users do not have to change
anything in existing configurations.
Note that setting this option to n will create MCUboot image that
can not be used to update secondary MCUboot instances built prior
to the option existence and these with the option set to y.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Use CONFIG_ROM_START_OFFSET to set
CONFIG_NCS_MCUBOOT_DISABLE_SELF_RWX_SKIP_SIZE, instead of hardcoding
it for nRF54L.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
@de-nordic
de-nordic force-pushed the no-mcuboot-header-when-secondary branch from ea715c4 to 79021ce Compare August 21, 2026 13:28
@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants