Skip to content

Commit dbb9506

Browse files
committed
[nrf noup] boot: Skip override in merged slot
In merges slot approach, mcuboot should not automatically set the ROM_END_OFFSET as it is not obvious, which image includes the (merged) MCUboot trailer. Ref: NCSDK-35612 Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent 7c44ed0 commit dbb9506

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

boot/zephyr/sysbuild/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_image_cmake)
3535
math(EXPR mcuboot_image_footer_size "${mcuboot_image_footer_size}" OUTPUT_FORMAT HEXADECIMAL)
3636
math(EXPR mcuboot_image_upgrade_footer_size "${mcuboot_image_upgrade_footer_size}" OUTPUT_FORMAT HEXADECIMAL)
3737

38-
set_property(TARGET ${image} APPEND_STRING PROPERTY CONFIG "CONFIG_ROM_END_OFFSET=${mcuboot_image_footer_size}\n")
38+
# When merged binary is generated, the checks for header and trailer
39+
# offsets are implemented in CMake, instead of linker scripts.
40+
if(NOT SB_CONFIG_MCUBOOT_SIGN_MERGED_BINARY)
41+
set_property(TARGET ${image} APPEND_STRING PROPERTY CONFIG "CONFIG_ROM_END_OFFSET=${mcuboot_image_footer_size}\n")
42+
endif()
3943
set_property(TARGET ${image} APPEND_STRING PROPERTY CONFIG "CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE=${mcuboot_image_upgrade_footer_size}\n")
4044
return()
4145
endif()

0 commit comments

Comments
 (0)