Selaa lähdekoodia

tools: Rename the flash size detection kconfig option

9c46c98b4c81699209fc9f44e3a3b1d94c5bf5b7 have changed the default value
of ESPTOOLPY_FLASHSIZE_DETECT. As the side effect, existing
projects (having the option still enabled) started to discard the SHA256 digest.

Rename the ESPTOOLPY_FLASHSIZE_DETECT option so existing projects would
have the value disabled by default.

Closes https://github.com/espressif/esp-idf/issues/9148
Roland Dobai 3 vuotta sitten
vanhempi
sitoutus
d56c578ddb

+ 1 - 1
components/esptool_py/Kconfig.projbuild

@@ -155,7 +155,7 @@ menu "Serial flasher config"
         default "64MB" if ESPTOOLPY_FLASHSIZE_64MB
         default "128MB" if ESPTOOLPY_FLASHSIZE_128MB
 
-    config ESPTOOLPY_FLASHSIZE_DETECT
+    config ESPTOOLPY_HEADER_FLASHSIZE_UPDATE
         bool "Detect flash size when flashing bootloader"
         default n
         help

+ 1 - 1
components/esptool_py/project_include.cmake

@@ -63,7 +63,7 @@ if(min_rev)
     unset(min_rev)
 endif()
 
-if(CONFIG_ESPTOOLPY_FLASHSIZE_DETECT)
+if(CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE)
     # Set ESPFLASHSIZE to 'detect' *after* esptool_elf2image_args are generated,
     # as elf2image can't have 'detect' as an option...
     set(ESPFLASHSIZE detect)

+ 5 - 0
docs/en/migration-guides/tools.rst

@@ -35,3 +35,8 @@ Deprecated commands
      - erase-otadata
    * - read_otadata
      - read-otadata
+
+Esptool
+-------
+
+The CONFIG_ESPTOOLPY_FLASHSIZE_DETECT option has been renamed to :ref:`CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE` and it is disabled by default. New and existing projects migrated to ESP-IDF v5.0 will have to set :ref:`CONFIG_ESPTOOLPY_FLASHSIZE`. If this is not possible because the flash size is not known at build time then :ref:`CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE` can be enabled but this will have the consequence of not appending a SHA256 digest after the image in order that the binary header could be updated with the flash size during flashing without invalidating the digest.