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

doc: suit: Push scenario and DFU caches documentation #17519

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahasztag
Copy link
Contributor

Added documentation for SUIT DFU cache partitions
and how to use them to push detached payloads for DFU to the device.

@ahasztag ahasztag requested review from a team and FrancescoSer as code owners September 27, 2024 07:16
@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Sep 27, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 27, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 5

Inputs:

Sources:

sdk-nrf: PR head: 4eb9032f6d6d0b1946dc88614a8a2714b57c831c

more details

sdk-nrf:

PR head: 4eb9032f6d6d0b1946dc88614a8a2714b57c831c
merge base: 84492d6d9264745050a018d01f4f333b285864c1
target head (main): 1a56b7a984c267e9b598e2882fb663b96282ac2b
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (4)
doc
│  ├── nrf
│  │  ├── app_dev
│  │  │  ├── device_guides
│  │  │  │  ├── working_with_nrf
│  │  │  │  │  ├── nrf54h
│  │  │  │  │  │  ├── ug_nrf54h20_suit_dfu.rst
│  │  │  │  │  │  ├── ug_nrf54h20_suit_external_memory.rst
│  │  │  │  │  │  │ ug_nrf54h20_suit_push.rst
samples
│  ├── suit
│  │  ├── smp_transfer
│  │  │  │ README.rst

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain
  • ◻️ Build twister
  • ◻️ Integration tests
    • ◻️ test-sdk-dfu
    • ⚠️ test-sdk-dfu
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_cloud
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi

Note: This message is automatically posted and updated by the CI

@ahasztag ahasztag force-pushed the NCSDK-28882_doc_push_caches branch 2 times, most recently from 3f48612 to 17f8727 Compare September 27, 2024 08:24
Copy link
Contributor

@greg-fer greg-fer left a comment

Choose a reason for hiding this comment

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

Placement of the new file is OK for me. Title probably needs adjustment -- we don't name pages with "How to" usually. Detailed review will be done by the SUIT and nRF54H20 doc owner @FrancescoSer .

@ahasztag ahasztag force-pushed the NCSDK-28882_doc_push_caches branch 2 times, most recently from be58f5c to 33e69d5 Compare September 27, 2024 09:39
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Added documentation for SUIT DFU cache partitions
and how to use them to push detached payloads for DFU
to the device.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
Copy link
Contributor

@richabp richabp left a comment

Choose a reason for hiding this comment

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

I think it needs a Changelog entry.

@@ -12,8 +12,8 @@ However, the application domain can implement an IPC service, which allows the S
This guide explains how to prepare the application domain firmware and the SUIT envelope to perform SUIT firmware upgrade using external memory.

.. note::
The prerequisite to this guide is the :ref:`ug_nrf54h20_suit_fetch` user guide, as this guide assumes that the application uses the fetch model to obtain the candidate images.
See the :ref:`ug_nrf54h20_suit_fetch` for more details on how to migrate from push to fetch model.
To use external memory with SUIT, the you can either use the push model-based or the fetch model-based firmware upgrade.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To use external memory with SUIT, the you can either use the push model-based or the fetch model-based firmware upgrade.
To use external memory with SUIT, you can either use the push model-based or the fetch model-based firmware upgrade.

The prerequisite to this guide is the :ref:`ug_nrf54h20_suit_fetch` user guide, as this guide assumes that the application uses the fetch model to obtain the candidate images.
See the :ref:`ug_nrf54h20_suit_fetch` for more details on how to migrate from push to fetch model.
To use external memory with SUIT, the you can either use the push model-based or the fetch model-based firmware upgrade.
See :ref:`ug_nrf54h20_suit_push` for details about the push model and :ref:`ug_nrf54h20_suit_fetch` for details on how to migrate from push to fetch model.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
See :ref:`ug_nrf54h20_suit_push` for details about the push model and :ref:`ug_nrf54h20_suit_fetch` for details on how to migrate from push to fetch model.
See :ref:`ug_nrf54h20_suit_push` for details about the push model and :ref:`ug_nrf54h20_suit_fetch` for details on how to migrate from the push to fetch model.

The SUIT envelope must always be stored in the non-volatile memory in the MCU.
The SUIT manifests stored in the envelope contain instructions that the device must perform to fetch other required payloads.
To store payloads in the external memory, a Device Firmware Update (DFU) cache partition must be defined in the external memory's devicetree node.
In the SUIT manifest, you can define a component representing the cache partition in the external memory.
Within the ``suit-payload-fetch`` sequence, you can then store fetched payload(s) into a ``CACHE_POOL`` component.
The push model-based and the fetch model-based differ in the way the cache partition is filled with the images.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The push model-based and the fetch model-based differ in the way the cache partition is filled with the images.
The push model-based update and the fetch model-based update differ in the way the cache partition is filled with the images.

@@ -43,13 +41,53 @@ The companion image consists of two main parts:
* IPC service exposed towards the Secure Domain

When the companion image is booted and a directive that accesses the data on the external memory is issued, such as the ``suit-directive-fetch`` or ``suit-directive-copy`` directives, the Secure Domain firmware uses the IPC service provided by the companion image to access the contents of the external memory.
Beyond the booting of the companion image, the update process does not differ from regular fetch model-based update.
Beyond the booting of the companion image, the update process does not differ from regular push-model based or fetch model-based updates.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Beyond the booting of the companion image, the update process does not differ from regular push-model based or fetch model-based updates.
Beyond the booting of the companion image, the update process does not differ from regular push model-based or fetch model-based updates.

----------

In the push model, the cache partition contents are created on the building machine and pushed to the device without modifications.
The images are extracted to the cache partition files using the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The images are extracted to the cache partition files using the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE`
The images are extracted to the cache partition files using the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE` Kconfig option.


#. Ensure that the uri used by ``suit-payload-fetch`` sequence to fetch a given image matches the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI`.
Note this is done by default if using the provided Nordic manifest templates.
For the application image URI this can be done by (assuming the target name "application" for the image):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For the application image URI this can be done by (assuming the target name "application" for the image):
For the application image URI, this can be done by (assuming the target name ``application`` for the image):

* (Optionally) modify the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI` to modify the URI used as key for the given image in the DFU cache.

#. Ensure that the uri used by ``suit-payload-fetch`` sequence to fetch a given image matches the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI`.
Note this is done by default if using the provided Nordic manifest templates.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Note this is done by default if using the provided Nordic manifest templates.
This is done by default if using the manifest templates provided by Nordic Semiconductor.

- suit-directive-fetch:
- suit-send-record-failure

#. Ensure that the envelope does not integrate the given image inside the envelope integrated payloads section
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#. Ensure that the envelope does not integrate the given image inside the envelope integrated payloads section
#. Ensure that the envelope does not integrate the given image inside the envelope integrated payloads section.

- suit-send-record-failure

#. Ensure that the envelope does not integrate the given image inside the envelope integrated payloads section
This will be ensured by default if using the provided default SUIT envelope templates.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This will be ensured by default if using the provided default SUIT envelope templates.
This is ensured by default if using the provided default SUIT envelope templates.

Pushing the images to device
****************************

For an example how to push an image to a device see the :ref:`SUIT SMP Sample documentation <nrf54h_suit_sample>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For an example how to push an image to a device see the :ref:`SUIT SMP Sample documentation <nrf54h_suit_sample>`.
See the :ref:`SUIT SMP Sample documentation <nrf54h_suit_sample>` for an example of how to push an image to a device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants