Skip to content

Commit 5a3e639

Browse files
ahasztagtomchy
authored andcommitted
suit: Verify installed nordic top version
This commit adds a check inside the default root envelope verifying if the installed nordic top manifest version is not too old. The minimal version of the Nordic top manifest is defined by the VARSION file. Signed-off-by: Artur Hadasz <[email protected]>
1 parent cb968d1 commit 5a3e639

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

config/suit/templates/nrf54h20/default/v1/root_with_binary_nordic_top.yaml.jinja2

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# depending on which components are defined in the input context and which payloads
99
# are included/detached from the envelope.
1010
# This manifest will only be installed if the SoC Binaries (nordic_top envelope) installed
11-
# in the device have a semantic version of at least 0.8.0.
11+
# in the device have a semantic version of at least MIN_NORDIC_TOP_VERSION (by default 0.8.0).
1212
# If a partial update (only radio or only application) needs to be performed,
1313
# several rules are enforced:
1414
# - If the candidate only contains the radio core image, it is ensured that
@@ -30,6 +30,9 @@
3030
{%- else %}
3131
{% set RAD_LOCAL_1_VERSION_MAJOR = 0 %}
3232
{%- endif %}
33+
{%- if not MIN_NORDIC_TOP_VERSION is defined %}
34+
{%- set MIN_NORDIC_TOP_VERSION = "0.8.0" %}
35+
{%- endif %}
3336
{%- if 'SB_CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY' in sysbuild['config'] and sysbuild['config']['SB_CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY'] != '' %}
3437
{%- set nordic_top = True %}
3538
{%- else %}
@@ -273,11 +276,9 @@ SUIT_Envelope_Tagged:
273276

274277
suit-candidate-verification:
275278
- suit-directive-set-component-index: {{ top_component_index }}
276-
# The version check below should be modified if a different installed SoC Binaries version
277-
# is required for the update.
278279
- suit-directive-override-parameters:
279280
suit-parameter-version:
280-
suit-condition-version-comparison-greater-equal: 0.8.0
281+
suit-condition-version-comparison-greater-equal: {{ MIN_NORDIC_TOP_VERSION }}
281282
- suit-condition-version:
282283
- suit-send-record-success
283284
- suit-send-record-failure

samples/suit/smp_transfer/VERSION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ APP_RECOVERY_VERSION = 0.1.0
1515

1616
RAD_LOCAL_1_SEQ_NUM = 1
1717
RAD_LOCAL_1_VERSION = 0.1.0
18+
19+
MIN_NORDIC_TOP_VERSION = 0.8.0

0 commit comments

Comments
 (0)