zephyr: Add estimated size of update trailer to sysbuild
Adds a new field which is set to the estimated size of the
upgrade slot data, this is used to know how much space should
be reserved in an update image to determine if an update will
fit or not
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
diff --git a/boot/zephyr/sysbuild/CMakeLists.txt b/boot/zephyr/sysbuild/CMakeLists.txt
index adcd744..a39f4c4 100644
--- a/boot/zephyr/sysbuild/CMakeLists.txt
+++ b/boot/zephyr/sysbuild/CMakeLists.txt
@@ -31,9 +31,12 @@
if("${app_type}" STREQUAL "MAIN")
sysbuild_get(mcuboot_image_footer_size IMAGE mcuboot CACHE)
+ sysbuild_get(mcuboot_image_upgrade_footer_size IMAGE mcuboot CACHE)
math(EXPR mcuboot_image_footer_size "${mcuboot_image_footer_size}" OUTPUT_FORMAT HEXADECIMAL)
+ math(EXPR mcuboot_image_upgrade_footer_size "${mcuboot_image_upgrade_footer_size}" OUTPUT_FORMAT HEXADECIMAL)
set_property(TARGET ${image} APPEND_STRING PROPERTY CONFIG "CONFIG_ROM_END_OFFSET=${mcuboot_image_footer_size}\n")
+ set_property(TARGET ${image} APPEND_STRING PROPERTY CONFIG "CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE=${mcuboot_image_upgrade_footer_size}\n")
return()
endif()
endforeach()