Skip to content

Commit 595fb49

Browse files
hakonfamtejlmand
authored andcommitted
[nrf noup] kconfig: reduce downstream patch
squash! [nrf noup] treewide: add NCS partition manager support Source the file 'Kconfig.mcuboot' from sdk-nrf to reduce the amount of downstream patches in boot/zephyr/Kconfig. NOTE TO UPMERGE AUTHOR: This commit removes all but one downstream patches to the file boot/zephyr/Kconfig. The only remaining patch should be the sourcing of the Kconfig file in the mcuboot module in the nrf repo. Hence there should be no modification to this file by any of the [nrf noup] commits (except one) noup commits with modifications that should be discarded: [nrf noup] treewide: add NCS partition manager support 4eba780 ! With the exception of the one line added by squashing this ! commit. [nrf noup] kconfig: use cc310 for ecdsa by default a2422d9 [nrf noup] boot: bootutil: Add shared crypto for ECDSA and SHA 8ac5bd1 [nrf noup] boot: add 'minimal' configuration files 2b23edc [nrf noup] boot: zephyr: add support for Thingy:91 39fe200 [nrf noup] do_boot: clean peripherals state before boot 9a3853b Ref: NCSDK-11177 Signed-off-by: Håkon Øye Amundsen <[email protected]>
1 parent 632ad84 commit 595fb49

File tree

1 file changed

+12
-64
lines changed

1 file changed

+12
-64
lines changed

boot/zephyr/Kconfig

Lines changed: 12 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ mainmenu "MCUboot configuration"
88

99
comment "MCUboot-specific configuration options"
1010

11+
source "$(ZEPHYR_NRF_MODULE_DIR)/modules/mcuboot/boot/zephyr/Kconfig"
12+
1113
# Hidden option to mark a project as MCUboot
1214
config MCUBOOT
1315
default y
@@ -16,35 +18,6 @@ config MCUBOOT
1618
select USE_DT_CODE_PARTITION if HAS_FLASH_LOAD_OFFSET
1719
select MCUBOOT_BOOTUTIL_LIB
1820

19-
config BOOT_USE_MIN_PARTITION_SIZE
20-
bool "Build for a minimal image size"
21-
22-
partition=MCUBOOT_SCRATCH
23-
partition-size=0x1e000
24-
source "${ZEPHYR_BASE}/../nrf/subsys/partition_manager/Kconfig.template.partition_size"
25-
26-
partition=MCUBOOT_PAD
27-
partition-size=0x200
28-
source "${ZEPHYR_BASE}/../nrf/subsys/partition_manager/Kconfig.template.partition_size"
29-
30-
config PM_PARTITION_SIZE_MCUBOOT
31-
hex
32-
default FPROTECT_BLOCK_SIZE if (SOC_NRF5340_CPUAPP || SOC_NRF9160)
33-
default 0x3e00
34-
depends on (BOOT_NRF_EXTERNAL_CRYPTO && BOOT_USE_MIN_PARTITION_SIZE)
35-
36-
config PM_PARTITION_SIZE_MCUBOOT
37-
hex
38-
default FPROTECT_BLOCK_SIZE if SOC_NRF9160
39-
default 0x7c00
40-
depends on BOOT_USE_MIN_PARTITION_SIZE
41-
42-
config PM_PARTITION_SIZE_MCUBOOT
43-
hex "Flash space allocated for the MCUboot partition." if !BOOT_USE_MIN_PARTITION_SIZE
44-
default 0xc000
45-
help
46-
Flash space set aside for the MCUboot partition.
47-
4821
config BOOT_USE_MBEDTLS
4922
bool
5023
# Hidden option
@@ -74,18 +47,15 @@ config BOOT_USE_CC310
7447

7548
config BOOT_USE_NRF_CC310_BL
7649
bool
77-
select NRF_CC310_BL
50+
default n
7851

79-
config BOOT_USE_NRF_EXTERNAL_CRYPTO
52+
config NRFXLIB_CRYPTO
53+
bool
54+
default n
55+
56+
config NRF_CC310_BL
8057
bool
81-
# Hidden option
8258
default n
83-
# When building for ECDSA, we use our own copy of mbedTLS, so the
84-
# Zephyr one must not be enabled or the MBEDTLS_CONFIG_FILE macros
85-
# will collide.
86-
depends on ! MBEDTLS
87-
help
88-
Use Shared crypto for crypto primitives.
8959

