Skip to content

Commit

Permalink
fix(bootloader_support): Make esp_flash_encrypt.h independent of spi_…
Browse files Browse the repository at this point in the history
…flash_mmap.h header
  • Loading branch information
Harshal5 committed May 13, 2024
1 parent 5dfbc47 commit 3eb6487
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions components/app_update/esp_ota_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "esp_image_format.h"
#include "esp_secure_boot.h"
#include "esp_flash_encrypt.h"
#include "spi_flash_mmap.h"
#include "sdkconfig.h"

#include "esp_ota_ops.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#include "hal/efuse_ll.h"
#include "hal/efuse_hal.h"

#ifndef BOOTLOADER_BUILD
#include "spi_flash_mmap.h"
#endif
#include "hal/spi_flash_ll.h"
#include "rom/spi_flash.h"
#if CONFIG_IDF_TARGET_ESP32
Expand Down
3 changes: 0 additions & 3 deletions components/bootloader_support/include/esp_flash_encrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#include "esp_attr.h"
#include "esp_err.h"
#include "soc/soc_caps.h"
#ifndef BOOTLOADER_BUILD
#include "spi_flash_mmap.h"
#endif
#include "hal/efuse_ll.h"
#include "sdkconfig.h"

Expand Down
1 change: 0 additions & 1 deletion components/bootloader_support/src/bootloader_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "bootloader_random.h"
#include "bootloader_clock.h"
#include "bootloader_common.h"
#include "esp_flash_encrypt.h"
#include "esp_cpu.h"
#include "soc/rtc.h"
#include "hal/wdt_hal.h"
Expand Down
3 changes: 3 additions & 0 deletions components/bootloader_support/src/bootloader_utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#include "esp_app_desc.h"
#include "esp_secure_boot.h"
#include "esp_flash_encrypt.h"
#ifndef BOOTLOADER_BUILD
#include "spi_flash_mmap.h"
#endif
#include "esp_flash_partitions.h"
#include "bootloader_flash_priv.h"
#include "bootloader_random.h"
Expand Down
1 change: 1 addition & 0 deletions components/esp_partition/partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#if !CONFIG_IDF_TARGET_LINUX
#include "esp_flash.h"
#include "esp_flash_encrypt.h"
#include "spi_flash_mmap.h"
#endif
#include "esp_log.h"
#include "esp_rom_md5.h"
Expand Down
2 changes: 1 addition & 1 deletion components/esp_system/port/cpu_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
#include "bootloader_flash_config.h"
#include "bootloader_flash.h"
#include "esp_private/crosscore_int.h"
#include "esp_flash_encrypt.h"

#include "esp_private/sleep_gpio.h"
#include "hal/wdt_hal.h"
Expand All @@ -114,6 +113,7 @@
#include "esp_rom_spiflash.h"
#include "bootloader_init.h"
#include "esp_private/bootloader_flash_internal.h"
#include "spi_flash_mmap.h"
#endif // CONFIG_APP_BUILD_TYPE_RAM

//This dependency will be removed in the future
Expand Down
1 change: 1 addition & 0 deletions components/espcoredump/src/core_dump_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "esp_flash_encrypt.h"
#include "esp_rom_crc.h"
#include "esp_private/spi_flash_os.h"
#include "spi_flash_mmap.h"

#define BLANK_COREDUMP_SIZE 0xFFFFFFFF

Expand Down
4 changes: 2 additions & 2 deletions components/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ endif()
if(SHA_PERIPHERAL_TYPE STREQUAL "dma" OR AES_PERIPHERAL_TYPE STREQUAL "dma")
target_link_libraries(mbedcrypto PRIVATE idf::esp_mm)
if(CONFIG_SOC_SHA_GDMA OR CONFIG_SOC_AES_GDMA)
target_sources(mbedcrypto PRIVATE "${COMPONENT_DIR}/port/crypto_shared_gdma/esp_crypto_shared_gdma.c")
if(CONFIG_SOC_AXI_DMA_EXT_MEM_ENC_ALIGNMENT)
target_link_libraries(mbedcrypto PRIVATE idf::spi_flash idf::bootloader_support)
target_link_libraries(mbedcrypto PRIVATE idf::bootloader_support)
endif()
target_sources(mbedcrypto PRIVATE "${COMPONENT_DIR}/port/crypto_shared_gdma/esp_crypto_shared_gdma.c")
endif()
endif()

Expand Down
1 change: 1 addition & 0 deletions components/nvs_flash/test_apps/main/test_nvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "esp_log.h"
#include "esp_partition.h"
#include "esp_system.h"
#include "spi_flash_mmap.h"

#include "nvs.h"
#include "nvs_flash.h"
Expand Down

0 comments on commit 3eb6487

Please sign in to comment.