Skip to content

Commit 81ab01a

Browse files
hakonfammbolivar-nordic
authored andcommitted
[nrf noup] kconfig: enable external crypto config
Remove undefined dependency and add overlay file for building minimal mcuboot with exeternal crypto. Signed-off-by: Håkon Øye Amundsen <[email protected]> (cherry picked from commit e473ee3) (cherry picked from commit 4d1b74b) (cherry picked from commit a2c9384) Signed-off-by: Ioannis Glaropoulos <[email protected]> (cherry picked from commit fbd3e7a) Signed-off-by: Johann Fischer <[email protected]> (cherry picked from commit ca4d049) Signed-off-by: Trond Einar Snekvik <[email protected]> (cherry picked from commit 0c9464d)
1 parent 9efa2fd commit 81ab01a

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

boot/zephyr/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ config BOOT_ECDSA_CC310
128128
config BOOT_NRF_EXTERNAL_CRYPTO
129129
bool "Use Shared Crypto from bootloader"
130130
select BOOT_USE_NRF_EXTERNAL_CRYPTO
131-
depends on SECURE_BOOT_CRYPTO_CLIENT
132131

133132
endchoice # Ecdsa implementation
134133

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#
2+
# Copyright (c) 2020 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
5+
#
6+
7+
# These configurations should be used when using nrf/samples/bootloader
8+
# as the immutable bootloader (B0), and MCUBoot as the second stage updateable
9+
# bootloader. With this configuration, MCUBoot will re-use the crypto
10+
# functionality from B0, and fit within 16kB.
11+
12+
CONFIG_NCS_SAMPLES_DEFAULTS=n
13+
CONFIG_LOG=n
14+
CONFIG_BOOT_BANNER=n
15+
CONFIG_PRINTK=n
16+
CONFIG_CONSOLE=n
17+
CONFIG_UART_CONSOLE=n
18+
CONFIG_SERIAL=n
19+
CONFIG_SECURE_BOOT_DEBUG=n
20+
CONFIG_ASSERT=n
21+
CONFIG_RESET_ON_FATAL_ERROR=n
22+
CONFIG_REBOOT=n
23+
CONFIG_GPIO=n
24+
CONFIG_CLOCK_CONTROL=n
25+
CONFIG_MINIMAL_LIBC_MALLOC=n
26+
CONFIG_MINIMAL_LIBC_CALLOC=n
27+
CONFIG_MINIMAL_LIBC_REALLOCARRAY=n
28+
CONFIG_SIZE_OPTIMIZATIONS=y
29+
CONFIG_NO_RUNTIME_CHECKS=y
30+
CONFIG_CONSOLE_HANDLER=n
31+
CONFIG_NRF_RTC_TIMER=n
32+
CONFIG_SYS_CLOCK_EXISTS=n
33+
34+
# Set ECDSA as signing mechanism
35+
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
36+
37+
# Use crypto backend from B0
38+
CONFIG_BOOT_NRF_EXTERNAL_CRYPTO=y
39+
CONFIG_SECURE_BOOT_CRYPTO=y
40+
CONFIG_SB_CRYPTO_CLIENT_ECDSA_SECP256R1=y
41+
CONFIG_SB_CRYPTO_CLIENT_SHA256=y
42+
CONFIG_BL_SHA256_EXT_API_REQUIRED=y
43+
CONFIG_BL_SECP256R1_EXT_API_REQUIRED=y
44+
45+
# Set 16kB as flash size
46+
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x3e00

0 commit comments

Comments
 (0)