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

zephyr: add Kconfig options for CONF_xxx

The Zephyr CMakeLists.txt contains some configuration options that are
outside of Kconfig.

The standard way to configure Zephyr builds is with Kconfig, so it
would be better if MCUboot did not have a parallel configuration
mechanism.

Add equivalent Kconfig options to those which are defined in
CMakeLists.txt. Subsequent patches will use them.

Signed-off-by: default avatarMarti Bolivar <marti@opensourcefoundries.com>
parent 0e091c9a
Loading
Loading
Loading
Loading
+56
Changes for boot/zephyr/Kconfig: 56 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,51 @@ mainmenu "MCUboot configuration"

comment "MCUboot-specific configuration options"

config BOOT_USE_MBEDTLS
	bool
	# Hidden option
	default n
	help
	  Use mbedTLS for crypto primitives.

config BOOT_USE_TINYCRYPT
	bool
	# Hidden option
	default n
	help
	  Use TinyCrypt for crypto primitives.

choice
	prompt "Signature type"
	default BOOT_SIGNATURE_TYPE_RSA

config BOOT_SIGNATURE_TYPE_RSA
	bool "RSA signatures"
	select BOOT_USE_MBEDTLS

config BOOT_SIGNATURE_TYPE_ECDSA_P256
	bool "Elliptic curve digital signatures with curve P-256"
	select BOOT_USE_TINYCRYPT

endchoice

config BOOT_VALIDATE_SLOT0
	bool "Validate image slot 0 on every boot"
	default y
	help
	  If y, the bootloader attempts to validate the signature of
	  slot0 every boot.  This adds the signature check time to
	  every boot, but can mitigate against some changes that are
	  able to modify the flash image itself.

config BOOT_UPGRADE_ONLY
	bool "Overwrite image updates instead of swapping"
	default n
	help
	  If y, overwrite slot0 with the upgrade image instead of
	  swapping them.  This prevents the fallback recovery, but
	  uses a much simpler code path.

config BOOT_MAX_IMG_SECTORS
	int "Maximum number of sectors per image slot"
	default 128
@@ -16,6 +61,17 @@ config BOOT_MAX_IMG_SECTORS
	  memory usage; larger values allow it to support larger images.
	  If unsure, leave at the default value.

config ZEPHYR_TRY_MASS_ERASE
	bool "Try to mass erase flash when flashing MCUboot image"
	default y
	help
	  If y, attempt to configure the Zephyr build system's "flash"
	  target to mass-erase the flash device before flashing the
	  MCUboot image. This ensures the scratch and other partitions
	  are in a consistent state.

	  This is not available for all targets.

menuconfig MCUBOOT_SERIAL
	bool "MCUboot serial recovery"
	default n