Skip to content

Commit ed36f55

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 e8a162c commit ed36f55

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
@@ -104,6 +104,38 @@ config MCUBOOT_IMGTOOL_OVERWRITE_ONLY
104104
If enabled, --overwrite-only option passed to imgtool to avoid
105105
adding the swap status area size when calculating overflow.
106106

107+
config MCUBOOT_IMGTOOL_UUID_VID
108+
bool "Append vendor unique identifier TLV"
109+
help
110+
If enabled, --vid option passed to imgtool with the value set by
111+
the MCUBOOT_IMGTOOL_UUID_VID_NAME option.
112+
113+
config MCUBOOT_IMGTOOL_UUID_VID_NAME
114+
string "Vendor UUID"
115+
depends on MCUBOOT_IMGTOOL_UUID_VID
116+
help
117+
The vendor unique identifier.
118+
The following formats are supported:
119+
- Domain name (i.e. amce.corp)
120+
- Raw UUID (i.e. 12345678-1234-5678-1234-567812345678)
121+
122+
config MCUBOOT_IMGTOOL_UUID_CID
123+
bool "Append image class unique identifier TLV"
124+
help
125+
If enabled, --cid option passed to imgtool with the value set by
126+
the MCUBOOT_IMGTOOL_UUID_CID_NAME option.
127+
128+
config MCUBOOT_IMGTOOL_UUID_CID_NAME
129+
string "Image class UUID"
130+
depends on MCUBOOT_IMGTOOL_UUID_CID
131+
help
132+
The image class unique identifier.
133+
The following formats are supported:
134+
- Image class name (i.e. nRF5340_door_lock_btperipheral).
135+
This format requires MCUBOOT_IMGTOOL_UUID_VID_NAME to be defined
136+
as the VID UUID is used as the namespace for image class UUID.
137+
- Raw UUID (i.e. 12345678-1234-5678-1234-567812345678)
138+
107139
config MCUBOOT_EXTRA_IMGTOOL_ARGS
108140
string "Extra arguments to pass to imgtool when signing"
109141
default ""

0 commit comments

Comments
 (0)