fix(build_system): Add Bootloader and Partition Table as dependencies for encrypted-flash

- If ESP-TEE is enabled, also add it as the dependency for the encrypted-flash target
This commit is contained in:
harshal.patil
2025-10-31 14:06:37 +05:30
parent 811e27118d
commit 7338c5179b
3 changed files with 15 additions and 0 deletions
+5
View File
@@ -35,4 +35,9 @@ if(NOT CONFIG_SECURE_BOOT OR CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT)
# Add bootloader as a dependency to the flash target
add_dependencies(flash bootloader)
if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT)
# Also add bootloader as a dependency to the encrypted-flash target
add_dependencies(encrypted-flash bootloader)
endif()
endif()
+4
View File
@@ -28,6 +28,10 @@ else()
endif()
add_dependencies(esp_tee partition_table_bin)
add_dependencies(flash esp_tee)
if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT)
# Also add ESP-TEE binary as a dependency to the encrypted-flash target
add_dependencies(encrypted-flash esp_tee)
endif()
set(image_file ${TEE_BUILD_DIR}/esp_tee.bin)
partition_table_get_partition_info(offset "--partition-name ${partition}" "offset")
esptool_py_flash_target_image(flash "${partition}" "${offset}" "${image_file}")
@@ -177,5 +177,11 @@ if(CONFIG_APP_BUILD_GENERATE_BINARIES AND CONFIG_APP_BUILD_TYPE_APP_2NDBOOT)
# Add partition table as a dependency to the flash target
add_dependencies(flash partition_table_bin)
if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT)
# Also add partition table as a dependency to the encrypted-flash target
add_dependencies(encrypted-flash partition_table_bin)
endif()
add_deprecated_target_alias(partition_table-flash partition-table-flash)
endif()