Skip to content

Commit 2333878

Browse files
MarkusLassilarlubos
authored andcommitted
sysbuild: Fix setting only SB_CONFIG_APPROTECT_*
Setting SB_CONFIG_APPROTECT_* values resulted in error if SB_CONFIG_SECURE_APPROTECT_* value was not set. Signed-off-by: Markus Lassila <[email protected]>
1 parent 970ac37 commit 2333878

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

sysbuild/CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -595,13 +595,19 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
595595
endif()
596596

597597
foreach(image ${IMAGES})
598-
if(secure_approtect AND SB_CONFIG_SUPPORT_NETCORE AND NOT SB_CONFIG_NETCORE_NONE AND ${image} IN_LIST network_images)
598+
if(SB_CONFIG_SUPPORT_NETCORE AND NOT SB_CONFIG_NETCORE_NONE AND ${image} IN_LIST network_images)
599599
# Network core image
600-
set_config_bool(${image} ${normal_approtect} y)
601-
elseif(normal_approtect)
600+
if(normal_approtect)
601+
set_config_bool(${image} ${normal_approtect} y)
602+
endif()
603+
else()
602604
# Application (or other) core image
603-
set_config_bool(${image} ${normal_approtect} y)
604-
set_config_bool(${image} ${secure_approtect} y)
605+
if(normal_approtect)
606+
set_config_bool(${image} ${normal_approtect} y)
607+
endif()
608+
if(secure_approtect)
609+
set_config_bool(${image} ${secure_approtect} y)
610+
endif()
605611
endif()
606612
endforeach()
607613

0 commit comments

Comments
 (0)