Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCSDK-NONE: Add template for multiprotocol radio #52

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ncs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ config SUIT_ENVELOPE_HCI_RPMSG_SUBIMAGE_TEMPLATE
default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/rad_envelope.yaml.jinja2"
help
Path to the default radio envelope template, that is used if the application directory does not
contain an input application envelope template file.
contain an input radio 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 radio envelope template file.

endif # SUIT_ENVELOPE_HIERARCHICAL_MANIFEST

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['name'] }}'
- 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 %}