Skip to content

sysbuild: bootloader: fix MCUboot Kconfig symbol placement #93076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JarmouniA
Copy link
Collaborator

@JarmouniA JarmouniA commented Jul 13, 2025

MCUBOOT_MODE_SINGLE_APP_RAM_LOAD shoud not be a MCUBOOT_MODE choice because it is not a separate load mode but rather a specific case of MCUBOOT_MODE_RAM_LOAD

Without this change, building with SB_CONFIG_MCUBOOT_MODE_SINGLE_APP_RAM_LOAD=y leads to multiple modes being selected if a default mode is set on MCUboot side (for ex. https://github.com/mcu-tools/mcuboot/blob/5eaf190a8a9d8fc032b989bf96fc56b3b756dd55/boot/zephyr/boards/stm32h7s78_dk.conf#L1) and MCUboot build failing with the error

mcuboot/boot/bootutil/src/bootutil_priv.h:70:2: error: #error "Please enable only one of MCUBOOT_OVERWRITE_ONLY, MCUBOOT_SWAP_USING_MOVE, MCUBOOT_SWAP_USING_OFFSET, MCUBOOT_DIRECT_XIP, MCUBOOT_RAM_LOAD or MCUBOOT_FIRMWARE_LOADER"

Tested with

west build -p always -b stm32h7s78_dk samples/sysbuild/with_mcuboot --sysbuild -DSB_CONFIG_MCUBOOT_MODE_SINGLE_APP_RAM_LOAD=y

@JarmouniA JarmouniA added this to the v4.2.0 milestone Jul 13, 2025
@JarmouniA JarmouniA changed the title sysbuild: bootloader: fix Kconfig symbol placement sysbuild: bootloader: fix MCUboot Kconfig symbol placement Jul 13, 2025
MCUBOOT_MODE_SINGLE_APP_RAM_LOAD shoud not be a MCUBOOT_MODE choice
because it is not a separate load mode but rather a specific case of
MCUBOOT_MODE_RAM_LOAD

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
@JarmouniA JarmouniA force-pushed the fix_mcuboot_mode_kconfig branch from 9d27a75 to 53b4f3b Compare July 13, 2025 23:16
@JarmouniA JarmouniA added the bug The issue is a bug, or the PR is fixing a bug label Jul 13, 2025
Copy link

Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Incorrect, it is a mode and remains part of the choice. If you get an error about modes then the image configuration script is wrong and that should be fixed

@JarmouniA JarmouniA marked this pull request as ready for review July 14, 2025 11:22
@JarmouniA
Copy link
Collaborator Author

Incorrect, it is a mode and remains part of the choice.

It is enabling MCUBOOT_RAM_LOAD under the hood https://github.com/mcu-tools/mcuboot/blob/5eaf190a8a9d8fc032b989bf96fc56b3b756dd55/boot/zephyr/include/mcuboot_config/mcuboot_config.h#L134

@JarmouniA
Copy link
Collaborator Author

If you get an error about modes then the image configuration script is wrong

If you don't mind, which part of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: MCUBoot area: Sysbuild bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MCUboot: building with SB_CONFIG_MCUBOOT_MODE_SINGLE_APP_RAM_LOAD=y fails
3 participants