-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref: NCSDK-26629 Signed-off-by: Robert Stypa <[email protected]>
- Loading branch information
1 parent
3925944
commit 9186036
Showing
3 changed files
with
269 additions
and
11 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 |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
__pycache__ | ||
/doc/build/* | ||
/build/* | ||
suit-generator.log |
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
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,225 @@ | ||
{%- set component_index = 0 %} | ||
{%- set component_list = [] %} | ||
{%- set mpi_root_vendor_name = app['config']['CONFIG_SUIT_MPI_ROOT_VENDOR_NAME']|default('nordicsemi.com') %} | ||
{%- set mpi_root_class_name = app['config']['CONFIG_SUIT_MPI_ROOT_CLASS_NAME']|default('nRF54H20_sample_root') %} | ||
{%- set mpi_app_vendor_name = app['config']['CONFIG_SUIT_MPI_APP_LOCAL_1_VENDOR_NAME']|default('nordicsemi.com') %} | ||
{%- set mpi_app_class_name = app['config']['CONFIG_SUIT_MPI_APP_LOCAL_1_CLASS_NAME']|default('nRF54H20_sample_app') %} | ||
{%- set mpi_rad_vendor_name = app['config']['CONFIG_SUIT_MPI_RAD_LOCAL_1_VENDOR_NAME']|default('nordicsemi.com') %} | ||
{%- set mpi_rad_class_name = app['config']['CONFIG_SUIT_MPI_RAD_LOCAL_1_CLASS_NAME']|default('nRF54H20_sample_rad') %} | ||
{%- set sequence_number = app['config']['CONFIG_SUIT_ENVELOPE_SEQUENCE_NUM'] %} | ||
{%- if hci_rpmsg_subimage is defined %} | ||
{% set rad = hci_rpmsg_subimage %} | ||
{%- elif _802154_rpmsg_subimage is defined %} | ||
{% set rad = _802154_rpmsg_subimage %} | ||
{%- elif multiprotocol_rpmsg_subimage is defined %} | ||
{% set rad = multiprotocol_rpmsg_subimage %} | ||
{%- endif %} | ||
SUIT_Envelope_Tagged: | ||
suit-authentication-wrapper: | ||
SuitDigest: | ||
suit-digest-algorithm-id: cose-alg-sha-256 | ||
suit-manifest: | ||
suit-manifest-version: 1 | ||
suit-manifest-sequence-number: {{ sequence_number }} | ||
suit-common: | ||
suit-components: | ||
- - CAND_MFST | ||
- 0 | ||
{%- if rad is defined %} | ||
{%- set component_index = component_index + 1 %} | ||
{%- set rad_component_index = component_index %} | ||
{{- component_list.append( rad_component_index ) or ""}} | ||
- - INSTLD_MFST | ||
- RFC4122_UUID: | ||
namespace: {{ mpi_rad_vendor_name }} | ||
name: {{ mpi_rad_class_name }} | ||
{%- endif %} | ||
{%- if app is defined %} | ||
{%- set component_index = component_index + 1 %} | ||
{%- set app_component_index = component_index %} | ||
{{- component_list.append( app_component_index ) or ""}} | ||
- - INSTLD_MFST | ||
- RFC4122_UUID: | ||
namespace: {{ mpi_app_vendor_name }} | ||
name: {{ mpi_app_class_name }} | ||
{%- endif %} | ||
|
||
{%- set component_list_without_top = component_list[:] %} | ||
{%- if 'CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY' in app['config'] %} | ||
{%- set component_index = component_index + 1 %} | ||
{%- set top_component_index = component_index %} | ||
{{- component_list.append( top_component_index ) or ""}} | ||
- - INSTLD_MFST | ||
- RFC4122_UUID: | ||
namespace: nordicsemi.com | ||
name: nRF54H20_nordic_top | ||
{%- endif %} | ||
|
||
suit-shared-sequence: | ||
{%- if rad is defined %} | ||
- suit-directive-set-component-index: {{ rad_component_index }} | ||
- suit-directive-override-parameters: | ||
suit-parameter-vendor-identifier: | ||
RFC4122_UUID: {{ mpi_rad_vendor_name }} | ||
suit-parameter-class-identifier: | ||
RFC4122_UUID: | ||
namespace: {{ mpi_rad_vendor_name }} | ||
name: {{ mpi_rad_class_name }} | ||
{%- endif %} | ||
{%- if app is defined %} | ||
- suit-directive-set-component-index: {{ app_component_index }} | ||
- suit-directive-override-parameters: | ||
suit-parameter-vendor-identifier: | ||
RFC4122_UUID: {{ mpi_app_vendor_name }} | ||
suit-parameter-class-identifier: | ||
RFC4122_UUID: | ||
namespace: {{ mpi_app_vendor_name }} | ||
name: {{ mpi_app_class_name }} | ||
{%- endif %} | ||
|
||
{%- if top is defined %} | ||
- suit-directive-set-component-index: {{ top_component_index }} | ||
- suit-directive-override-parameters: | ||
suit-parameter-vendor-identifier: | ||
RFC4122_UUID: nordicsemi.com | ||
suit-parameter-class-identifier: | ||
RFC4122_UUID: | ||
namespace: nordicsemi.com | ||
name: nRF54H20_nordic_top | ||
{%- endif %} | ||
|
||
- suit-directive-set-component-index: [{{ component_list|join(',') }}] | ||
- suit-condition-vendor-identifier: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-condition-class-identifier: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
suit-dependencies: | ||
# Key is the index of suit-components that describe the dependency manifest | ||
"0": {} | ||
{%- for component_element in component_list %} | ||
"{{ component_element }}": {} | ||
{%- endfor %} | ||
suit-validate: | ||
- suit-directive-set-component-index: [{{ component_list_without_top|join(',') }}] | ||
- suit-condition-dependency-integrity: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-directive-process-dependency: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
|
||
suit-invoke: | ||
- suit-directive-set-component-index: [{{ component_list_without_top|join(',') }}] | ||
- suit-condition-dependency-integrity: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-directive-process-dependency: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
|
||
suit-install: | ||
- suit-directive-set-component-index: 0 | ||
{%- if rad is defined %} | ||
- suit-directive-override-parameters: | ||
suit-parameter-uri: '#{{ rad['name'] }}' | ||
suit-parameter-image-digest: | ||
suit-digest-algorithm-id: cose-alg-sha-256 | ||
suit-digest-bytes: | ||
envelope: {{ artifacts_folder ~ rad['name'] }}.suit | ||
- suit-directive-fetch: | ||
- suit-send-record-failure | ||
- suit-condition-image-match: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-condition-dependency-integrity: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-directive-process-dependency: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
{%- endif %} | ||
{%- if app is defined %} | ||
- suit-directive-override-parameters: | ||
suit-parameter-uri: '#{{ app['name'] }}' | ||
suit-parameter-image-digest: | ||
suit-digest-algorithm-id: cose-alg-sha-256 | ||
suit-digest-bytes: | ||
envelope: {{ artifacts_folder ~ app['name'] }}.suit | ||
- suit-directive-fetch: | ||
- suit-send-record-failure | ||
- suit-condition-image-match: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-condition-dependency-integrity: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-directive-process-dependency: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
{%- endif %} | ||
{%- if 'CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY' in app['config'] %} | ||
- suit-directive-override-parameters: | ||
suit-parameter-uri: '#top' | ||
suit-parameter-image-digest: | ||
suit-digest-algorithm-id: cose-alg-sha-256 | ||
suit-digest-bytes: | ||
envelope: {{ app['config']['CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY'] }}/nordic-top.suit | ||
- suit-directive-fetch: | ||
- suit-send-record-failure | ||
- suit-condition-image-match: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-condition-dependency-integrity: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
- suit-directive-process-dependency: | ||
- suit-send-record-success | ||
- suit-send-record-failure | ||
- suit-send-sysinfo-success | ||
- suit-send-sysinfo-failure | ||
{%- endif %} | ||
suit-manifest-component-id: | ||
- INSTLD_MFST | ||
- RFC4122_UUID: | ||
namespace: {{ mpi_root_vendor_name }} | ||
name: {{ mpi_root_class_name }} | ||
suit-integrated-dependencies: | ||
{%- if rad is defined %} | ||
'#{{ rad['name'] }}': {{ artifacts_folder ~ rad['name'] }}.suit | ||
{%- endif %} | ||
{%- if app is defined %} | ||
'#{{ app['name'] }}': {{ artifacts_folder ~ app['name'] }}.suit | ||
{%- endif %} | ||
{%- if 'CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY' in app['config'] %} | ||
'#top': {{ app['config']['CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY'] }}/nordic-top.suit | ||
{%- endif %} |