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

Attach Nordic-top to the Root manifest #91

Merged
merged 1 commit into from
Feb 20, 2024
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
24 changes: 11 additions & 13 deletions ncs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,10 @@ config SUIT_ENVELOPE_SEQUENCE_NUM
int "Sequence number of the generated SUIT manifest"
default 1

config SUIT_ENVELOPE_HIERARCHICAL_MANIFEST
bool "Create hierarchical manifest"
select EXPERIMENTAL
help
Create hierarchical root manifest with it's dependent sub-manifests
default y

config SUIT_ENVELOPE_DEFAULT_TEMPLATE
string "Path to the default envelope template (deprecated)"
default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/default_app_rad_cores_envelope.yaml.jinja2" if SOC_NRF54H20_CPUAPP && !SUIT_ENVELOPE_HIERARCHICAL_MANIFEST
default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/root_hierarchical_envelope.yaml.jinja2" if SOC_NRF54H20_CPUAPP && SUIT_ENVELOPE_HIERARCHICAL_MANIFEST
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
help
Path to the root template, that is used if the application directory does not
contain an input root envelope template file.
Expand All @@ -49,8 +42,6 @@ config SUIT_ENVELOPE_ROOT_TEMPLATE
You can use either absolute or relative path.
In case relative path is used, the build system uses PROJECT_BINARY_DIR directory.

if SUIT_ENVELOPE_HIERARCHICAL_MANIFEST

config SUIT_ENVELOPE_APP_TEMPLATE
string "Path to the default application envelope template"
default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/app_envelope.yaml.jinja2"
Expand Down Expand Up @@ -85,8 +76,6 @@ config SUIT_ENVELOPE_802154_RPMSG_SUBIMAGE_TEMPLATE
You can use either absolute or relative path.
In case relative path is used, the build system uses PROJECT_BINARY_DIR directory.

endif # SUIT_ENVELOPE_HIERARCHICAL_MANIFEST

config SUIT_ENVELOPE_EDITABLE_TEMPLATES_LOCATION
string "Path to the folder with envelope templates"
default "../../"
Expand Down Expand Up @@ -176,4 +165,13 @@ config SUIT_ENVELOPE_SYSCTRL_TEMPLATE
In case relative path is used, the build system uses PROJECT_BINARY_DIR directory.
default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs/sysctrl_envelope.yaml.jinja2"

config SUIT_ENVELOPE_TOP_TEMPLATE
string "Location of template file for preparing nordic-top yaml envelope"
help
Path to the nordic-top template, that is used if the application directory does not
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

endif # SUIT_ENVELOPE
154 changes: 154 additions & 0 deletions ncs/nordic_top_envelope.yaml.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
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
- - INSTLD_MFST
- RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sec
- - INSTLD_MFST
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a possibility that there will be a build in which there will be only secdom available and sysctl should be removed from the output yaml file - in meaning that we should add here condition to check if sysctrl is defined?

- RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sys
suit-shared-sequence:
- suit-directive-set-component-index: 1
- suit-directive-override-parameters:
suit-parameter-class-identifier:
RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sec
- suit-directive-set-component-index: 2
- suit-directive-override-parameters:
suit-parameter-class-identifier:
RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sys
- suit-directive-set-component-index: [1,2]
- suit-directive-override-parameters:
suit-parameter-vendor-identifier:
RFC4122_UUID: nordicsemi.com
- 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": {}
"2": {}
suit-validate:
- suit-directive-set-component-index: 2
tomchy marked this conversation as resolved.
Show resolved Hide resolved
- suit-directive-override-parameters:
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
envelope: {{ sysctrl['binary'] | replace('zephyr.bin', sysctrl['name'] ~ '.suit') }}
- 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-load:
- suit-directive-set-component-index: 2
- 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: 2
- 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'] }}'
tomchy marked this conversation as resolved.
Show resolved Hide resolved
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
tomchy marked this conversation as resolved.
Show resolved Hide resolved
- 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-directive-override-parameters:
suit-parameter-uri: '#{{ sysctrl['name'] }}'
tomchy marked this conversation as resolved.
Show resolved Hide resolved
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
envelope: {{ sysctrl['binary'] | replace('zephyr.bin', sysctrl['name'] ~ '.suit') }}
- suit-directive-fetch:
- suit-send-record-failure
tomchy marked this conversation as resolved.
Show resolved Hide resolved
- 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') }}
'#{{ sysctrl['name'] }}': {{ sysctrl['binary'] | replace('zephyr.bin', sysctrl['name'] ~ '.suit') }}

Loading
Loading