diff --git a/cmake/sysbuild/tfm_signing.cmake b/cmake/sysbuild/tfm_signing.cmake index 2040bc483630..553cb6b370a1 100644 --- a/cmake/sysbuild/tfm_signing.cmake +++ b/cmake/sysbuild/tfm_signing.cmake @@ -87,9 +87,8 @@ function(zephyr_mcuboot_tasks) #endforeach() # set(west_sign imgtool sign --version 0.0.0+0 --align 4 --slot-size 262144 --pad-header --header-size 0x200) - string(TOUPPER "${DEFAULT_IMAGE}" application_uppercase) -# set(west_sign imgtool sign --version 0.0.0+0 --align 4 --slot-size $ --pad-header --header-size ${SB_CONFIG_PM_MCUBOOT_PAD}) - set(west_sign imgtool sign --version ${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} --align 4 --slot-size 0xa8000) #--pad-header --header-size ${SB_CONFIG_PM_MCUBOOT_PAD}) + set(west_sign imgtool sign --version 0.0.0+0 --align 4 --slot-size @PM_APP_SIZE@ CACHE STRING "west sign command") +# set(west_sign imgtool sign --version ${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} --align 4 --slot-size 0xa8000) #--pad-header --header-size ${SB_CONFIG_PM_MCUBOOT_PAD}) # Arguments to imgtool. if(NOT CONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS STREQUAL "") diff --git a/sysbuild/CMakeLists.txt b/sysbuild/CMakeLists.txt index 32356d653886..82b5de1a36e9 100644 --- a/sysbuild/CMakeLists.txt +++ b/sysbuild/CMakeLists.txt @@ -200,6 +200,9 @@ include_packaging() include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/partition_manager.cmake OPTIONAL) endif() + # temp hack, load the specifically needed PM setting into a CMake current scope var. + get_property(PM_APP_SIZE TARGET partition_manager PROPERTY PM_APP_SIZE) + get_property(PM_MCUBOOT_PAD TARGET partition_manager PROPERTY PM_MCUBOOT_PAD) foreach(image ${IMAGES}) configure_cache(IMAGE ${image}) endforeach()