mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
soc: esp32: MCUboot support
This make MCUboot build as Zephyr application. Providing optinal 2nd stage bootloader to the IDF bootloader, which is used by default. This provides more flexibility when building and loading multiple images and aims to brings better DX to users by using the sysbuild. MCUboot and applications has now separate linker scripts. Signed-off-by: Marek Matej <marek.matej@espressif.com>
This commit is contained in:
@@ -816,8 +816,8 @@ config BOOTLOADER_SRAM_SIZE
|
||||
|
||||
config BOOTLOADER_ESP_IDF
|
||||
bool "ESP-IDF bootloader support"
|
||||
depends on (SOC_ESP32 || SOC_ESP32S2 || SOC_ESP32C3 || SOC_ESP32S3) && !BOOTLOADER_MCUBOOT
|
||||
default y
|
||||
depends on SOC_FAMILY_ESP32 && !BOOTLOADER_MCUBOOT && !MCUBOOT
|
||||
default y
|
||||
help
|
||||
This option will trigger the compilation of the ESP-IDF bootloader
|
||||
inside the build folder.
|
||||
|
||||
@@ -569,7 +569,9 @@ check_reschedule:
|
||||
addi sp, sp, -16
|
||||
sr a1, 0(sp)
|
||||
mv a0, zero
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
call z_get_next_switch_handle
|
||||
#endif
|
||||
lr a1, 0(sp)
|
||||
addi sp, sp, 16
|
||||
beqz a0, no_reschedule
|
||||
|
||||
@@ -194,8 +194,12 @@ static ALWAYS_INLINE void usage_stop(void)
|
||||
|
||||
static inline void *return_to(void *interrupted)
|
||||
{
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
return _current_cpu->nested <= 1 ?
|
||||
z_get_next_switch_handle(interrupted) : interrupted;
|
||||
#else
|
||||
return interrupted;
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
}
|
||||
|
||||
/* The wrapper code lives here instead of in the python script that
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
config BOARD_ESP32C3_DEVKITM
|
||||
bool "ESP32C3 Devkit-M Board"
|
||||
depends on SOC_ESP32C3
|
||||
select CONSOLE_HAS_DRIVER
|
||||
|
||||
10
boards/riscv/esp32c3_devkitm/Kconfig.sysbuild
Normal file
10
boards/riscv/esp32c3_devkitm/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/riscv/icev_wireless/Kconfig.sysbuild
Normal file
10
boards/riscv/icev_wireless/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/riscv/stamp_c3/Kconfig.sysbuild
Normal file
10
boards/riscv/stamp_c3/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/riscv/xiao_esp32c3/Kconfig.sysbuild
Normal file
10
boards/riscv/xiao_esp32c3/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/esp32/Kconfig.sysbuild
Normal file
10
boards/xtensa/esp32/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/esp32_ethernet_kit/Kconfig.sysbuild
Normal file
10
boards/xtensa/esp32_ethernet_kit/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/esp32s2_franzininho/Kconfig.sysbuild
Normal file
10
boards/xtensa/esp32s2_franzininho/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
@@ -18,5 +18,3 @@ CONFIG_GEN_ISR_TABLES=y
|
||||
CONFIG_GEN_IRQ_VECTOR_TABLE=n
|
||||
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_BOOTLOADER_ESP_IDF=y
|
||||
|
||||
10
boards/xtensa/esp32s2_saola/Kconfig.sysbuild
Normal file
10
boards/xtensa/esp32s2_saola/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
@@ -18,5 +18,3 @@ CONFIG_GEN_ISR_TABLES=y
|
||||
CONFIG_GEN_IRQ_VECTOR_TABLE=n
|
||||
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_BOOTLOADER_ESP_IDF=y
|
||||
|
||||
10
boards/xtensa/esp32s3_devkitm/Kconfig.sysbuild
Normal file
10
boards/xtensa/esp32s3_devkitm/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/esp_wrover_kit/Kconfig.sysbuild
Normal file
10
boards/xtensa/esp_wrover_kit/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/heltec_wifi_lora32_v2/Kconfig.sysbuild
Normal file
10
boards/xtensa/heltec_wifi_lora32_v2/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/m5stickc_plus/Kconfig.sysbuild
Normal file
10
boards/xtensa/m5stickc_plus/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/odroid_go/Kconfig.sysbuild
Normal file
10
boards/xtensa/odroid_go/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
10
boards/xtensa/olimex_esp32_evb/Kconfig.sysbuild
Normal file
10
boards/xtensa/olimex_esp32_evb/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user