Skip to content

Commit a0d7016

Browse files
marekmatejnashif
authored andcommitted
soc: espressif: Simple boot validity
Update CONFIG_ESP_SIMPLE_BOOT to exclude if CONFIG_MCUBOOT=y Fix usage of the config according to actual definition. Signed-off-by: Marek Matej <[email protected]>
1 parent 404fdb2 commit a0d7016

File tree

8 files changed

+27
-26
lines changed

8 files changed

+27
-26
lines changed

soc/espressif/common/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ config ESP32_USE_UNSUPPORTED_REVISION
1515
set this option to enable support for them. Note that this is not recommended and
1616
may lead to unexpected behavior.
1717

18+
config ESP_SIMPLE_BOOT
19+
bool "Simple Boot method"
20+
default y if !BOOTLOADER_MCUBOOT && !MCUBOOT
21+
help
22+
The Simple Boot is a booting method that doesn't need a 2nd stage bootloader.
23+
Output is a single image that should be flashed at a offset defined by used SOC.
24+
Please note that this method brings the system up with all memories set-up, but
25+
all other features, such as secure boot OTA or slots management are not available.
26+
1827
rsource "Kconfig.spiram"
1928
rsource "Kconfig.esptool"
2029
rsource "Kconfig.flash"

soc/espressif/common/Kconfig.flash

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,4 @@ config SPI_FLASH_HPM_ENABLE
127127
This option is invisible, and will be selected automatically
128128
when ``ESPTOOLPY_FLASHFREQ_120M`` is selected.
129129

130-
config ESP_SIMPLE_BOOT
131-
bool "Simple Boot method"
132-
default y if !BOOTLOADER_MCUBOOT
133-
help
134-
The Simple Boot is a method of booting that doesn't depend on a
135-
2nd stage bootloader. Please note that some of the bootloader features
136-
are not available using simple boot, such secure boot and OTA.
137-
138130
endif # SOC_FAMILY_ESPRESSIF_ESP32

soc/espressif/esp32/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ else()
6969
dt_nodelabel(dts_partition_path NODELABEL "slot0_partition")
7070
dt_reg_addr(img_0_off PATH ${dts_partition_path})
7171

72-
if(CONFIG_ESP_SIMPLE_BOOT)
73-
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
74-
else()
72+
if(CONFIG_BOOTLOADER_MCUBOOT)
7573
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
74+
else()
75+
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
7676
endif()
7777

7878
endif()

soc/espressif/esp32c2/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ dt_prop(monitor_baud PATH ${dts_shell_uart} PROPERTY "current-speed")
5353
board_runner_args(esp32 "--esp-flash-freq=60m")
5454
board_runner_args(esp32 "--esp-monitor-baud=${monitor_baud}")
5555

56-
if(CONFIG_ESP_SIMPLE_BOOT)
57-
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
58-
else()
56+
if(CONFIG_BOOTLOADER_MCUBOOT)
5957
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
58+
else()
59+
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
6060
endif()
6161

6262
if(CONFIG_MCUBOOT)

soc/espressif/esp32c3/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ dt_reg_addr(img_0_off PATH ${dts_partition_path})
4848
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
4949
dt_reg_addr(boot_off PATH ${dts_partition_path})
5050

51-
if(CONFIG_ESP_SIMPLE_BOOT)
52-
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
53-
else()
51+
if(CONFIG_BOOTLOADER_MCUBOOT)
5452
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
53+
else()
54+
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
5555
endif()
5656

5757
if(CONFIG_MCUBOOT)

soc/espressif/esp32c6/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ dt_reg_addr(img_0_off PATH ${dts_partition_path})
4848
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
4949
dt_reg_addr(boot_off PATH ${dts_partition_path})
5050

51-
if(CONFIG_ESP_SIMPLE_BOOT)
52-
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
53-
else()
51+
if(CONFIG_BOOTLOADER_MCUBOOT)
5452
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
53+
else()
54+
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
5555
endif()
5656

5757
if(CONFIG_MCUBOOT)

soc/espressif/esp32s2/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ dt_reg_addr(boot_off PATH ${dts_partition_path})
4949
dt_nodelabel(dts_partition_path NODELABEL "slot0_partition")
5050
dt_reg_addr(img_0_off PATH ${dts_partition_path})
5151

52-
if(CONFIG_ESP_SIMPLE_BOOT)
53-
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
54-
else()
52+
if(CONFIG_BOOTLOADER_MCUBOOT)
5553
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
54+
else()
55+
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
5656
endif()
5757

5858
if(CONFIG_MCUBOOT)

soc/espressif/esp32s3/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ else()
7070
dt_nodelabel(dts_partition_path NODELABEL "slot0_partition")
7171
dt_reg_addr(img_0_off PATH ${dts_partition_path})
7272

73-
if(NOT CONFIG_BOOTLOADER_MCUBOOT)
74-
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
75-
else()
73+
if(CONFIG_BOOTLOADER_MCUBOOT)
7674
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
75+
else()
76+
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
7777
endif()
7878

7979
endif()

0 commit comments

Comments
 (0)