Skip to content

Commit dbb61b9

Browse files
committed
bootloader: mcuboot: Changes needed to support AES256
This commit adds changes which are necessary to support the AES256 encryption algorithm in mcuboot. Signed-off-by: Artur Hadasz <[email protected]>
1 parent 40d7392 commit dbb61b9

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

cmake/sysbuild/image_signing.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ function(zephyr_mcuboot_tasks)
159159
set(confirmed_args)
160160
set(encrypted_args)
161161

162+
if(NOT "${keyfile_enc}" STREQUAL "")
163+
if(CONFIG_MCUBOOT_ENCRYPTION_ALG_AES_256)
164+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
165+
endif()
166+
endif()
167+
162168
# Set up .bin outputs.
163169
if(CONFIG_BUILD_OUTPUT_BIN)
164170
if(CONFIG_BUILD_WITH_TFM)

cmake/sysbuild/image_signing_firmware_loader.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ function(zephyr_mcuboot_tasks)
111111
set(confirmed_args)
112112
set(encrypted_args)
113113

114+
if(NOT "${keyfile_enc}" STREQUAL "")
115+
if(CONFIG_MCUBOOT_ENCRYPTION_ALG_AES_256)
116+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
117+
endif()
118+
endif()
119+
114120
# Set up .bin outputs.
115121
if(CONFIG_BUILD_OUTPUT_BIN)
116122
if(CONFIG_BUILD_WITH_TFM)

cmake/sysbuild/image_signing_split.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ function(zephyr_mcuboot_tasks)
157157
set(confirmed_args)
158158
set(encrypted_args)
159159

160+
if(NOT "${keyfile_enc}" STREQUAL "")
161+
if(CONFIG_MCUBOOT_ENCRYPTION_ALG_AES_256)
162+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
163+
endif()
164+
endif()
165+
160166
# Split files apart
161167
split(
162168
ELF_FILE_IN ${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME}

cmake/sysbuild/sign_nrf54h20.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ function(mcuboot_sign_merged_nrf54h20 merged_hex main_image)
190190
# List of additional build byproducts.
191191
set(byproducts ${output}.merged.hex)
192192

193+
if(NOT "${keyfile_enc}" STREQUAL "")
194+
if(SB_CONFIG_BOOT_ENCRYPTION_ALG_AES_256)
195+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
196+
endif()
197+
endif()
198+
193199
# Set up .hex outputs.
194200
if(SB_CONFIG_BUILD_OUTPUT_HEX)
195201
list(APPEND byproducts ${output}.signed.hex)

west.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ manifest:
6565
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
6666
- name: zephyr
6767
repo-path: sdk-zephyr
68-
revision: 8d7b9c9d00552a89eb04755435e24d555894d819
68+
revision: pull/3103/head
6969
import:
7070
# In addition to the zephyr repository itself, NCS also
7171
# imports the contents of zephyr/west.yml at the above
@@ -128,7 +128,7 @@ manifest:
128128
compare-by-default: true
129129
- name: mcuboot
130130
repo-path: sdk-mcuboot
131-
revision: d69621e3032f03ddf462eb3a9d2df5af03955898
131+
revision: pull/481/head
132132
path: bootloader/mcuboot
133133
- name: qcbor
134134
url: https://github.com/laurencelundblade/QCBOR

0 commit comments

Comments
 (0)