Skip to content
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

sysbuild: Emit warning log when MCUboot uses KMU #19352

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sysbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)

if(SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU)
set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_USING_KMU y)
if(NOT SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU_SKIP_WARNING)
message(WARNING "
------------------------------------------------------------------------------
--- WARNING: MCUboot uses KMU stored keys for signature verification. Make ---
Copy link
Contributor

Choose a reason for hiding this comment

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

Add link to provisioning documentation

Also add information that without keys you won't be able to run application and application won't start so that a user could quickly identify this warning as a cause of his potential problem.

--- sure to use `west ncs-provision` to manually provision the bootloader. ---
------------------------------------------------------------------------------
")
endif()
else()
set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_USING_KMU n)
endif()
Expand Down
9 changes: 9 additions & 0 deletions sysbuild/Kconfig.mcuboot
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ config MCUBOOT_SIGNATURE_USING_KMU
help
The device needs to be provisioned with proper set of keys.

config MCUBOOT_SIGNATURE_USING_KMU_SKIP_WARNING
bool "Skip KMU provisioning CMake warning"
depends on MCUBOOT_SIGNATURE_USING_KMU
help
When using KMU stored keys for MCUboot signature verification, build
system emits a CMake warning to ensure that user is aware that manual
provisioning of the KMU keys is necessary. Enable the option to skip
the warning.

endif

config MCUBOOT_USE_ALL_AVAILABLE_RAM
Expand Down
Loading