diff --git a/ncs/Kconfig b/ncs/Kconfig index 72e1b80d..03994414 100755 --- a/ncs/Kconfig +++ b/ncs/Kconfig @@ -25,8 +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_with_nordic_top_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 default SUIT_ENVELOPE_SYSCTRL_TEMPLATE if SOC_NRF54H20_CPUSYS default SUIT_ENVELOPE_SECDOM_TEMPLATE if SOC_NRF54H20_CPUSEC help @@ -114,7 +113,6 @@ config SUIT_PREPARE_SECDOM_UPDATE config SUIT_ENVELOPE_SECDOM_TEMPLATE string "Location of template file for preparing secdom yaml envelope" - depends on !HW_REVISION_SOC1 help Jinja2 template file used to generate yaml file for secure domain update. default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/secdom_update_envelope.yaml.jinja2" @@ -175,7 +173,7 @@ config SUIT_ENVELOPE_TOP_TEMPLATE contain an input nordic-top envelope template file. You can use either absolute or relative path. In case relative path is used, the build system uses PROJECT_BINARY_DIR directory. - default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/nordic_top_envelope.yaml.jinja2" if SOC_NRF54H20_CPUAPP && !HW_REVISION_SOC1 + default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/nordic_top_envelope.yaml.jinja2" if SOC_NRF54H20_CPUAPP config SUIT_ENVELOPE_ROOT_TARGET string "Map root target to custom target to overwite output aftifacts names." diff --git a/ncs/nordic_top_with_secdom_hierarchical_envelope.yaml.jinja2 b/ncs/nordic_top_with_secdom_hierarchical_envelope.yaml.jinja2 deleted file mode 100644 index 5f2836c3..00000000 --- a/ncs/nordic_top_with_secdom_hierarchical_envelope.yaml.jinja2 +++ /dev/null @@ -1,98 +0,0 @@ -{%- set sequence_number = app['config']['CONFIG_SUIT_ENVELOPE_SEQUENCE_NUM'] %} -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 - - - INSTLD_MFST - - RFC4122_UUID: - namespace: nordicsemi.com - name: nRF54H20_sec - suit-shared-sequence: - - suit-directive-set-component-index: 1 - - suit-directive-override-parameters: - suit-parameter-vendor-identifier: - RFC4122_UUID: nordicsemi.com - suit-parameter-class-identifier: - RFC4122_UUID: - namespace: nordicsemi.com - name: nRF54H20_sec - - suit-directive-set-component-index: 1 - - 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": {} - "1": {} - suit-validate: - - suit-directive-set-component-index: 1 - - 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: 1 - - 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 - - suit-directive-override-parameters: - suit-parameter-uri: '#{{ secdom['name'] }}' - suit-parameter-image-digest: - suit-digest-algorithm-id: cose-alg-sha-256 - suit-digest-bytes: - envelope: {{ secdom['binary'] | replace('secdom_update_payload.bin', secdom['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 - suit-manifest-component-id: - - INSTLD_MFST - - RFC4122_UUID: - namespace: nordicsemi.com - name: nRF54H20_nordic_top - suit-integrated-dependencies: - '#{{ secdom['name'] }}': {{ secdom['binary'] | replace('secdom_update_payload.bin', secdom['name'] ~ '.suit') }} \ No newline at end of file diff --git a/ncs/root_hierarchical_envelope.yaml.jinja2 b/ncs/root_hierarchical_envelope.yaml.jinja2 deleted file mode 100644 index dc683ca2..00000000 --- a/ncs/root_hierarchical_envelope.yaml.jinja2 +++ /dev/null @@ -1,173 +0,0 @@ -{%- 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 %} - 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 %} - - 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|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|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 %} - 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 %} \ No newline at end of file diff --git a/ncs/secdom_update_envelope.yaml.jinja2 b/ncs/secdom_update_envelope.yaml.jinja2 index f3625e8e..4125045f 100644 --- a/ncs/secdom_update_envelope.yaml.jinja2 +++ b/ncs/secdom_update_envelope.yaml.jinja2 @@ -36,6 +36,9 @@ SUIT_Envelope_Tagged: - suit-send-record-failure - suit-send-sysinfo-success - suit-send-sysinfo-failure +{%- if 'CONFIG_HW_REVISION_SOC1' in app['config'] %} + suit-install: [] +{%- else %} suit-install: - suit-directive-set-component-index: 1 - suit-directive-override-parameters: @@ -47,6 +50,7 @@ SUIT_Envelope_Tagged: suit-parameter-source-component: 1 - suit-directive-copy: - suit-send-record-failure +{%- endif %} suit-manifest-component-id: - INSTLD_MFST - RFC4122_UUID: