Skip to content

Commit

Permalink
ncs: Attach Nordic-top to the Root manifest
Browse files Browse the repository at this point in the history
Adjust Kconfig to support the manifest hierarchy.
Add nordic-top envelope template.
Add root envelope tampate that uses nordic-top.
Disable SysCtrl booting in sysctrl template until SUIT is used for
booting it.

Signed-off-by: Adam Szczygieł <[email protected]>
  • Loading branch information
adsz-nordic committed Feb 16, 2024
1 parent c101ece commit fbc7ce1
Show file tree
Hide file tree
Showing 4 changed files with 422 additions and 16 deletions.
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 0

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
126 changes: 126 additions & 0 deletions ncs/nordic_top_envelope.yaml.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
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: 1
suit-common:
suit-components:
- - CAND_MFST
- 0
- - INSTLD_MFST
- RFC4122_UUID:
namespace: nordicsemi.com
name: nRF54H20_sec
- - INSTLD_MFST
- 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
- 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'] }}'
- suit-directive-fetch:
- suit-send-record-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'] }}'
- suit-directive-fetch:
- suit-send-record-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

0 comments on commit fbc7ce1

Please sign in to comment.