mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-01 06:27:29 +00:00
fix(bootloader): add legacy retained memory CRC calculation
* Closes https://github.com/espressif/esp-idf/issues/12849 In former versions of ESP-IDF, the user custom memory data in the retained memory was taken into account during the CRC calculation. This was changed in a later commit, the custom memory was ignored, therefore this can seen as a breaking change. This commit gives the possibility to choose between the former (legacy) or new way of calculating the CRC.
This commit is contained in:
@@ -121,7 +121,7 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata,
|
||||
#if CONFIG_BOOTLOADER_RESERVE_RTC_MEM
|
||||
|
||||
static uint32_t rtc_retain_mem_size(void) {
|
||||
#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
|
||||
#if CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC && !CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_IN_CRC
|
||||
/* A custom memory has been reserved by the user, do not consider this memory into CRC calculation as it may change without
|
||||
* the have the user updating the CRC. Return the offset of the custom field, which is equivalent to size of the structure
|
||||
* minus the size of everything after (including) `custom` */
|
||||
|
Reference in New Issue
Block a user