feat(esp_image_verify): split image verification out of bootloader_support

This commit is contained in:
Ashish Sharma
2026-07-08 15:54:40 +08:00
committed by Mahavir Jain
parent b912691fcd
commit e7af5c69d9
54 changed files with 650 additions and 520 deletions

View File

@@ -535,6 +535,10 @@ void esp_partition_munmap(esp_partition_mmap_handle_t handle);
* - ESP_ERR_NO_MEM: Cannot allocate memory for sha256 operation.
* - ESP_ERR_IMAGE_INVALID: App partition doesn't contain a valid app image.
* - ESP_FAIL: An allocation error occurred.
*
* @note Requires the esp_image_verify component in the build (apps using OTA get
* it through app_update). Calling it without that component fails at link
* time with an undefined reference.
*/
esp_err_t esp_partition_get_sha256(const esp_partition_t* partition, uint8_t* sha_256);

View File

@@ -0,0 +1,27 @@
/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_partition.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Find the APP partition containing the currently executing firmware.
*
* Private helper shared by esp_partition and app_update; application code
* should prefer esp_ota_get_running_partition() (app_update). The result is
* cached after the first lookup.
*
* @return Running APP partition
*/
const esp_partition_t *esp_partition_get_running_partition(void);
#ifdef __cplusplus
}
#endif