mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
Merge branch 'feature/add_bootloader_sector_pad_option_v4.3' into 'release/v4.3'
esptool_py: Added a --pad-to-size flag to align the bootloader image (v4.3) See merge request espressif/esp-idf!22328
This commit is contained in:
Submodule components/esptool_py/esptool updated: e53efcf84c...4bc311767b
@ -25,6 +25,17 @@ set(ESPTOOLPY_FLASH_OPTIONS
|
||||
--flash_size ${ESPFLASHSIZE}
|
||||
)
|
||||
|
||||
if(BOOTLOADER_BUILD AND CONFIG_SECURE_BOOT_V2_ENABLED)
|
||||
# The bootloader binary needs to be 4KB aligned in order to append a secure boot V2 signature block.
|
||||
# If CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES is NOT set, the bootloader
|
||||
# image generated is not 4KB aligned for external HSM to sign it readily.
|
||||
# Following esptool option --pad-to-size 4KB generates a 4K aligned bootloader image.
|
||||
# In case of signing during build, espsecure.py "sign_data" operation handles the 4K alignment of the image.
|
||||
if(NOT CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
|
||||
list(APPEND esptool_elf2image_args --pad-to-size 4KB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT BOOTLOADER_BUILD)
|
||||
set(esptool_elf2image_args --elf-sha256-offset 0xb0)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user