Преглед изворни кода

bootloader_support: fix bug OTA & flash encryption incompatible

ota data partition should be encrypted unconditionally when flash encrypt enable
Tian Zhong Xing пре 9 година
родитељ
комит
2173ad3b45
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      components/bootloader_support/src/flash_encrypt.c

+ 3 - 0
components/bootloader_support/src/flash_encrypt.c

@@ -285,6 +285,9 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
         } else {
         } else {
             should_encrypt = false;
             should_encrypt = false;
         }
         }
+    } else if (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_OTA) {
+        /* check if we have ota data partition and the partition should be encrypted unconditionally */
+        should_encrypt = true;
     }
     }
 
 
     if (!should_encrypt) {
     if (!should_encrypt) {