mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-22 17:02:25 +00:00
nvs_flash: Modify the default NVS initialization API with internal nvs encryption
handling (only when nvs encryption is enabled) * NVS Encryption will now be turned on by default with flash encryption * Updated the flash encryption example to shocase NVS encryption along with information on how to configure and use NVS encryption * Updated respective test case * Added two partition tables for NVS encryption i) Table 1- Single factory app, no OTA, encrypted NVS ii) Table 2- Factory app, Two OTA, encrypted NVS
This commit is contained in:
@@ -18,6 +18,12 @@ menu "Partition Table"
|
||||
bool "Factory app, two OTA definitions"
|
||||
config PARTITION_TABLE_CUSTOM
|
||||
bool "Custom partition table CSV"
|
||||
config PARTITION_TABLE_SINGLE_APP_ENCRYPTED_NVS
|
||||
bool "Single factory app, no OTA, encrypted NVS"
|
||||
depends on !ESP32_COREDUMP_ENABLE_TO_FLASH && NVS_ENCRYPTION
|
||||
config PARTITION_TABLE_TWO_OTA_ENCRYPTED_NVS
|
||||
bool "Factory app, two OTA definitions, encrypted NVS"
|
||||
depends on !ESP_COREDUMP_ENABLE_TO_FLASH && NVS_ENCRYPTION
|
||||
endchoice
|
||||
|
||||
config PARTITION_TABLE_CUSTOM_FILENAME
|
||||
@@ -31,8 +37,10 @@ menu "Partition Table"
|
||||
string
|
||||
default "partitions_singleapp.csv" if PARTITION_TABLE_SINGLE_APP && !ESP_COREDUMP_ENABLE_TO_FLASH
|
||||
default "partitions_singleapp_coredump.csv" if PARTITION_TABLE_SINGLE_APP && ESP_COREDUMP_ENABLE_TO_FLASH
|
||||
default "partitions_singleapp_encr_nvs.csv" if PARTITION_TABLE_SINGLE_APP_ENCRYPTED_NVS
|
||||
default "partitions_two_ota.csv" if PARTITION_TABLE_TWO_OTA && !ESP_COREDUMP_ENABLE_TO_FLASH
|
||||
default "partitions_two_ota_coredump.csv" if PARTITION_TABLE_TWO_OTA && ESP_COREDUMP_ENABLE_TO_FLASH
|
||||
default "partitions_two_ota_encr_nvs.csv" if PARTITION_TABLE_TWO_OTA_ENCRYPTED_NVS
|
||||
default PARTITION_TABLE_CUSTOM_FILENAME if PARTITION_TABLE_CUSTOM
|
||||
|
||||
config PARTITION_TABLE_OFFSET
|
||||
|
@@ -0,0 +1,6 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||
nvs, data, nvs, , 0x6000,
|
||||
phy_init, data, phy, , 0x1000,
|
||||
factory, app, factory, , 1M,
|
||||
nvs_key, data, nvs_keys,, 0x1000, encrypted
|
|
@@ -0,0 +1,9 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||
nvs, data, nvs, , 0x4000,
|
||||
otadata, data, ota, , 0x2000,
|
||||
phy_init, data, phy, , 0x1000,
|
||||
factory, app, factory, , 1M,
|
||||
ota_0, app, ota_0, , 1M,
|
||||
ota_1, app, ota_1, , 1M,
|
||||
nvs_key, data, nvs_keys,, 0x1000, encrypted
|
|
Reference in New Issue
Block a user