]> granicus.if.org Git - esp-idf/commitdiff
bootloader_support: fix bug OTA & flash encryption incompatible
authorTian Zhong Xing <tianzhongxing@espressif.com>
Tue, 24 Jan 2017 10:30:13 +0000 (18:30 +0800)
committerAngus Gratton <angus@espressif.com>
Thu, 26 Jan 2017 05:20:06 +0000 (16:20 +1100)
ota data partition should be encrypted unconditionally when flash encrypt enable

components/bootloader_support/src/flash_encrypt.c

index 8b9ca60cd1a72a1e95933562d174b06428c4d781..8ba068d03b7309cc080171407c3800bcfec67e0d 100644 (file)
@@ -285,6 +285,9 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
         } else {
             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) {