55{% - set mpi_app_recovery_class_name = application ['config' ]['CONFIG_SUIT_MPI_APP_RECOVERY_CLASS_NAME' ]|default ('nRF54H20_app_recovery' ) %}
66{% - set mpi_rad_recovery_vendor_name = application ['config' ]['CONFIG_SUIT_MPI_RAD_RECOVERY_VENDOR_NAME' ]|default ('nordicsemi.com' ) %}
77{% - set mpi_rad_recovery_class_name = application ['config' ]['CONFIG_SUIT_MPI_RAD_RECOVERY_CLASS_NAME' ]|default ('nRF54H20_rad_recovery' ) %}
8+ {% - if sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_LOCAL_3' ]%}
9+ {% - set mpi_app_recovery_local_vendor_name = application ['config' ]['CONFIG_SUIT_MPI_APP_LOCAL_3_VENDOR_NAME' ]|default ('nordicsemi.com' ) %}
10+ {% - set mpi_app_recovery_local_class_name = application ['config' ]['CONFIG_SUIT_MPI_APP_LOCAL_3_CLASS_NAME' ]|default ('nRF54H20_sample_app_2' ) %}
11+ {% - endif %}
812SUIT_Envelope_Tagged:
913 suit-authentication-wrapper:
1014 SuitDigest:
@@ -20,18 +24,33 @@ SUIT_Envelope_Tagged:
2024{% - endif %}
2125 suit-common:
2226 suit-components:
27+ {% - set component_index = 0 %}
28+ {% - if sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_RECOVERY' ]%}
2329 - - CAND_IMG
2430 - 0
31+ {% - set component_index = component_index + 1 %}
32+ {% - endif %}
2533 - - CAND_MFST
2634 - 0
27- {% - set component_index = 2 %}
28- {% - if app_recovery is defined %}
35+ {% - set cand_mfst_component_index = component_index %}
36+ {% - set component_index = component_index + 1 %}
37+ {% - if app_recovery_img is defined %}
38+ {% - if sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_RECOVERY' ]%}
2939 {% - set app_img_component_index = component_index %}
3040 {{- component_list.append( app_img_component_index ) or ""}}
3141 - - MEM
32- - {{ app_recovery['dt'] .label2node['cpu'] .unit_addr }}
33- - {{ get_absolute_address(app_recovery['dt'] .chosen_nodes['zephyr,code-partition'] ) }}
34- - {{ app_recovery['dt'] .chosen_nodes['zephyr,code-partition'] .regs[0] .size }}
42+ - {{ app_recovery_img['dt'] .label2node['cpu'] .unit_addr }}
43+ - {{ get_absolute_address(app_recovery_img['dt'] .chosen_nodes['zephyr,code-partition'] ) }}
44+ - {{ app_recovery_img['dt'] .chosen_nodes['zephyr,code-partition'] .regs[0] .size }}
45+ {% - elif sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_LOCAL_3' ] %}
46+ {% - set app_recovery_local_instld_mfst_component_index = component_index %}
47+ {{- component_list.append( app_recovery_local_instld_mfst_component_index ) or ""}}
48+ {{- dependencies_list.append( app_recovery_local_instld_mfst_component_index ) or ""}}
49+ - - INSTLD_MFST
50+ - RFC4122_UUID:
51+ namespace: {{ mpi_app_recovery_local_vendor_name }}
52+ name: {{ mpi_app_recovery_local_class_name }}
53+ {% - endif %}
3554 {% - set component_index = component_index + 1 %}
3655{% - endif %}
3756{% - if rad_recovery is defined %}
@@ -56,7 +75,8 @@ SUIT_Envelope_Tagged:
5675 namespace: {{ mpi_app_recovery_vendor_name }}
5776 name: {{ mpi_app_recovery_class_name }}
5877{% - endif %}
59- {% - if app_recovery is defined %}
78+ {% - if app_recovery_img is defined %}
79+ {% - if sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_RECOVERY' ]%}
6080 - suit-directive-set-component-index: {{ app_img_component_index }}
6181 - suit-directive-override-parameters:
6282 suit-parameter-vendor-identifier:
@@ -68,9 +88,19 @@ SUIT_Envelope_Tagged:
6888 suit-parameter-image-digest:
6989 suit-digest-algorithm-id: cose-alg-sha-256
7090 suit-digest-bytes:
71- file: {{ app_recovery ['binary'] }}
91+ file: {{ app_recovery_img ['binary'] }}
7292 suit-parameter-image-size:
73- file: {{ app_recovery['binary'] }}
93+ file: {{ app_recovery_img['binary'] }}
94+ {% - elif sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_LOCAL_3' ] %}
95+ - suit-directive-set-component-index: {{ app_recovery_local_instld_mfst_component_index }}
96+ - suit-directive-override-parameters:
97+ suit-parameter-vendor-identifier:
98+ RFC4122_UUID: {{ mpi_app_recovery_local_vendor_name }}
99+ suit-parameter-class-identifier:
100+ RFC4122_UUID:
101+ namespace: {{ mpi_app_recovery_local_vendor_name }}
102+ name: {{ mpi_app_recovery_class_name }}
103+ {% - endif %}
74104{% - endif %}
75105 - suit-directive-set-component-index: [{{ component_list|join(',') }}]
76106 - suit-condition-vendor-identifier:
@@ -85,7 +115,7 @@ SUIT_Envelope_Tagged:
85115 - suit-send-sysinfo-failure
86116 suit-dependencies:
87117 # Key is the index of suit-components that describe the dependency manifest
88- "1 ": {}
118+ "{{ cand_mfst_component_index }} ": {}
89119{% - for component_element in dependencies_list %}
90120 "{{ component_element }}": {}
91121{% - endfor %}
@@ -104,7 +134,7 @@ SUIT_Envelope_Tagged:
104134 - suit-send-sysinfo-success
105135 - suit-send-sysinfo-failure
106136{% endif %}
107- {% - if app_recovery is defined %}
137+ {% - if app_recovery_img is defined and sysbuild [ 'config' ][ 'SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_RECOVERY' ] %}
108138 - suit-directive-set-component-index: {{ app_img_component_index }}
109139 - suit-condition-image-match:
110140 - suit-send-record-success
@@ -127,7 +157,7 @@ SUIT_Envelope_Tagged:
127157 - suit-send-sysinfo-success
128158 - suit-send-sysinfo-failure
129159{% endif %}
130- {% - if app_recovery is defined %}
160+ {% - if app_recovery_img is defined and sysbuild [ 'config' ][ 'SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_RECOVERY' ] %}
131161 - suit-directive-set-component-index: {{ app_img_component_index }}
132162 - suit-directive-invoke:
133163 - suit-send-record-failure
@@ -146,7 +176,7 @@ SUIT_Envelope_Tagged:
146176 suit-install:
147177{% - endif %}
148178{% - if rad_recovery is defined %}
149- - suit-directive-set-component-index: 1
179+ - suit-directive-set-component-index: {{ cand_mfst_component_index }}
150180 - suit-directive-override-parameters:
151181 suit-parameter-uri: '#{{ rad_recovery['name'] }}'
152182 suit-parameter-image-digest:
@@ -171,18 +201,19 @@ SUIT_Envelope_Tagged:
171201 - suit-send-sysinfo-success
172202 - suit-send-sysinfo-failure
173203{% - endif %}
174- {% - if app_recovery is defined %}
204+ {% - if app_recovery_img is defined %}
205+ {% - if sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_RECOVERY' ]%}
175206 - suit-directive-set-component-index: 0
176207 - suit-directive-override-parameters:
177- {% - if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in app_recovery ['config' ] and app_recovery ['config' ]['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' ] != '' %}
178- suit-parameter-uri: '{{ app_recovery ['config'] ['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}'
208+ {% - if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in app_recovery_img ['config' ] and app_recovery_img ['config' ]['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' ] != '' %}
209+ suit-parameter-uri: '{{ app_recovery_img ['config'] ['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}'
179210{% - else %}
180- suit-parameter-uri: '#{{ app_recovery ['name'] }}'
211+ suit-parameter-uri: '#{{ app_recovery_img ['name'] }}'
181212{% - endif %}
182213 suit-parameter-image-digest:
183214 suit-digest-algorithm-id: cose-alg-sha-256
184215 suit-digest-bytes:
185- file: {{ app_recovery ['binary'] }}
216+ file: {{ app_recovery_img ['binary'] }}
186217 - suit-directive-fetch:
187218 - suit-send-record-failure
188219 - suit-condition-image-match:
@@ -200,6 +231,32 @@ SUIT_Envelope_Tagged:
200231 - suit-send-record-failure
201232 - suit-send-sysinfo-success
202233 - suit-send-sysinfo-failure
234+ {% - elif sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_LOCAL_3' ] %}
235+ - suit-directive-set-component-index: 0
236+ - suit-directive-override-parameters:
237+ suit-parameter-uri: '#{{ app_recovery_img['name'] }}'
238+ suit-parameter-image-digest:
239+ suit-digest-algorithm-id: cose-alg-sha-256
240+ suit-digest-bytes:
241+ envelope: {{ artifacts_folder ~ app_recovery_img['name'] }}.suit
242+ - suit-directive-fetch:
243+ - suit-send-record-failure
244+ - suit-condition-image-match:
245+ - suit-send-record-success
246+ - suit-send-record-failure
247+ - suit-send-sysinfo-success
248+ - suit-send-sysinfo-failure
249+ - suit-condition-dependency-integrity:
250+ - suit-send-record-success
251+ - suit-send-record-failure
252+ - suit-send-sysinfo-success
253+ - suit-send-sysinfo-failure
254+ - suit-directive-process-dependency:
255+ - suit-send-record-success
256+ - suit-send-record-failure
257+ - suit-send-sysinfo-success
258+ - suit-send-sysinfo-failure
259+ {% - endif %}
203260{% - endif %}
204261 suit-manifest-component-id:
205262 - INSTLD_MFST
@@ -210,8 +267,12 @@ SUIT_Envelope_Tagged:
210267{% - if rad_recovery is defined %}
211268 '#{{ rad_recovery['name'] }}': {{ artifacts_folder ~ rad_recovery['name'] }}.suit
212269{% - endif %}
213- {% - if app_recovery is defined %}
214- {% - if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE' not in app_recovery ['config' ] or app_recovery ['config' ]['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE' ] == '' %}
215- '#{{ app_recovery['name'] }}': {{ app_recovery['binary'] }}
270+ {% - if app_recovery_img is defined %}
271+ {% - if sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_RECOVERY' ]%}
272+ {% - if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE' not in app_recovery_img ['config' ] or app_recovery_img ['config' ]['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE' ] == '' %}
273+ '#{{ app_recovery_img['name'] }}': {{ app_recovery_img['binary'] }}
274+ {% - endif %}
275+ {% - elif sysbuild ['config' ]['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_LOCAL_3' ] %}
276+ '#{{ app_recovery_img['name'] }}': {{ artifacts_folder ~ app_recovery_img['name'] }}.suit
216277{% - endif %}
217278{% - endif %}
0 commit comments