-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bugfix/compilation_failed_in_bootloader_with_sb_fe_verb…
…ose' into 'master' fix(bootloader): Fix compilation issue in bootloader build during verbose+sb+fe Closes IDF-6373 See merge request espressif/esp-idf!26339
- Loading branch information
Showing
25 changed files
with
160 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# For more information about build system see | ||
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html | ||
# The following five lines of boilerplate have to be in your project's | ||
# CMakeLists in this exact order for cmake to work correctly | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
project(build_system_bootloader) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | | ||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | |
8 changes: 8 additions & 0 deletions
8
tools/test_apps/build_system/bootloader/anti_rollback_partition.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Name, Type, SubType, Offset, Size, Flags | ||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap | ||
nvs, data, nvs, , 0x4000, | ||
otadata, data, ota, , 0x2000, | ||
phy_init, data, phy, , 0x1000, | ||
emul_efuse,data,efuse, , 0x2000, | ||
ota_0, app, ota_0, , 3584K, | ||
ota_1, app, ota_1, , 3584K, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
idf_component_register(SRCS "build_system_bootloader_main.c" | ||
INCLUDE_DIRS ".") |
14 changes: 14 additions & 0 deletions
14
tools/test_apps/build_system/bootloader/main/build_system_bootloader_main.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Unlicense OR CC0-1.0 | ||
*/ | ||
#include <stdio.h> | ||
#include "esp_log.h" | ||
|
||
static const char *TAG = "build_bootloader_test"; | ||
|
||
void app_main(void) | ||
{ | ||
ESP_LOGI(TAG, "Hello world"); | ||
} |
12 changes: 12 additions & 0 deletions
12
tools/test_apps/build_system/bootloader/sdkconfig.ci.anti_roll_back
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Enable Rollback and Anti rollback | ||
# | ||
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y | ||
CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK=y | ||
|
||
# | ||
# Update partition table file | ||
# | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="anti_rollback_partition.csv" | ||
CONFIG_PARTITION_TABLE_FILENAME="anti_rollback_partition.csv" |
7 changes: 7 additions & 0 deletions
7
tools/test_apps/build_system/bootloader/sdkconfig.ci.factory_reset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# | ||
# Factory reset setting | ||
# | ||
CONFIG_BOOTLOADER_FACTORY_RESET=y | ||
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4 | ||
CONFIG_BOOTLOADER_FACTORY_RESET_PIN_LOW=y | ||
CONFIG_BOOTLOADER_DATA_FACTORY_RESET="nvs" |
6 changes: 6 additions & 0 deletions
6
tools/test_apps/build_system/bootloader/sdkconfig.ci.secure_boot.ecdsa.esp32h2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_IDF_TARGET="esp32h2" | ||
CONFIG_IDF_TARGET_ESP32H2=y | ||
|
||
CONFIG_SECURE_BOOT_V2_ECDSA_ENABLED=y | ||
CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME=y | ||
CONFIG_SECURE_BOOT_ECDSA_KEY_LEN_256_BITS=y |
4 changes: 4 additions & 0 deletions
4
tools/test_apps/build_system/bootloader/sdkconfig.ci.verbose_logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# | ||
# Turn verbose log on for bootloader | ||
# | ||
CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE=y |
23 changes: 23 additions & 0 deletions
23
tools/test_apps/build_system/bootloader/sdkconfig.defaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Security feature | ||
# | ||
# Start secure boot | ||
# | ||
CONFIG_SECURE_SIGNED_ON_BOOT=y | ||
CONFIG_SECURE_SIGNED_ON_UPDATE=y | ||
CONFIG_SECURE_SIGNED_APPS=y | ||
CONFIG_SECURE_BOOT=y | ||
CONFIG_SECURE_BOOT_V2_ENABLED=y | ||
CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES=n | ||
|
||
# | ||
# Start flash incryption | ||
# | ||
CONFIG_SECURE_FLASH_ENC_ENABLED=y | ||
CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT=y | ||
|
||
# | ||
# Increase partition table offset | ||
# | ||
CONFIG_PARTITION_TABLE_OFFSET=0xe000 | ||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y |
3 changes: 3 additions & 0 deletions
3
tools/test_apps/build_system/bootloader/sdkconfig.defaults.esp32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Change revision to use secure boot version 2 | ||
CONFIG_ESP32_REV_MIN_3=y | ||
CONFIG_ESP32_REV_MIN=3 |