]> granicus.if.org Git - esp-idf/commit
bootloader: Calculate SHA256 hash of image on every boot
authorAngus Gratton <angus@espressif.com>
Wed, 28 Jun 2017 06:46:34 +0000 (16:46 +1000)
committerAngus Gratton <gus@projectgus.com>
Wed, 19 Jul 2017 08:31:59 +0000 (18:31 +1000)
commit17adb40ca8d9159e28c3666cf46085eb16ddc7f6
tree6bcc11b9093d69cd129a1590be987e78f8ec6ef6
parentcaaa29c676d5f69d87191cb4bba9d4a2a83d9d76
bootloader: Calculate SHA256 hash of image on every boot

Makes app image booting more reliable (256-bit rather than 8-bit verification.)

Some measurements, time to boot a 655KB app.bin file and run to app_main() execution.

(All for rev 1 silicon, ie no 340ms spurious WDT delay.)

80MHz QIO mode:
before = 300ms
after = 140ms

40MHz DIO mode:
before = 712ms
after = 577ms

40MHz DIO mode, secure boot enabled
before = 1380ms
after = 934ms

(Secure boot involves two ECC signature verifications (partition table, app) that take approx 300ms each with 80MHz CPU.)
12 files changed:
components/app_update/esp_ota_ops.c
components/bootloader/subproject/main/bootloader_start.c
components/bootloader_support/include/esp_image_format.h
components/bootloader_support/include/esp_secure_boot.h
components/bootloader_support/include_priv/bootloader_sha.h
components/bootloader_support/src/bootloader_sha.c
components/bootloader_support/src/esp_image_format.c
components/bootloader_support/src/secure_boot_signatures.c
components/esptool_py/esptool
components/soc/esp32/include/soc/dport_reg.h
components/spi_flash/flash_mmap.c
tools/unit-test-app/sdkconfig