1+ {% - set component_index = 0 %}
2+ {% - set component_list = [] %}
3+ {% - set dependencies_list = [] %}
4+ {% - set mpi_app_recovery_vendor_name = application ['config' ]['CONFIG_SUIT_MPI_APP_RECOVERY_VENDOR_NAME' ]|default ('nordicsemi.com' ) %}
5+ {% - set mpi_app_recovery_class_name = application ['config' ]['CONFIG_SUIT_MPI_APP_RECOVERY_CLASS_NAME' ]|default ('nRF54H20_app_recovery' ) %}
6+ {% - set mpi_rad_recovery_vendor_name = application ['config' ]['CONFIG_SUIT_MPI_RAD_RECOVERY_VENDOR_NAME' ]|default ('nordicsemi.com' ) %}
7+ {% - set mpi_rad_recovery_class_name = application ['config' ]['CONFIG_SUIT_MPI_RAD_RECOVERY_CLASS_NAME' ]|default ('nRF54H20_rad_recovery' ) %}
8+ {% - set mpi_app_recovery_local_vendor_name = application ['config' ]['CONFIG_SUIT_MPI_APP_LOCAL_3_VENDOR_NAME' ]|default ('nordicsemi.com' ) %}
9+ {% - set mpi_app_recovery_local_class_name = application ['config' ]['CONFIG_SUIT_MPI_APP_LOCAL_3_CLASS_NAME' ]|default ('nRF54H20_sample_app_2' ) %}
10+ SUIT_Envelope_Tagged:
11+ suit-authentication-wrapper:
12+ SuitDigest:
13+ suit-digest-algorithm-id: cose-alg-sha-256
14+ suit-manifest:
15+ suit-manifest-version: 1
16+ {% - if APP_RECOVERY_SEQ_NUM is defined %}
17+ suit-manifest-sequence-number: {{ APP_RECOVERY_SEQ_NUM }}
18+ {% - elif DEFAULT_SEQ_NUM is defined %}
19+ suit-manifest-sequence-number: {{ DEFAULT_SEQ_NUM }}
20+ {% - else %}
21+ suit-manifest-sequence-number: 1
22+ {% - endif %}
23+ suit-common:
24+ suit-components:
25+ {% - set component_index = 0 %}
26+ - - CAND_MFST
27+ - 0
28+ {% - set component_index = component_index + 1 %}
29+ {% - if app_recovery_img is defined %}
30+ {% - set app_recovery_local_instld_mfst_component_index = component_index %}
31+ {{- component_list.append( app_recovery_local_instld_mfst_component_index ) or ""}}
32+ {{- dependencies_list.append( app_recovery_local_instld_mfst_component_index ) or ""}}
33+ - - INSTLD_MFST
34+ - RFC4122_UUID:
35+ namespace: {{ mpi_app_recovery_local_vendor_name }}
36+ name: {{ mpi_app_recovery_local_class_name }}
37+ {% - set component_index = component_index + 1 %}
38+ {% - endif %}
39+ {% - if rad_recovery is defined %}
40+ {% - set rad_instld_mfst_component_index = component_index %}
41+ {{- component_list.append( rad_instld_mfst_component_index ) or ""}}
42+ {{- dependencies_list.append( rad_instld_mfst_component_index ) or ""}}
43+ - - INSTLD_MFST
44+ - RFC4122_UUID:
45+ namespace: {{ mpi_rad_recovery_vendor_name }}
46+ name: {{ mpi_rad_recovery_class_name }}
47+ {% - set component_index = component_index + 1 %}
48+ {% - endif %}
49+
50+ suit-shared-sequence:
51+ {% - if rad_recovery is defined %}
52+ - suit-directive-set-component-index: {{ rad_instld_mfst_component_index }}
53+ - suit-directive-override-parameters:
54+ suit-parameter-vendor-identifier:
55+ RFC4122_UUID: {{ mpi_app_recovery_vendor_name }}
56+ suit-parameter-class-identifier:
57+ RFC4122_UUID:
58+ namespace: {{ mpi_app_recovery_vendor_name }}
59+ name: {{ mpi_app_recovery_class_name }}
60+ {% - endif %}
61+ {% - if app_recovery_img is defined %}
62+ - suit-directive-set-component-index: {{ app_recovery_local_instld_mfst_component_index }}
63+ - suit-directive-override-parameters:
64+ suit-parameter-vendor-identifier:
65+ RFC4122_UUID: {{ mpi_app_recovery_local_vendor_name }}
66+ suit-parameter-class-identifier:
67+ RFC4122_UUID:
68+ namespace: {{ mpi_app_recovery_local_vendor_name }}
69+ name: {{ mpi_app_recovery_class_name }}
70+ {% - endif %}
71+ - suit-directive-set-component-index: [{{ component_list|join(',') }}]
72+ - suit-condition-vendor-identifier:
73+ - suit-send-record-success
74+ - suit-send-record-failure
75+ - suit-send-sysinfo-success
76+ - suit-send-sysinfo-failure
77+ - suit-condition-class-identifier:
78+ - suit-send-record-success
79+ - suit-send-record-failure
80+ - suit-send-sysinfo-success
81+ - suit-send-sysinfo-failure
82+ suit-dependencies:
83+ # Key is the index of suit-components that describe the dependency manifest
84+ "0": {}
85+ {% - for component_element in dependencies_list %}
86+ "{{ component_element }}": {}
87+ {% - endfor %}
88+
89+ suit-validate:
90+ {% if dependencies_list |length > 0 %}
91+ - suit-directive-set-component-index: [{{ dependencies_list|join(',') }}]
92+ - suit-condition-dependency-integrity:
93+ - suit-send-record-success
94+ - suit-send-record-failure
95+ - suit-send-sysinfo-success
96+ - suit-send-sysinfo-failure
97+ - suit-directive-process-dependency:
98+ - suit-send-record-success
99+ - suit-send-record-failure
100+ - suit-send-sysinfo-success
101+ - suit-send-sysinfo-failure
102+ {% endif %}
103+
104+ suit-invoke:
105+ {% if dependencies_list |length > 0 %}
106+ - suit-directive-set-component-index: [{{ dependencies_list|join(',') }}]
107+ - suit-condition-dependency-integrity:
108+ - suit-send-record-success
109+ - suit-send-record-failure
110+ - suit-send-sysinfo-success
111+ - suit-send-sysinfo-failure
112+ - suit-directive-process-dependency:
113+ - suit-send-record-success
114+ - suit-send-record-failure
115+ - suit-send-sysinfo-success
116+ - suit-send-sysinfo-failure
117+ {% endif %}
118+
119+ {% - if APP_RECOVERY_VERSION is defined %}
120+ suit-current-version: {{ APP_RECOVERY_VERSION }}
121+ {% - elif DEFAULT_VERSION is defined %}
122+ suit-current-version: {{ DEFAULT_VERSION }}
123+ {% - endif %}
124+
125+ {% - if application ['dt' ].label 2node ['suit_storage_partition' ].regs [0].size == 24576 %}
126+ # Application DTS contains larger SUIT storage - use legacy encoding
127+ suit-install-legacy:
128+ {% - else %}
129+ suit-install:
130+ {% - endif %}
131+ {% - if rad_recovery is defined %}
132+ - suit-directive-set-component-index: 0
133+ - suit-directive-override-parameters:
134+ suit-parameter-uri: '#{{ rad_recovery['name'] }}'
135+ suit-parameter-image-digest:
136+ suit-digest-algorithm-id: cose-alg-sha-256
137+ suit-digest-bytes:
138+ envelope: {{ artifacts_folder ~ rad_recovery['name'] }}.suit
139+ - suit-directive-fetch:
140+ - suit-send-record-failure
141+ - suit-condition-image-match:
142+ - suit-send-record-success
143+ - suit-send-record-failure
144+ - suit-send-sysinfo-success
145+ - suit-send-sysinfo-failure
146+ - suit-condition-dependency-integrity:
147+ - suit-send-record-success
148+ - suit-send-record-failure
149+ - suit-send-sysinfo-success
150+ - suit-send-sysinfo-failure
151+ - suit-directive-process-dependency:
152+ - suit-send-record-success
153+ - suit-send-record-failure
154+ - suit-send-sysinfo-success
155+ - suit-send-sysinfo-failure
156+ {% - endif %}
157+ {% - if app_recovery_img is defined %}
158+ - suit-directive-set-component-index: 0
159+ - suit-directive-override-parameters:
160+ suit-parameter-uri: '#{{ app_recovery_img['name'] }}'
161+ suit-parameter-image-digest:
162+ suit-digest-algorithm-id: cose-alg-sha-256
163+ suit-digest-bytes:
164+ envelope: {{ artifacts_folder ~ app_recovery_img['name'] }}.suit
165+ - suit-directive-fetch:
166+ - suit-send-record-failure
167+ - suit-condition-image-match:
168+ - suit-send-record-success
169+ - suit-send-record-failure
170+ - suit-send-sysinfo-success
171+ - suit-send-sysinfo-failure
172+ - suit-condition-dependency-integrity:
173+ - suit-send-record-success
174+ - suit-send-record-failure
175+ - suit-send-sysinfo-success
176+ - suit-send-sysinfo-failure
177+ - suit-directive-process-dependency:
178+ - suit-send-record-success
179+ - suit-send-record-failure
180+ - suit-send-sysinfo-success
181+ - suit-send-sysinfo-failure
182+ {% - endif %}
183+ suit-manifest-component-id:
184+ - INSTLD_MFST
185+ - RFC4122_UUID:
186+ namespace: {{ mpi_app_recovery_vendor_name }}
187+ name: {{ mpi_app_recovery_class_name }}
188+ suit-integrated-dependencies:
189+ {% - if rad_recovery is defined %}
190+ '#{{ rad_recovery['name'] }}': {{ artifacts_folder ~ rad_recovery['name'] }}.suit
191+ {% - endif %}
192+ {% - if app_recovery_img is defined %}
193+ '#{{ app_recovery_img['name'] }}': {{ artifacts_folder ~ app_recovery_img['name'] }}.suit
194+ {% - endif %}
0 commit comments