refactor (bootloader_support, efuse)!: remove target-specific rom includes

The following two functions in bootloader_support are private now:
* esp_secure_boot_verify_sbv2_signature_block()
* esp_secure_boot_verify_rsa_signature_block()
They have been moved into private header files
inside bootloader_private/

* Removed bootloader_reset_reason.h and
  bootloader_common_get_reset_reason() completely.
  Alternative in ROM component is available.

* made esp_efuse.h independent of target-specific rom header
This commit is contained in:
Jakob Hasse
2022-05-23 12:36:02 +08:00
parent 6291d6220a
commit 33a3616635
25 changed files with 157 additions and 107 deletions
@@ -5,6 +5,7 @@
*/
#include <stdbool.h>
#include "esp_log.h"
#include "esp_rom_sys.h"
#include "bootloader_init.h"
#include "bootloader_utility.h"
#include "bootloader_common.h"
@@ -79,7 +80,7 @@ static int selected_boot_partition(const bootloader_state_t *bs)
if (boot_index == INVALID_INDEX) {
return boot_index; // Unrecoverable failure (not due to corrupt ota data or bad partition contents)
}
if (bootloader_common_get_reset_reason(0) != DEEPSLEEP_RESET) {
if (esp_rom_get_reset_reason(0) != RESET_REASON_CORE_DEEP_SLEEP) {
// Factory firmware.
#ifdef CONFIG_BOOTLOADER_FACTORY_RESET
bool reset_level = false;