Skip to content

Commit 1b66537

Browse files
committed
[nrf fromtree] modules: Add VID and CID Kconfigs
Add a possibility to specify VID and CID for each MCUboot image and pass it to the imgtool. Signed-off-by: Tomasz Chyrowicz <[email protected]> (cherry picked from commit 7c1a74f)
1 parent a9c15a8 commit 1b66537

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

cmake/mcuboot.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ function(zephyr_mcuboot_tasks)
124124
set(imgtool_args --key "${keyfile}" ${imgtool_args})
125125
endif()
126126

127+
if(CONFIG_MCUBOOT_IMGTOOL_UUID_VID)
128+
set(imgtool_args ${imgtool_args} --vid "${CONFIG_MCUBOOT_IMGTOOL_UUID_VID_NAME}")
129+
endif()
130+
131+
if(CONFIG_MCUBOOT_IMGTOOL_UUID_CID)
132+
set(imgtool_args ${imgtool_args} --cid "${CONFIG_MCUBOOT_IMGTOOL_UUID_CID_NAME}")
133+
endif()
134+
127135
if(CONFIG_MCUBOOT_IMGTOOL_OVERWRITE_ONLY)
128136
# Use overwrite-only instead of swap upgrades.
129137
set(imgtool_args --overwrite-only --align 1 ${imgtool_args})

modules/Kconfig.mcuboot

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,40 @@ config MCUBOOT_IMGTOOL_OVERWRITE_ONLY
120120
If enabled, --overwrite-only option passed to imgtool to avoid
121121
adding the swap status area size when calculating overflow.
122122

123+
config MCUBOOT_IMGTOOL_UUID_VID
124+
bool "Append vendor unique identifier TLV"
125+
help
126+
If enabled, --vid option passed to imgtool with the value set by
127+
the MCUBOOT_IMGTOOL_UUID_VID_NAME option.
128+
129+
config MCUBOOT_IMGTOOL_UUID_VID_NAME
130+
string "Vendor UUID"
131+
depends on MCUBOOT_IMGTOOL_UUID_VID
132+
help
133+
The vendor unique identifier.
134+
The following formats are supported:
135+
- Domain name (i.e. amce.corp)
136+
- Raw UUID (i.e. 12345678-1234-5678-1234-567812345678)
137+
- Raw HEX UUID (i.e. 12345678123456781234567812345678)
138+
139+
config MCUBOOT_IMGTOOL_UUID_CID
140+
bool "Append image class unique identifier TLV"
141+
help
142+
If enabled, --cid option passed to imgtool with the value set by
143+
the MCUBOOT_IMGTOOL_UUID_CID_NAME option.
144+
145+
config MCUBOOT_IMGTOOL_UUID_CID_NAME
146+
string "Image class UUID"
147+
depends on MCUBOOT_IMGTOOL_UUID_CID
148+
help
149+
The image class unique identifier.
150+
The following formats are supported:
151+
- Image class name (i.e. nRF5340_door_lock_btperipheral).
152+
This format requires MCUBOOT_IMGTOOL_UUID_VID_NAME to be defined
153+
as the VID UUID is used as the namespace for image class UUID.
154+
- Raw UUID (i.e. 12345678-1234-5678-1234-567812345678)
155+
- Raw HEX UUID (i.e. 12345678123456781234567812345678)
156+
123157
config MCUBOOT_EXTRA_IMGTOOL_ARGS
124158
string "Extra arguments to pass to imgtool when signing"
125159
default ""

0 commit comments

Comments
 (0)