-
Notifications
You must be signed in to change notification settings - Fork 632
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: Add alternative hex file and sysbuild signing script support #1370
Conversation
nordicjm
commented
Oct 31, 2023
cmake/flash/CMakeLists.txt
Outdated
if(SYSBUILD AND DEFINED alt_file) | ||
set(hex "${alt_file}") | ||
else() |
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.
not directly related to those changes themselves, but I was wondering if this would be a use-case where sysbuild
should be able to support flashing of specific binaries / hex files.
That way, sysbuild could mark the app
image as build only, and instead specify its own alternate image as a custom hex file to flash.
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.
Could be a possible expansion, though there area things like zephyrproject-rtos/zephyr#64551 which throw a spanner in the works
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.
not directly related to those changes themselves, but I was wondering if this would be a use-case where
sysbuild
should be able to support flashing of specific binaries / hex files.
it is not support well for west flash
, as it heavyily depends on CMakeCache.txt and runners.yaml, which is generated by west build
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.
minor nit, but otherwise looks good.
cmake/flash/CMakeLists.txt
Outdated
if(CONFIG_BUILD_OUTPUT_HEX) | ||
get_runners_prop(hex_file hex "${KERNEL_HEX_NAME}") | ||
if(SYSBUILD AND DEFINED alt_file) |
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.
you already tested for if(SYSBUILD)
above, so if SYSBUILD
is false then alt_file
will be undefined.
So would be enough to just do:
if(SYSBUILD AND DEFINED alt_file) | |
if(DEFINED alt_file) |
Allows a sysbuild project to specify a signing script file to use instead of the default zephyr one Upstream PR: zephyrproject-rtos/zephyr#63912 Signed-off-by: Jamie McCrae <[email protected]>
Create dedicated function, sysbuild_cache(), for handling sysbuild's image specific cache file. This provides a cleaner handling of said cache file, and provides a mechanism for updating the cache file at later sysbuild CMake stages. Upstream PR: zephyrproject-rtos/zephyr#65124 Signed-off-by: Torsten Rasmussen <[email protected]>