Skip to content

Commit a6c3a05

Browse files
committed
[nrf fromlist] modules: Add VID and CID Kconfigs
Add a possibility to specify VID and CID for each MCUboot image and pass it to the imgtool. Upstream PR #: 93940 Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent 476ad66 commit a6c3a05

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-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: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,38 @@ 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+
138+
config MCUBOOT_IMGTOOL_UUID_CID
139+
bool "Append image class unique identifier TLV"
140+
help
141+
If enabled, --cid option passed to imgtool with the value set by
142+
the MCUBOOT_IMGTOOL_UUID_CID_NAME option.
143+
144+
config MCUBOOT_IMGTOOL_UUID_CID_NAME
145+
string "Image class UUID"
146+
depends on MCUBOOT_IMGTOOL_UUID_CID
147+
help
148+
The image class unique identifier.
149+
The following formats are supported:
150+
- Image class name (i.e. nRF5340_door_lock_btperipheral).
151+
This format requires MCUBOOT_IMGTOOL_UUID_VID_NAME to be defined
152+
as the VID UUID is used as the namespace for image class UUID.
153+
- Raw UUID (i.e. 12345678-1234-5678-1234-567812345678)
154+
123155
config MCUBOOT_EXTRA_IMGTOOL_ARGS
124156
string "Extra arguments to pass to imgtool when signing"
125157
default ""

0 commit comments

Comments
 (0)