9060
menu "MCUBoot settings"
9161

@@ -99,7 +69,6 @@ config SINGLE_APPLICATION_SLOT
9969

10070
choice BOOT_SIGNATURE_TYPE
10171
prompt "Signature type"
102-
default BOOT_SIGNATURE_TYPE_ECDSA_P256 if HAS_HW_NRF_CC310 && !BOARD_THINGY91_NRF9160 && !BOARD_THINGY91_NRF52840
10372
default BOOT_SIGNATURE_TYPE_RSA
10473

10574
config BOOT_SIGNATURE_TYPE_NONE
@@ -124,11 +93,9 @@ config BOOT_SIGNATURE_TYPE_ECDSA_P256
12493
if BOOT_SIGNATURE_TYPE_ECDSA_P256
12594
choice BOOT_ECDSA_IMPLEMENTATION
12695
prompt "Ecdsa implementation"
127-
default BOOT_NRF_EXTERNAL_CRYPTO if SECURE_BOOT
128-
default BOOT_ECDSA_CC310 if HAS_HW_NRF_CC310
129-
default BOOT_TINYCRYPT
96+
default BOOT_ECDSA_TINYCRYPT
13097

131-
config BOOT_TINYCRYPT
98+
config BOOT_ECDSA_TINYCRYPT
13299
bool "Use tinycrypt"
133100
select BOOT_USE_TINYCRYPT
134101

@@ -139,14 +106,8 @@ config BOOT_ECDSA_CC310
139106
select NRF_CC310_BL
140107
select NRFXLIB_CRYPTO
141108
select BOOT_USE_CC310
142-
143-
config BOOT_NRF_EXTERNAL_CRYPTO
144-
bool "Use Shared Crypto from bootloader"
145-
select BOOT_USE_NRF_EXTERNAL_CRYPTO
146-
147109
endchoice # Ecdsa implementation
148-
149-
endif #BOOT_SIGNATURE_TYPE_ECDSA_P256
110+
endif
150111

151112
config BOOT_SIGNATURE_TYPE_ED25519
152113
bool "Edwards curve digital signatures using ed25519"
@@ -173,6 +134,7 @@ config BOOT_SIGNATURE_KEY_FILE
173134
default "root-ed25519.pem" if BOOT_SIGNATURE_TYPE_ED25519
174135
default "root-rsa-3072.pem" if BOOT_SIGNATURE_TYPE_RSA && BOOT_SIGNATURE_TYPE_RSA_LEN=3072
175136
default "root-rsa-2048.pem" if BOOT_SIGNATURE_TYPE_RSA && BOOT_SIGNATURE_TYPE_RSA_LEN=2048
137+
default ""
176138
help
177139
You can use either absolute or relative path.
178140
In case relative path is used, the build system assumes that it starts
@@ -201,11 +163,6 @@ config MCUBOOT_CLEANUP_ARM_CORE
201163
by default, if they are chain-loadable by MCUboot, so MCUboot does
202164
not need to perform such a cleanup itself.
203165

204-
config MCUBOOT_NRF_CLEANUP_PERIPHERAL
205-
bool "Perform peripheral cleanup before chain-load the application"
206-
depends on SOC_FAMILY_NRF
207-
default y
208-
209166
config MBEDTLS_CFG_FILE
210167
default "mcuboot-mbedtls-cfg.h"
211168

@@ -341,15 +298,6 @@ config BOOT_MAX_IMG_SECTORS
341298
memory usage; larger values allow it to support larger images.
342299
If unsure, leave at the default value.
343300

344-
config BOOT_ERASE_PROGRESSIVELY
345-
bool "Erase flash progressively when receiving new firmware"
346-
default y if SOC_FAMILY_NRF
347-
help
348-
If enabled, flash is erased as necessary when receiving new firmware,
349-
instead of erasing the whole image slot at once. This is necessary
350-
on some hardware that has long erase times, to prevent long wait
351-
times at the beginning of the DFU process.
352-
353301
config MEASURED_BOOT
354302
bool "Store the boot state/measurements in shared memory"
355303
default n

0 commit comments

Comments
 (0)