fix(bootloader_support): declare esp_security as a dependency for flash_encrypt

flash_encrypt.c is in the unconditional source list and includes
esp_security/esp_key_mgr.h whenever SOC_KEY_MANAGER_SUPPORTED is set.
Move the esp_security PRIV_REQUIRES declaration outside the
BOOTLOADER_BUILD branch so every build variant that compiles
flash_encrypt.c gets the dependency consistently.
This commit is contained in:
Sudeep Mohanty
2026-05-21 10:05:48 +02:00
parent 07af6ddcf7
commit 56b1c32590
+5 -1
View File
@@ -105,9 +105,13 @@ else()
esp_hal_clock esp_hal_security)
endif()
# src/flash_encrypt.c includes esp_security/esp_key_mgr.h on
# SOC_KEY_MANAGER_SUPPORTED targets. flash_encrypt.c is in the unconditional
# srcs list, so declare the dep unconditionally for all build variants.
list(APPEND priv_requires esp_security)
if(BOOTLOADER_BUILD)
list(APPEND srcs "src/bootloader_panic.c")
list(APPEND priv_requires esp_security)
if(CONFIG_SECURE_FLASH_ENC_ENABLED)
list(APPEND srcs "src/flash_encryption/flash_encrypt.c"