Skip to content

Commit a98bff9

Browse files
committed
boot: zephyr: kconfig: Fix issues and re-order
Fixes issues with Kconfigs being placed outside of the MCUboot group and not selecting experimental symbols. Also fixes ordering to place USB DFU into a menu rather than being all over the place Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 1b2d261 commit a98bff9

File tree

1 file changed

+50
-43
lines changed

1 file changed

+50
-43
lines changed

boot/zephyr/Kconfig

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,32 @@ config BOOT_FIH_PROFILE_HIGH
759759

760760
endchoice
761761

762+
config BOOT_USE_BENCH
763+
bool "Enable benchmark code"
764+
help
765+
If y, adds support for simple benchmarking that can record
766+
time intervals between two calls. The time printed depends
767+
on the particular Zephyr target, and is generally ticks of a
768+
specific board-specific timer.
769+
770+
module = MCUBOOT
771+
module-str = MCUBoot bootloader
772+
source "subsys/logging/Kconfig.template.log_config"
773+
774+
config MCUBOOT_LOG_THREAD_STACK_SIZE
775+
int "Stack size for the MCUBoot log processing thread"
776+
depends on LOG && !LOG_IMMEDIATE
777+
default 2048 if COVERAGE_GCOV
778+
default 1024 if NO_OPTIMIZATIONS
779+
default 1024 if XTENSA
780+
default 4096 if (X86 && X86_64)
781+
default 4096 if ARM64
782+
default 768
783+
help
784+
Set the internal stack size for MCUBoot log processing thread.
785+
786+
menu "USB DFU"
787+
762788
choice BOOT_USB_DFU
763789
prompt "USB DFU"
764790
default BOOT_USB_DFU_NO
@@ -811,44 +837,24 @@ endif # BOOT_USB_DFU_GPIO
811837

812838
config BOOT_USB_DFU_NO_APPLICATION
813839
bool "Stay in bootloader if no application"
840+
depends on !BOOT_USB_DFU_NO
814841
help
815842
Allows for entering USB DFU recovery mode if there is no bootable
816843
application that the bootloader can jump to.
817844

818-
config BOOT_USE_BENCH
819-
bool "Enable benchmark code"
820-
help
821-
If y, adds support for simple benchmarking that can record
822-
time intervals between two calls. The time printed depends
823-
on the particular Zephyr target, and is generally ticks of a
824-
specific board-specific timer.
825-
826-
module = MCUBOOT
827-
module-str = MCUBoot bootloader
828-
source "subsys/logging/Kconfig.template.log_config"
845+
endmenu
829846

830-
config MCUBOOT_LOG_THREAD_STACK_SIZE
831-
int "Stack size for the MCUBoot log processing thread"
832-
depends on LOG && !LOG_IMMEDIATE
833-
default 2048 if COVERAGE_GCOV
834-
default 1024 if NO_OPTIMIZATIONS
835-
default 1024 if XTENSA
836-
default 4096 if (X86 && X86_64)
837-
default 4096 if ARM64
838-
default 768
839-
help
840-
Set the internal stack size for MCUBoot log processing thread.
847+
rsource "Kconfig.serial_recovery"
841848

842849
config MCUBOOT_INDICATION_LED
843850
bool "Turns on LED indication when device is in DFU"
844851
select GPIO
852+
depends on MCUBOOT_SERIAL || !BOOT_USB_DFU_NO
845853
help
846854
Device device activates the LED while in bootloader mode.
847855
mcuboot-led0 alias must be set in the device's .dts
848856
definitions for this to work.
849857

850-
rsource "Kconfig.serial_recovery"
851-
852858
rsource "Kconfig.firmware_loader"
853859

854860
config BOOT_INTR_VEC_RELOC
@@ -1016,24 +1022,6 @@ endif # BOOT_DECOMPRESSION
10161022

10171023
endif # BOOT_DECOMPRESSION_SUPPORT
10181024

1019-
menu "Defaults"
1020-
# Items in this menu should not be manually set. These options are for modules/sysbuild to
1021-
# set as defaults to allow MCUboot's default configuration to be set, but still allow it
1022-
# to be overridden by users.
1023-
1024-
config BOOT_FIH_PROFILE_DEFAULT_LOW
1025-
bool "Default to low fault inject hardening level"
1026-
1027-
config BOOT_FIH_PROFILE_DEFAULT_MEDIUM
1028-
bool "Default to medium fault inject hardening level"
1029-
1030-
config BOOT_FIH_PROFILE_DEFAULT_HIGH
1031-
bool "Default to high fault inject hardening level"
1032-
1033-
endmenu
1034-
1035-
endmenu
1036-
10371025
config MCUBOOT_STORAGE_WITHOUT_ERASE
10381026
bool "Support for devices without erase"
10391027
depends on FLASH_HAS_NO_EXPLICIT_ERASE
@@ -1057,7 +1045,8 @@ config MCUBOOT_STORAGE_WITH_ERASE
10571045
Support for devices with erase
10581046

10591047
config MCUBOOT_STORAGE_MINIMAL_SCRAMBLE
1060-
bool "Do minimal required work to remove data (EXPERIMENTAL)"
1048+
bool "Do minimal required work to remove data [EXPERIMENTAL]"
1049+
select EXPERIMENTAL
10611050
help
10621051
In some cases MCUboot has to remove data, which usually means make
10631052
it non-viable for MCUboot rather then completely destroyed.
@@ -1072,6 +1061,22 @@ config MCUBOOT_STORAGE_MINIMAL_SCRAMBLE
10721061
Depending on type of device this may be done by erase of minimal
10731062
number of pages or overwrite of part of image.
10741063

1064+
menu "Defaults"
1065+
# Items in this menu should not be manually set. These options are for modules/sysbuild to
1066+
# set as defaults to allow MCUboot's default configuration to be set, but still allow it
1067+
# to be overridden by users.
1068+
1069+
config BOOT_FIH_PROFILE_DEFAULT_LOW
1070+
bool "Default to low fault inject hardening level"
1071+
1072+
config BOOT_FIH_PROFILE_DEFAULT_MEDIUM
1073+
bool "Default to medium fault inject hardening level"
1074+
1075+
config BOOT_FIH_PROFILE_DEFAULT_HIGH
1076+
bool "Default to high fault inject hardening level"
1077+
1078+
endmenu
1079+
10751080
config MCUBOOT_DEVICE_SETTINGS
10761081
# Hidden selector for device-specific settings
10771082
bool
@@ -1088,6 +1093,8 @@ config MCUBOOT_DEVICE_CPU_CORTEX_M0
10881093
bool
10891094
select SW_VECTOR_RELAY if !CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP
10901095

1096+
endmenu
1097+
10911098
comment "Zephyr configuration options"
10921099

10931100
# Disabling MULTITHREADING provides a code size advantage, but

0 commit comments

Comments
 (0)