Secure boot: fix bug where verification key was not embedded in app.
While building the app with CMake, when secured boot is enabled, the verification key is not embedded in the app. This leads to build failure. This change fixes
@@ -18,6 +18,13 @@ if(${BOOTLOADER_BUILD})
set(COMPONENT_PRIV_REQUIRES spi_flash micro-ecc efuse)
list(APPEND COMPONENT_SRCS "src/bootloader_init.c")
+else()
+ set(COMPONENT_ADD_INCLUDEDIRS "include")
+ set(COMPONENT_PRIV_INCLUDEDIRS "include_bootloader")
+ set(COMPONENT_REQUIRES)
+ set(COMPONENT_PRIV_REQUIRES spi_flash mbedtls micro-ecc efuse)
+endif()
+
if(CONFIG_SECURE_SIGNED_APPS)
get_filename_component(secure_boot_verification_key
"signature_verification_key.bin"
@@ -51,11 +58,5 @@ if(${BOOTLOADER_BUILD})
APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"${secure_boot_verification_key}")
endif()
-else()
- set(COMPONENT_ADD_INCLUDEDIRS "include")
- set(COMPONENT_PRIV_INCLUDEDIRS "include_bootloader")
- set(COMPONENT_REQUIRES)
- set(COMPONENT_PRIV_REQUIRES spi_flash mbedtls micro-ecc efuse)
-endif()
register_component()
