diff --git a/ncs/Kconfig b/ncs/Kconfig index 79ca50d4..1df22c9c 100755 --- a/ncs/Kconfig +++ b/ncs/Kconfig @@ -25,7 +25,7 @@ config SUIT_ENVELOPE_SEQUENCE_NUM config SUIT_ENVELOPE_DEFAULT_TEMPLATE string "Path to the default envelope template (deprecated)" default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/root_hierarchical_envelope.yaml.jinja2" if SOC_NRF54H20_CPUAPP && HW_REVISION_SOC1 - default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/root_wip_envelope.yaml.jinja2" if SOC_NRF54H20_CPUAPP && !HW_REVISION_SOC1 + default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/root_with_nordic_top_envelope.yaml.jinja2" if SOC_NRF54H20_CPUAPP && !HW_REVISION_SOC1 help Path to the root template, that is used if the application directory does not contain an input root envelope template file. diff --git a/ncs/root_wip_envelope.yaml.jinja2 b/ncs/root_wip_envelope.yaml.jinja2 deleted file mode 100644 index d8369a3d..00000000 --- a/ncs/root_wip_envelope.yaml.jinja2 +++ /dev/null @@ -1,280 +0,0 @@ -{%- set component_index = 0 %} -{%- set component_list = [] %} -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: - - - CAND_MFST - - 0 -{%- if hci_rpmsg_subimage is defined %} - {%- set component_index = component_index + 1 %} - {%- set hci_rpmsg_subimage_component_index = component_index %} - {{- component_list.append( hci_rpmsg_subimage_component_index ) or ""}} - - - INSTLD_MFST - - RFC4122_UUID: - 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 _802154_rpmsg_subimage is defined %} - {%- set component_index = component_index + 1 %} - {%- set _802154_rpmsg_subimage_component_index = component_index %} - {{- component_list.append( _802154_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 %} - {{- component_list.append( app_component_index ) or ""}} - - - INSTLD_MFST - - RFC4122_UUID: - namespace: nordicsemi.com - name: nRF54H20_sample_app -{%- endif %} - -{%- set component_list_without_top = component_list[:] %} -{%- if top is defined %} - {%- 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 hci_rpmsg_subimage is defined %} - - suit-directive-set-component-index: {{ hci_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 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 _802154_rpmsg_subimage is defined %} - - suit-directive-set-component-index: {{ _802154_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: - suit-parameter-vendor-identifier: - RFC4122_UUID: nordicsemi.com - suit-parameter-class-identifier: - RFC4122_UUID: - namespace: nordicsemi.com - name: nRF54H20_sample_app -{%- 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 hci_rpmsg_subimage is defined %} - - suit-directive-override-parameters: - suit-parameter-uri: '#{{ hci_rpmsg_subimage['name'] }}' - suit-parameter-image-digest: - suit-digest-algorithm-id: cose-alg-sha-256 - suit-digest-bytes: - envelope: {{ hci_rpmsg_subimage['binary'] | replace('zephyr.bin', hci_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 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-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 _802154_rpmsg_subimage is defined %} - - suit-directive-override-parameters: - suit-parameter-uri: '#{{ _802154_rpmsg_subimage['name'] }}' - suit-parameter-image-digest: - suit-digest-algorithm-id: cose-alg-sha-256 - suit-digest-bytes: - envelope: {{ _802154_rpmsg_subimage['binary'] | replace('zephyr.bin', _802154_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'] }}' - suit-parameter-image-digest: - suit-digest-algorithm-id: cose-alg-sha-256 - suit-digest-bytes: - envelope: {{ app['binary'] | replace('zephyr.bin', 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 %} - suit-manifest-component-id: - - INSTLD_MFST - - RFC4122_UUID: - namespace: nordicsemi.com - name: nRF54H20_sample_root - suit-integrated-dependencies: -{%- 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 _802154_rpmsg_subimage is defined %} - '#{{ _802154_rpmsg_subimage['name'] }}': {{ _802154_rpmsg_subimage['binary'] | replace('zephyr.bin', _802154_rpmsg_subimage['name'] ~ '.suit') }} -{%- endif %} -{%- if app is defined %} - '#{{ app['name'] }}': {{ app['binary'] | replace('zephyr.bin', app['name'] ~ '.suit') }} -{%- endif %} -{%- if top is defined %} - '#{{ top['name'] }}': {{ top['binary'] | replace('zephyr.bin', top['name'] ~ '.suit') }} -{%- endif %} diff --git a/ncs/root_with_nordic_top_envelope.yaml.jinja2 b/ncs/root_with_nordic_top_envelope.yaml.jinja2 index 27b252f1..d8369a3d 100644 --- a/ncs/root_with_nordic_top_envelope.yaml.jinja2 +++ b/ncs/root_with_nordic_top_envelope.yaml.jinja2 @@ -1,3 +1,5 @@ +{%- set component_index = 0 %} +{%- set component_list = [] %} SUIT_Envelope_Tagged: suit-authentication-wrapper: SuitDigest: @@ -9,12 +11,98 @@ SUIT_Envelope_Tagged: suit-components: - - CAND_MFST - 0 +{%- if hci_rpmsg_subimage is defined %} + {%- set component_index = component_index + 1 %} + {%- set hci_rpmsg_subimage_component_index = component_index %} + {{- component_list.append( hci_rpmsg_subimage_component_index ) or ""}} + - - INSTLD_MFST + - RFC4122_UUID: + 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 _802154_rpmsg_subimage is defined %} + {%- set component_index = component_index + 1 %} + {%- set _802154_rpmsg_subimage_component_index = component_index %} + {{- component_list.append( _802154_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 %} + {{- component_list.append( app_component_index ) or ""}} + - - INSTLD_MFST + - RFC4122_UUID: + namespace: nordicsemi.com + name: nRF54H20_sample_app +{%- endif %} + +{%- set component_list_without_top = component_list[:] %} +{%- if top is defined %} + {%- 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: - - suit-directive-set-component-index: 1 +{%- if hci_rpmsg_subimage is defined %} + - suit-directive-set-component-index: {{ hci_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 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 _802154_rpmsg_subimage is defined %} + - suit-directive-set-component-index: {{ _802154_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: + suit-parameter-vendor-identifier: + RFC4122_UUID: nordicsemi.com + suit-parameter-class-identifier: + RFC4122_UUID: + namespace: nordicsemi.com + name: nRF54H20_sample_app +{%- 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 @@ -22,7 +110,9 @@ SUIT_Envelope_Tagged: RFC4122_UUID: namespace: nordicsemi.com name: nRF54H20_nordic_top - - suit-directive-set-component-index: 1 +{%- endif %} + + - suit-directive-set-component-index: [{{ component_list|join(',') }}] - suit-condition-vendor-identifier: - suit-send-record-success - suit-send-record-failure @@ -36,14 +126,101 @@ SUIT_Envelope_Tagged: suit-dependencies: # Key is the index of suit-components that describe the dependency manifest "0": {} - "1": {} +{%- 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 hci_rpmsg_subimage is defined %} + - suit-directive-override-parameters: + suit-parameter-uri: '#{{ hci_rpmsg_subimage['name'] }}' + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + envelope: {{ hci_rpmsg_subimage['binary'] | replace('zephyr.bin', hci_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 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-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 _802154_rpmsg_subimage is defined %} - suit-directive-override-parameters: - suit-parameter-uri: '#top' + suit-parameter-uri: '#{{ _802154_rpmsg_subimage['name'] }}' + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + envelope: {{ _802154_rpmsg_subimage['binary'] | replace('zephyr.bin', _802154_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 @@ -54,11 +231,50 @@ SUIT_Envelope_Tagged: - 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: {{ app['binary'] | replace('zephyr.bin', 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 %} suit-manifest-component-id: - INSTLD_MFST - RFC4122_UUID: namespace: nordicsemi.com name: nRF54H20_sample_root suit-integrated-dependencies: - '#top': /home/adsz/forge/ncsdk-25614/sdk-nrf-next/twister-out/nrf54h20dk_nrf54h20_cpuapp/smp_transfer/subsys.suit.smp_transfer.root_gun.v1/zephyr/top.suit - +{%- 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 _802154_rpmsg_subimage is defined %} + '#{{ _802154_rpmsg_subimage['name'] }}': {{ _802154_rpmsg_subimage['binary'] | replace('zephyr.bin', _802154_rpmsg_subimage['name'] ~ '.suit') }} +{%- endif %} +{%- if app is defined %} + '#{{ app['name'] }}': {{ app['binary'] | replace('zephyr.bin', app['name'] ~ '.suit') }} +{%- endif %} +{%- if top is defined %} + '#{{ top['name'] }}': {{ top['binary'] | replace('zephyr.bin', top['name'] ~ '.suit') }} +{%- endif %} diff --git a/ncs/sysctrl_envelope.yaml.jinja2 b/ncs/sysctrl_envelope.yaml.jinja2 index 56b911d0..1c456f34 100644 --- a/ncs/sysctrl_envelope.yaml.jinja2 +++ b/ncs/sysctrl_envelope.yaml.jinja2 @@ -47,14 +47,16 @@ SUIT_Envelope_Tagged: - suit-directive-set-component-index: 0 - suit-directive-override-parameters: suit-parameter-source-component: 1 - - suit-directive-copy: [] - - suit-condition-image-match: [] + # TODO: Uncomment once SysCtrl booting is done using SUIT - NCSDK-25614 + # - suit-directive-copy: [] + # - suit-condition-image-match: [] suit-invoke: - suit-directive-set-component-index: 0 - suit-directive-override-parameters: suit-parameter-image-size: file: {{ sysctrl['binary'] }} - - suit-condition-image-match: [] + # TODO: Uncomment once SysCtrl booting is done using SUIT - NCSDK-25614 + # - suit-condition-image-match: [] - suit-directive-invoke: [] suit-payload-fetch: - suit-directive-set-component-index: 2