mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(flash_enc): move esp_flash_encryption_enabled() to efuse component
This commit is contained in:
committed by
Chen Ji Chang
parent
fea2c08655
commit
04df934c05
@@ -6,7 +6,7 @@ set(reqs esp_blockdev)
|
||||
if(BOOTLOADER_BUILD)
|
||||
set(srcs "partition_bootloader.c")
|
||||
list(APPEND reqs spi_flash)
|
||||
set(priv_reqs "bootloader_support")
|
||||
set(priv_reqs "bootloader_support" "efuse")
|
||||
|
||||
idf_component_register(SRCS "${srcs}"
|
||||
INCLUDE_DIRS "include"
|
||||
@@ -18,7 +18,7 @@ if(BOOTLOADER_BUILD)
|
||||
elseif(esp_tee_build)
|
||||
set(srcs "partition_tee.c")
|
||||
list(APPEND reqs spi_flash)
|
||||
set(priv_reqs "tee_flash_mgr")
|
||||
set(priv_reqs "tee_flash_mgr" "efuse")
|
||||
|
||||
idf_component_register(SRCS "${srcs}"
|
||||
INCLUDE_DIRS "include"
|
||||
@@ -29,7 +29,7 @@ elseif(esp_tee_build)
|
||||
# regular, OS build
|
||||
else()
|
||||
set(srcs "partition.c")
|
||||
set(priv_reqs esp_system spi_flash partition_table)
|
||||
set(priv_reqs esp_system spi_flash partition_table efuse)
|
||||
set(reqs esp_blockdev)
|
||||
set(private_include_dirs)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "esp_partition.h"
|
||||
#include "esp_flash.h"
|
||||
#if !CONFIG_IDF_TARGET_LINUX
|
||||
#include "esp_flash_encrypt.h"
|
||||
#include "esp_efuse.h"
|
||||
#endif
|
||||
#include "spi_flash_mmap.h"
|
||||
#include "esp_log.h"
|
||||
@@ -81,7 +81,7 @@ static bool is_partition_encrypted(bool encryption_config, esp_partition_type_t
|
||||
return false;
|
||||
#else
|
||||
bool ret_encrypted = encryption_config;
|
||||
if (!esp_flash_encryption_enabled()) {
|
||||
if (!esp_efuse_is_flash_encryption_enabled()) {
|
||||
/* If flash encryption is not turned on, no partitions should be treated as encrypted */
|
||||
ret_encrypted = false;
|
||||
} else if (type == ESP_PARTITION_TYPE_APP
|
||||
|
||||
Reference in New Issue
Block a user