Skip to content

Commit

Permalink
[nrf noup] boot: add 'minimal' configuration files
Browse files Browse the repository at this point in the history
Add prj_minimal.conf, a Kconfig fragment to be used for minimally
sized image production. The minimal fragment has been simplified for
only external crypto.

Move partition sizing into Kconfig to be consistent with the method
used by b0.

Using this fragment with prj_minimal.conf makes MCUboot < 16kB for
all nRF devices (9160 still needs 32kB partition).

Ref: NCSDK-6704
Signed-off-by: Stephen Stauts <stephen.stauts@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 0701661)
  • Loading branch information
mbolivar-nordic committed Feb 20, 2023
1 parent 3883cb9 commit 9199b3e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
13 changes: 13 additions & 0 deletions boot/zephyr/boards/nrf5340dk_nrf5340_cpuapp_minimal.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# CC3xx is currently not used for nrf53
CONFIG_HW_CC3XX=n
CONFIG_NRF_CC3XX_PLATFORM=n

# Required for kernel operation
CONFIG_CLOCK_CONTROL=y
CONFIG_SYS_CLOCK_EXISTS=y
45 changes: 45 additions & 0 deletions boot/zephyr/prj_minimal.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_MAIN_STACK_SIZE=10240
CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"

CONFIG_FLASH=y
CONFIG_FPROTECT=y
CONFIG_PM=n

CONFIG_BOOT_ENCRYPT_EC256=n
CONFIG_BOOT_ENCRYPT_RSA=n
CONFIG_BOOT_ENCRYPT_X25519=n
CONFIG_BOOT_SWAP_SAVE_ENCTLV=n

CONFIG_BOOT_BOOTSTRAP=n
CONFIG_BOOT_UPGRADE_ONLY=n

### Minimal Configurations ###
CONFIG_BOOT_USE_MIN_PARTITION_SIZE=y
CONFIG_ASSERT=n
CONFIG_BOOT_BANNER=n
CONFIG_CLOCK_CONTROL=n
CONFIG_CONSOLE=n
CONFIG_CONSOLE_HANDLER=n
CONFIG_GPIO=n
CONFIG_KERNEL_MEM_POOL=n
CONFIG_LOG=n
CONFIG_MINIMAL_LIBC_CALLOC=n
CONFIG_MINIMAL_LIBC_MALLOC=n
CONFIG_MINIMAL_LIBC_REALLOCARRAY=n
CONFIG_NCS_SAMPLES_DEFAULTS=n
CONFIG_NO_RUNTIME_CHECKS=y
CONFIG_NRF_RTC_TIMER=n
CONFIG_PRINTK=n
CONFIG_REBOOT=n
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_SECURE_BOOT_DEBUG=n
CONFIG_SERIAL=n
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_SYS_CLOCK_EXISTS=n
CONFIG_UART_CONSOLE=n

0 comments on commit 9199b3e

Please sign in to comment.