From 8456464c04761cbe4ccd30f2279f3231dd275ab5 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 25 Jul 2024 14:11:28 +0100 Subject: [PATCH] zephyr: Fix issue with sysbuild if something else is named mcuboot Fixes an issue which can occur in tests whereby an application has the name mcuboot but is not mcuboot itself Signed-off-by: Jamie McCrae --- boot/zephyr/sysbuild/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boot/zephyr/sysbuild/CMakeLists.txt b/boot/zephyr/sysbuild/CMakeLists.txt index a39f4c49..5a2a881b 100644 --- a/boot/zephyr/sysbuild/CMakeLists.txt +++ b/boot/zephyr/sysbuild/CMakeLists.txt @@ -4,9 +4,9 @@ function(mathup num align result) endfunction() function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_image_cmake) - cmake_parse_arguments(POST_IMAGE_CMAKE "" "IMAGE" "IMAGES" ${ARGN}) + cmake_parse_arguments(PRE_IMAGE_CMAKE "" "IMAGE" "IMAGES" ${ARGN}) - if(NOT "${POST_IMAGE_CMAKE_IMAGE}" STREQUAL "mcuboot") + if(NOT "${PRE_IMAGE_CMAKE_IMAGE}" STREQUAL "mcuboot" OR NOT SB_CONFIG_BOOTLOADER_MCUBOOT) return() endif() @@ -21,7 +21,7 @@ endfunction(${SYSBUILD_CURRENT_MODULE_NAME}_pre_image_cmake) function(${SYSBUILD_CURRENT_MODULE_NAME}_post_image_cmake) cmake_parse_arguments(POST_IMAGE_CMAKE "" "IMAGE" "IMAGES" ${ARGN}) - if(NOT "${POST_IMAGE_CMAKE_IMAGE}" STREQUAL "mcuboot") + if(NOT "${POST_IMAGE_CMAKE_IMAGE}" STREQUAL "mcuboot" OR NOT SB_CONFIG_BOOTLOADER_MCUBOOT) return() endif()