mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
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:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user