-
Notifications
You must be signed in to change notification settings - Fork 19
sysbuild: bootconf lock #391
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,30 @@ | ||||||
# | ||||||
# Copyright (c) 2025 Nordic Semiconductor ASA | ||||||
# | ||||||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||||||
# | ||||||
|
||||||
function(setup_bootconf_data) | ||||||
add_custom_target(bootconf_target | ||||||
ALL | ||||||
DEPENDS ${CMAKE_BINARY_DIR}/bootconf.hex | ||||||
) | ||||||
|
||||||
dt_nodelabel(boot_partition_node_full_path NODELABEL "boot_partition") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
dt_reg_size(boot_partition_node_size PATH "${boot_partition_node_full_path}") | ||||||
if(${boot_partition_node_size} GREATER 0x7c00) | ||||||
message(WARNING "boot_partition doesn't fit into protection region. | ||||||
Protection will be applied over maximum allowed span.") | ||||||
endif() | ||||||
|
||||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bootconf.hex | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this creates the file but does not flash it. A special project can be created that will allow flashing of the file with west flash, see zephyrproject-rtos/zephyr#94796 for how to do this (note: more complex) |
||||||
COMMAND ${Python3_EXECUTABLE} | ||||||
${ZEPHYR_NRF_MODULE_DIR}/scripts/reglock.py | ||||||
--output ${CMAKE_BINARY_DIR}/bootconf.hex | ||||||
--size ${boot_partition_node_size} | ||||||
VERBATIM | ||||||
) | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
endfunction() | ||||||
|
||||||
setup_bootconf_data() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake indent is 2 spaces, also move file up a folder as this does not run in sysbuild context