From 62c06047da62d17498bb39f5c10fbe4bf39d75e9 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 21 Aug 2019 12:19:08 +1000 Subject: [PATCH] bootloader_support: Remove deprecated partition load/verify functions Deprecated since v3.2 --- .../include/esp_flash_partitions.h | 6 ---- .../include/esp_image_format.h | 30 ------------------- .../bootloader_support/src/esp_image_format.c | 2 -- 3 files changed, 38 deletions(-) diff --git a/components/bootloader_support/include/esp_flash_partitions.h b/components/bootloader_support/include/esp_flash_partitions.h index e652cc300c..004bbeb236 100644 --- a/components/bootloader_support/include/esp_flash_partitions.h +++ b/components/bootloader_support/include/esp_flash_partitions.h @@ -98,12 +98,6 @@ typedef struct { esp_err_t esp_partition_table_verify(const esp_partition_info_t *partition_table, bool log_errors, int *num_partitions); -/* This function is included for compatibility with the ESP-IDF v3.x API */ -inline static __attribute__((deprecated)) esp_err_t esp_partition_table_basic_verify(const esp_partition_info_t *partition_table, bool log_errors, int *num_partitions) -{ - return esp_partition_table_verify(partition_table, log_errors, num_partitions); -} - /** * Check whether the region on the main flash is safe to write. * diff --git a/components/bootloader_support/include/esp_image_format.h b/components/bootloader_support/include/esp_image_format.h index 4e656a17b6..928a29adf6 100644 --- a/components/bootloader_support/include/esp_image_format.h +++ b/components/bootloader_support/include/esp_image_format.h @@ -79,36 +79,6 @@ _Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_R _Static_assert(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); #endif -/** - * @brief Verify and (optionally, in bootloader mode) load an app image. - * - * This name is deprecated and is included for compatibility with the ESP-IDF v3.x API. - * It will be removed in V4.0 version. - * Function has been renamed to esp_image_verify(). - * Use function esp_image_verify() to verify a image. And use function bootloader_load_image() to load image from a bootloader space. - * - * If encryption is enabled, data will be transparently decrypted. - * - * @param mode Mode of operation (verify, silent verify, or load). - * @param part Partition to load the app from. - * @param[inout] data Pointer to the image metadata structure which is be filled in by this function. 'start_addr' member should be set (to the start address of the image.) Other fields will all be initialised by this function. - * - * Image validation checks: - * - Magic byte. - * - Partition smaller than 16MB. - * - All segments & image fit in partition. - * - 8 bit image checksum is valid. - * - SHA-256 of image is valid (if image has this appended). - * - (Signature) if signature verification is enabled. - * - * @return - * - ESP_OK if verify or load was successful - * - ESP_ERR_IMAGE_FLASH_FAIL if a SPI flash error occurs - * - ESP_ERR_IMAGE_INVALID if the image appears invalid. - * - ESP_ERR_INVALID_ARG if the partition or data pointers are invalid. - */ -esp_err_t esp_image_load(esp_image_load_mode_t mode, const esp_partition_pos_t *part, esp_image_metadata_t *data) __attribute__((deprecated)); - /** * @brief Verify an app image. * diff --git a/components/bootloader_support/src/esp_image_format.c b/components/bootloader_support/src/esp_image_format.c index b0db9b3984..7662c66cc9 100644 --- a/components/bootloader_support/src/esp_image_format.c +++ b/components/bootloader_support/src/esp_image_format.c @@ -287,8 +287,6 @@ esp_err_t esp_image_verify(esp_image_load_mode_t mode, const esp_partition_pos_t return image_load(mode, part, data); } -esp_err_t esp_image_load(esp_image_load_mode_t mode, const esp_partition_pos_t *part, esp_image_metadata_t *data) __attribute__((alias("esp_image_verify"))); - static esp_err_t verify_image_header(uint32_t src_addr, const esp_image_header_t *image, bool silent) { esp_err_t err = ESP_OK; -- 2.40.0