fix(esptool_py): Check the size of the bootloader + signature block

This commit is contained in:
Konstantin Kondrashov 2024-09-09 15:25:53 +03:00 committed by BOT
parent 52175a6548
commit d2123cf531

View File

@ -66,10 +66,19 @@ consist of two ota app without factory or test partitions.")
endif() # NOT BOOTLOADER_BUILD endif() # NOT BOOTLOADER_BUILD
if(BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
# Generate bootloader post-build check of the bootloader size against the offset # Generate bootloader post-build check of the bootloader size against the offset
partition_table_add_check_bootloader_size_target(bootloader_check_size partition_table_add_check_bootloader_size_target(bootloader_check_size
DEPENDS gen_project_binary DEPENDS gen_project_binary
BOOTLOADER_BINARY_PATH "${build_dir}/${PROJECT_BIN}" BOOTLOADER_BINARY_PATH "${build_dir}/${PROJECT_BIN}"
RESULT bootloader_check_size_command) RESULT bootloader_check_size_command)
add_dependencies(app bootloader_check_size) # note: in the subproject, so the target is 'app'... add_dependencies(app bootloader_check_size) # note: in the subproject, so the target is 'app'...
if(CONFIG_SECURE_BOOT_V2_ENABLED AND CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
# Check the size of the bootloader + signature block.
partition_table_add_check_bootloader_size_target(bootloader_check_size_signed
DEPENDS gen_signed_bootloader
BOOTLOADER_BINARY_PATH "${build_dir}/${PROJECT_BIN}"
RESULT bootloader_check_size_signed_command)
add_dependencies(app bootloader_check_size_signed) # note: in the subproject, so the target is 'app'...
endif()
endif() endif()