This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions[bot]
committed
Oct 31, 2023
1 parent
b47f5c7
commit a0caf11
Showing
8 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SB_CONFIG_BOOTLOADER_MCUBOOT=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/ { | ||
chosen { | ||
zephyr,code-partition = &boot_partition; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |