Commit 0e091c9a authored by Marti Bolivar's avatar Marti Bolivar Committed by Fabio Utzig
Browse files

zephyr: clean up Kconfig file

The kconfig file is a bit disorderly. Clean it up. There are no
changes in this commit which affect the bootloader's behavior.

Signed-off-by: default avatarMarti Bolivar <marti@opensourcefoundries.com>
parent 8e0a787b
Loading
Loading
Loading
Loading
+50 −42
Changes for boot/zephyr/Kconfig: 50 added lines, 42 removed lines.
Original line number Diff line number Diff line
@@ -3,32 +3,21 @@
# SPDX-License-Identifier: Apache-2.0
#

mainmenu "MCUBOOT configuration"
mainmenu "MCUboot configuration"

config ZEPHYR_BASE
	string
	option env="ZEPHYR_BASE"
comment "MCUboot-specific configuration options"

source "$ZEPHYR_BASE/Kconfig.zephyr"

config MCUBOOT_DEVICE_SETTINGS
	# Hidden selector for device-specific settings
	bool
	default y
        # CPU options
	select MCUBOOT_DEVICE_CPU_CORTEX_M0 if CPU_CORTEX_M0
        # Enable flash page layout if available
	select FLASH_PAGE_LAYOUT if FLASH_HAS_PAGE_LAYOUT

config MCUBOOT_DEVICE_CPU_CORTEX_M0
	# Hidden selector for Cortex-M0 settings
	bool
	default n
	select SW_VECTOR_RELAY if !CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP
config BOOT_MAX_IMG_SECTORS
	int "Maximum number of sectors per image slot"
	default 128
	help
	  This option controls the maximum number of sectors that each of
	  the two image areas can contain. Smaller values reduce MCUboot's
	  memory usage; larger values allow it to support larger images.
	  If unsure, leave at the default value.

menuconfig MCUBOOT_SERIAL
	bool
	prompt "MCUBOOT serial recovery"
	bool "MCUboot serial recovery"
	default n
	select REBOOT
	select UART_INTERRUPT_DRIVEN
@@ -36,42 +25,61 @@ menuconfig MCUBOOT_SERIAL
	select BASE64
	select TINYCBOR
	help
	  Enable serial recovery feature in mcuboot.
	  If y, enables a serial-port based update mode. This allows
	  MCUboot itself to load update images into flash over a UART.
	  If unsure, leave at the default value.

config BOOT_MAX_IMG_SECTORS
	int "max number of sectors per image slot"
	default 128
	help
	  Maximum number of sectors that a swap upgrade can handle
if MCUBOOT_SERIAL

config BOOT_MAX_LINE_INPUT_LEN
	int "cmd line max length"
	int "Maximum command line length"
	default 512
	depends on MCUBOOT_SERIAL
	help
	  Maximum length of commands transported over the serial protocol
	  Maximum length of commands transported over the serial port.

config BOOT_SERIAL_DETECT_PORT
	string
	prompt "GPIO Port to trigger serial recovery mode"
	string "GPIO device to trigger serial recovery mode"
	default GPIO_0 if SOC_FAMILY_NRF
	depends on MCUBOOT_SERIAL
	help
	  Serial recovery detect port
	  Zephyr GPIO device which contains the pin used to trigger
	  serial recovery mode.

config BOOT_SERIAL_DETECT_PIN
	int
	prompt "Pin to trigger serial recovery mode"
	int "Pin to trigger serial recovery mode"
	default 11 if BOARD_NRF52840_PCA10056
	default 13 if BOARD_NRF52_PCA10040
	depends on MCUBOOT_SERIAL
	help
	  Serial recovery detect pin
	  Pin on the serial detect port which triggers serial recovery mode.

config BOOT_SERIAL_DETECT_PIN_VAL
	int "Boot Pin trigger value"
	int "Serial detect pin trigger value"
	default 0
	range 0 1
	depends on MCUBOOT_SERIAL
	help
	  The input pin logic value which triggers the boot serial recovery mode.
	  Logic value of the detect pin which triggers serial recovery
	  mode.

endif # MCUBOOT_SERIAL

config MCUBOOT_DEVICE_SETTINGS
	# Hidden selector for device-specific settings
	bool
	default y
        # CPU options
	select MCUBOOT_DEVICE_CPU_CORTEX_M0 if CPU_CORTEX_M0
        # Enable flash page layout if available
	select FLASH_PAGE_LAYOUT if FLASH_HAS_PAGE_LAYOUT

config MCUBOOT_DEVICE_CPU_CORTEX_M0
	# Hidden selector for Cortex-M0 settings
	bool
	default n
	select SW_VECTOR_RELAY if !CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP

comment "Zephyr configuration options"

config ZEPHYR_BASE
	string
	option env="ZEPHYR_BASE"

source "$ZEPHYR_BASE/Kconfig.zephyr"