Skip to content

Commit

Permalink
ncs: Add default envelope for multiprotocol radio
Browse files Browse the repository at this point in the history
Add envelope template for multiprotocol_rpmsg_subimage.

Signed-off-by: Tomasz Chyrowicz <[email protected]>
  • Loading branch information
tomchy committed Oct 25, 2023
1 parent 941ecd3 commit c56dbce
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ncs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ config SUIT_ENVELOPE_HCI_RPMSG_SUBIMAGE_TEMPLATE
Path to the default radio envelope template, that is used if the application directory does not
contain an input application envelope template file.

config SUIT_ENVELOPE_MULTIPROTOCOL_RPMSG_SUBIMAGE_TEMPLATE
string "Path to the default multiprotocol radio envelope template"
default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/multiprotocol_rad_envelope.yaml.jinja2"
help
Path to the default multiprotocol radio envelope template, that is used if the application
directory does not contain an input application envelope template file.

endif # SUIT_ENVELOPE_HIERARCHICAL_MANIFEST

config SUIT_ENVELOPE_EDITABLE_TEMPLATES_LOCATION
Expand Down
73 changes: 73 additions & 0 deletions ncs/multiprotocol_rad_envelope.yaml.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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: {{ version }}
suit-common:
suit-components:
- - MEM
- {{ multiprotocol_rpmsg_subimage['dt'].label2node['cpu'].unit_addr }}
- {{ get_absolute_address(multiprotocol_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition']) }}
- {{ multiprotocol_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}
suit-shared-sequence:
- suit-directive-override-parameters:
suit-parameter-vendor-identifier:
RFC4122_UUID: nordicsemi.com
suit-parameter-class-identifier:
RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sample_rad
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
file: {{ multiprotocol_rpmsg_subimage['binary'] }}
suit-parameter-image-size:
file: {{ multiprotocol_rpmsg_subimage['binary'] }}
- 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-validate:
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
suit-invoke:
- suit-directive-invoke:
- suit-send-record-failure
suit-install:
- suit-directive-override-parameters:
suit-parameter-uri: '#{{ multiprotocol_rpmsg_subimage['binary'] }}'
- 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-text:
suit-digest-algorithm-id: cose-alg-sha-256
suit-manifest-component-id:
- INSTLD_MFST
- RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sample_rad
suit-text:
'["MEM", 3, 235225088, 350208]':
suit-text-vendor-name: Nordic Semiconductor ASA
suit-text-model-name: nRF54H20_cpurad
suit-text-vendor-domain: nordicsemi.com
suit-text-model-info: The nRF54H20 radio core
suit-text-component-description: Sample radio core FW
suit-text-component-version: v1.0.0
suit-integrated-payloads:
'#{{ multiprotocol_rpmsg_subimage['name'] }}': {{ multiprotocol_rpmsg_subimage['binary'] }}
49 changes: 49 additions & 0 deletions ncs/root_hierarchical_envelope.yaml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ SUIT_Envelope_Tagged:
namespace: nordicsemi.com
name: nRF54H20_sample_rad
{%- endif %}
{%- if multiprotocol_rpmsg_subimage is defined %}
{%- set component_index = component_index + 1 %}
{%- set multiprotocol_rpmsg_subimage_component_index = component_index %}
{{- component_list.append( multiprotocol_rpmsg_subimage_component_index ) or ""}}
- - INSTLD_MFST
- RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sample_rad
{%- endif %}
{%- if app is defined %}
{%- set component_index = component_index + 1 %}
{%- set app_component_index = component_index %}
Expand All @@ -40,6 +49,16 @@ SUIT_Envelope_Tagged:
namespace: nordicsemi.com
name: nRF54H20_sample_rad
{%- endif %}
{%- if multiprotocol_rpmsg_subimage is defined %}
- suit-directive-set-component-index: {{ multiprotocol_rpmsg_subimage_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_sample_rad
{%- endif %}
{%- if app is defined %}
- suit-directive-set-component-index: {{ app_component_index }}
- suit-directive-override-parameters:
Expand Down Expand Up @@ -122,6 +141,33 @@ SUIT_Envelope_Tagged:
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
{%- endif %}
{%- if multiprotocol_rpmsg_subimage is defined %}
- suit-directive-override-parameters:
suit-parameter-uri: '#{{ multiprotocol_rpmsg_subimage['name'] }}'
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
envelope: {{ multiprotocol_rpmsg_subimage['binary'] | replace('zephyr.bin', multiprotocol_rpmsg_subimage['name'] ~ '.suit') }}
suit-parameter-image-size:
envelope: {{ multiprotocol_rpmsg_subimage['binary'] | replace('zephyr.bin', multiprotocol_rpmsg_subimage['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'] }}'
Expand Down Expand Up @@ -168,6 +214,9 @@ SUIT_Envelope_Tagged:
{%- if hci_rpmsg_subimage is defined %}
'#{{ hci_rpmsg_subimage['name'] }}': {{ hci_rpmsg_subimage['binary'] | replace('zephyr.bin', hci_rpmsg_subimage['name'] ~ '.suit') }}
{%- endif %}
{%- if multiprotocol_rpmsg_subimage is defined %}
'#{{ multiprotocol_rpmsg_subimage['name'] }}': {{ multiprotocol_rpmsg_subimage['binary'] | replace('zephyr.bin', multiprotocol_rpmsg_subimage['name'] ~ '.suit') }}
{%- endif %}
{%- if app is defined %}
'#{{ app['name'] }}': {{ app['binary'] | replace('zephyr.bin', app['name'] ~ '.suit') }}
{%- endif %}

0 comments on commit c56dbce

Please sign in to comment.