Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix: update from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 31, 2023
1 parent b47f5c7 commit a0caf11
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2023 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config SECURE_BOOT
default y if $(BOARD) = "nrf9160dk_nrf9160_ns"

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
1 change: 1 addition & 0 deletions sysbuild.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SB_CONFIG_BOOTLOADER_MCUBOOT=y
5 changes: 5 additions & 0 deletions sysbuild/mcuboot/app.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
20 changes: 20 additions & 0 deletions sysbuild/mcuboot/boards/nrf9160dk_nrf9160_0_14_0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# MCUboot config to enable secondary slot on the external flash

CONFIG_FLASH=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_SPI_NOR_SFDP_DEVICETREE=y

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x13E00
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

CONFIG_MULTITHREADING=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_BOOT_MAX_IMG_SECTORS=256
16 changes: 16 additions & 0 deletions sysbuild/mcuboot/boards/nrf9160dk_nrf9160_0_14_0.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

&mx25r64 {
status = "okay";
};

/ {
/* Configure partition manager to use mx25r64 as the external flash */
chosen {
nordic,pm-ext-flash = &mx25r64;
};
};
20 changes: 20 additions & 0 deletions sysbuild/mcuboot/boards/nrf9161dk_nrf9161.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# MCUboot config to enable secondary slot on the external flash

CONFIG_FLASH=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_SPI_NOR_SFDP_DEVICETREE=y

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x13E00
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

CONFIG_MULTITHREADING=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_BOOT_MAX_IMG_SECTORS=256
16 changes: 16 additions & 0 deletions sysbuild/mcuboot/boards/nrf9161dk_nrf9161.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

&gd25lb256 {
status = "okay";
};

/ {
/* Configure partition manager to use gd25lb256 as the external flash */
chosen {
nordic,pm-ext-flash = &gd25lb256;
};
};
43 changes: 43 additions & 0 deletions sysbuild/mcuboot/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
CONFIG_PM=n

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

CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
CONFIG_BOOT_ENCRYPT_IMAGE=n

CONFIG_BOOT_UPGRADE_ONLY=n
CONFIG_BOOT_BOOTSTRAP=n

### mbedTLS has its own heap
# CONFIG_HEAP_MEM_POOL_SIZE is not set

### We never want Zephyr's copy of tinycrypt. If tinycrypt is needed,
### MCUboot has its own copy in tree.
# CONFIG_TINYCRYPT is not set
# CONFIG_TINYCRYPT_ECC_DSA is not set
# CONFIG_TINYCRYPT_SHA256 is not set

CONFIG_FLASH=y
CONFIG_FPROTECT=y

### Various Zephyr boards enable features that we don't want.
# CONFIG_BT is not set
# CONFIG_BT_CTLR is not set
# CONFIG_I2C is not set

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
### Ensure Zephyr logging changes don't use more resources
CONFIG_LOG_DEFAULT_LEVEL=0
### Use info log level by default
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
CONFIG_CBPRINTF_NANO=y
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0
### Use the minimal C library to reduce flash usage
CONFIG_MINIMAL_LIBC=y

# Increase the monotonic firmware version before building a firmware update
CONFIG_FW_INFO=y
CONFIG_FW_INFO_FIRMWARE_VERSION=1

0 comments on commit a0caf11

Please sign in to comment.