Skip to content

Commit

Permalink
doc: Added nRF54H20 migration guides for NCS 2.7.0
Browse files Browse the repository at this point in the history
Added nRF54H20 migration guides for NCS 2.7.0.
Added other misc documentation edits.

Signed-off-by: Francesco Domenico Servidio <[email protected]>
  • Loading branch information
FrancescoSer authored and anangl committed Jun 27, 2024
1 parent 7119e77 commit e51a021
Show file tree
Hide file tree
Showing 68 changed files with 2,772 additions and 892 deletions.
2 changes: 2 additions & 0 deletions applications/machine_learning/app_desc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ nRF54H20 DK
west build -b nrf54h20dk/nrf54h20/cpuapp -T applications.machine_learning.sensor_hub.zdebug .
.. include:: /includes/nRF54H20_erase_UICR.txt

Selecting a build type
======================

Expand Down
2 changes: 1 addition & 1 deletion applications/matter_weather_station/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ To build this application to work with the nRF7002 Wi-Fi expansion board:
Generating factory data
=======================

To enable factory data support, you need to select the ``overlay-factory_data`` configuration overlay from the available application :ref:`build configuration overlays <matter_weather_station_app_build_configuration_overlays>`, set the :kconfig:option:`SB_CONFIG_MATTER_FACTORY_DATA_GENERATE` kconfig option to ``y``, and use the ``factory_data`` file suffix.
To enable factory data support, you need to select the ``overlay-factory_data`` configuration overlay from the available application :ref:`build configuration overlays <matter_weather_station_app_build_configuration_overlays>`, set the ``SB_CONFIG_MATTER_FACTORY_DATA_GENERATE`` kconfig option to ``y``, and use the ``factory_data`` file suffix.
You can generate new factory data set when building for the given board target by invoking the following command:

.. code-block:: console
Expand Down
6 changes: 3 additions & 3 deletions applications/nrf_desktop/bootloader_dfu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ You can also enable :kconfig:option:`CONFIG_SUIT_DFU_CANDIDATE_PROCESSING_MINIMA

SUIT also has the following options in the sysbuild configuration:

* :kconfig:option:`SB_CONFIG_SUIT_ENVELOPE` - Required to create the SUIT envelope.
* ``SB_CONFIG_SUIT_ENVELOPE`` - Required to create the SUIT envelope.
Turned on by default on the ``nrf54h20dk`` board.
The envelope is used directly as a DFU update file by the DFU tools.
* :kconfig:option:`SB_CONFIG_SUIT_ENVELOPE_SEQUENCE_NUM` - The nRF Desktop application uses the sequence number to define an application version.
* ``SB_CONFIG_SUIT_ENVELOPE_SEQUENCE_NUM`` - The nRF Desktop application uses the sequence number to define an application version.

.. note::
The :kconfig:option:`SB_CONFIG_SUIT_ENVELOPE_SIGN` is disabled, so the generated SUIT envelope is not signed.
The ``SB_CONFIG_SUIT_ENVELOPE_SIGN`` is disabled, so the generated SUIT envelope is not signed.

On the ``nrf54h20dk`` board, the dedicated DFU partition called ``dfu_partition`` is defined by default in the DTS.
The partition is used to store the incoming SUIT envelope with an update candidate.
Expand Down
2 changes: 2 additions & 0 deletions applications/nrf_desktop/description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ The nRF Desktop application is built the same way to any other |NCS| application

.. include:: /includes/build_and_run.txt

.. include:: /includes/nRF54H20_erase_UICR.txt

.. note::
Information about the known issues in nRF Desktop can be found in |NCS|'s :ref:`release_notes` and on the :ref:`known_issues` page.

Expand Down
37 changes: 18 additions & 19 deletions doc/nrf/config_and_build/bootloaders/bootloader_adding_sysbuild.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following sections describe how to add either |NSIB| or MCUboot as an immuta
Adding |NSIB| as an immutable bootloader
========================================

To build |NSIB| with a Zephyr or |NCS| sample, enable the :kconfig:option:`SB_CONFIG_SECURE_BOOT_APPCORE` in the application's :file:`sysbuild.conf` file or using the command line:
To build |NSIB| with a Zephyr or |NCS| sample, enable the ``SB_CONFIG_SECURE_BOOT_APPCORE`` in the application's :file:`sysbuild.conf` file or using the command line:

.. code-block:: console
Expand Down Expand Up @@ -68,7 +68,7 @@ The following sections describe different configuration options available for |N
Adding a custom signature key file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To add a signature key file to this bootloader, set the :kconfig:option:`SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE` option in the application's :file:`sysbuild.conf` file or using the command line:
To specify a signature key file for this bootloader, set the ``SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE`` option in the application's :file:`sysbuild.conf` file or using the command line:

.. tabs::

Expand Down Expand Up @@ -130,11 +130,11 @@ For example, if a directory named :file:`_keys` located in :file:`/home/user/ncs
.. note::

The public key string must be a list of files in the following ways:
The public key string must contain a list of files where each item can be indicated as follows:

* The relative path to a file from the application configuration directory (if this is not set, then it will be the same as the application source directory).

* The absolute path to a file.
* Using the relative path to a file from the application configuration directory.
When not specified, it is assumed as the default application source directory.
* Using the absolute path to a file.

Environment variables (like :envvar:`$HOME`, :envvar:`$PWD`, or :envvar:`$USER`) and the ``~`` character on Unix systems are not expanded when setting an absolute path from a :file:`sysbuild.conf` file but are expanded correctly in key file paths from the command line that are not given as strings.

Expand All @@ -144,8 +144,8 @@ See :ref:`ug_fw_update_keys` for information on how to generate custom keys for

Additionally, the |NSIB| supports the following methods for signing images with private keys:

* :ref:`ug_fw_update_keys_openssl` - Uses the :kconfig:option:`SB_CONFIG_SECURE_BOOT_SIGNING_OPENSSL` Kconfig option.
* :ref:`Using a custom command <ug_bootloader_adding_sysbuild_immutable_b0_custom_signing>` - Uses the :kconfig:option:`SB_CONFIG_SECURE_BOOT_SIGNING_CUSTOM` Kconfig option.
* Uses the ``SB_CONFIG_SECURE_BOOT_SIGNING_OPENSSL`` Kconfig option.
* :ref:`Using a custom command <ug_bootloader_adding_sysbuild_immutable_b0_custom_signing>` - Uses the ``SB_CONFIG_SECURE_BOOT_SIGNING_CUSTOM`` Kconfig option.

The OpenSSL method is handled internally by the build system, whereas using custom commands requires more configuration steps.

Expand Down Expand Up @@ -196,35 +196,34 @@ To use a custom signing command with this bootloader, set the following options
Escaped quotations avoid malformed-string warnings from Kconfig.

.. note::
The public key string must contain a list of files where each item can be indicated as follows:

The public key string must be a list of files in the following ways (as mentioned previously in :ref:`ug_bootloader_adding_sysbuild_immutable_keys`):

* The relative path to a file from the application configuration directory (if this is not set, then it will be the same as the application source directory).

* The absolute path to a file.
* Using the relative path to a file from the application configuration directory.
When not specified, it is assumed as the default application source directory.
* Using the absolute path to a file.

See :kconfig:option:`SB_CONFIG_SECURE_BOOT_SIGNING_COMMAND` for specifics about what a usable signing command must do.
See ``SB_CONFIG_SECURE_BOOT_SIGNING_COMMAND`` for specifics about what a usable signing command must do.
The command string can include its own arguments like a typical terminal command, including arguments specific to the build system:

.. parsed-literal::
:class: highlight
my_command *[options]* *<args ...>* *<build_system_args ..>*
See the description of :kconfig:option:`SB_CONFIG_SECURE_BOOT_SIGNING_COMMAND` for which arguments can be sent to the build system in this way.
See the description of ``SB_CONFIG_SECURE_BOOT_SIGNING_COMMAND`` for which arguments can be sent to the build system in this way.

.. note::

Whitespace, hyphens, and other non-alphanumeric characters must be escaped appropriately when setting the string from the command line.
If the custom signing command uses its own options or arguments, it is recommended to define the string in a :file:`sysbuild.conf` file to avoid tracking backslashes.
Like public key paths, environment variables are not expanded when using them in a command string set from one of these files.
Like public key paths, environment variables are not expanded when using them in a command string set from the file.

.. _ug_bootloader_adding_sysbuild_immutable_mcuboot:

Adding MCUboot as an immutable bootloader
=========================================

To build :doc:`MCUboot <mcuboot:index-ncs>` with a Zephyr or |NCS| sample, enable the :kconfig:option:`SB_CONFIG_BOOTLOADER_MCUBOOT` in the application's :file:`sysbuild.conf` file or using the command line:
To build :doc:`MCUboot <mcuboot:index-ncs>` with a Zephyr or |NCS| sample, enable the ``SB_CONFIG_BOOTLOADER_MCUBOOT`` in the application's :file:`sysbuild.conf` file or using the command line:

.. code-block:: console
Expand All @@ -243,7 +242,7 @@ The following sections describe different configuration options available for MC
Adding a custom signature key file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To pass the signature key file into sysbuild by setting :kconfig:option:`SB_CONFIG_BOOT_SIGNATURE_KEY_FILE` option to the selected private key file.
You can specify the signature key file for this bootloader by setting the ``SB_CONFIG_BOOT_SIGNATURE_KEY_FILE`` option to the selected private key file.
You can set the option in :file:`sysbuild.conf` or using the command line:

.. tabs::
Expand Down Expand Up @@ -304,7 +303,7 @@ Adding MCUboot as an upgradable bootloader
To use MCUboot as an upgradable bootloader to your application, complete the following steps:

1. :ref:`Add nRF Secure Immutable Bootloader as the immutable bootloader <ug_bootloader_adding_sysbuild_immutable_b0>`.
#. Add MCUboot to the boot chain by including the :kconfig:option:`SB_CONFIG_BOOTLOADER_MCUBOOT` Kconfig option with either the build command or in the application's :file:`sysbuild.conf` file:
#. Add MCUboot to the boot chain by including the ``SB_CONFIG_BOOTLOADER_MCUBOOT`` Kconfig option with either the build command or in the application's :file:`sysbuild.conf` file:

.. code-block::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ Software-based downgrade protection
The |NCS| supports MCUboot's software-based downgrade prevention for application images, using semantic versioning.
This feature offers protection against any outdated firmware that is uploaded to a device.

To enable this feature, set the configuration option :kconfig:option:`CONFIG_MCUBOOT_DOWNGRADE_PREVENTION` for the MCUboot image and :kconfig:option:`SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY` for sysbuild.
To enable this feature, set the configuration option :kconfig:option:`CONFIG_MCUBOOT_DOWNGRADE_PREVENTION` for the MCUboot image and ``SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY`` for sysbuild.

.. caution::
Enabling :kconfig:option:`SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY` prevents the fallback recovery of application images.
Enabling ``SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY`` prevents the fallback recovery of application images.
Consult its Kconfig description and the :doc:`MCUboot Design documentation <mcuboot:design>` for more information on how to use it.

For nRF53 Series devices, this mode is generally the most appropriate for MCUboot.
The default mode applies only to the application core and not the network core, potentially resulting in a version mismatch.

In such cases, the application could roll back to a previous working version, but the network core would remain unchanged, leading to inconsistencies.
If the network core remains compatible with a previous version, these issues may go unnoticed for an extended period, making them difficult to debug.

You can compile your application with this feature as follows:

.. parsed-literal::
Expand Down Expand Up @@ -87,6 +93,7 @@ To enable anti-rollback protection with monotonic counter for |NSIB|, set the fo

Special handling is needed when updating the S1 variant of an image when :ref:`ug_bootloader_adding_upgradable`.
See :ref:`ug_bootloader_adding_presigned_variants` for details.
See :ref:`zephyr:sysbuild_kconfig_namespacing` for information on how to set options for built images in Sysbuild.

.. bootloader_monotonic_counter_nsib_end
Expand All @@ -99,6 +106,6 @@ Downgrade protection using MCUboot

To enable anti-rollback protection with monotonic counter for MCUboot, set the following configurations using sysbuild:

* :kconfig:option:`SB_CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION`
* :kconfig:option:`SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS`
* :kconfig:option:`SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE`
* ``SB_CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION``
* ``SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS``
* ``SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE``
13 changes: 10 additions & 3 deletions doc/nrf/config_and_build/config_and_build_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@ The sysbuild build configuration is generated using the sysbuild's :file:`CMakeL
.. note::
In the |NCS|, building with sysbuild is :ref:`enabled by default <sysbuild_enabled_ncs>`.

For more information about sysbuild, see the :ref:`documentation in Zephyr <zephyr:sysbuild>`.
For more information about sysbuild, see the following pages:

* :ref:`Sysbuild documentation in Zephyr <zephyr:sysbuild>`
* :ref:`sysbuild_images`
* :ref:`zephyr_samples_sysbuild`
* :ref:`sysbuild_forced_options`

.. _app_build_additions:

Expand Down Expand Up @@ -271,8 +276,10 @@ To disable these warnings, disable the :kconfig:option:`CONFIG_WARN_EXPERIMENTAL
Sysbuild enabled by default
===========================

In the :ref:`nRF repositories <dm_repo_types>`, building an application using the :ref:`standard building procedure <building>` automatically includes :ref:`configuration_system_overview_sysbuild` (the ``--sysbuild`` parameter).
For this reason, unlike in Zephyr, ``--sysbuild`` does not have to be explicitly mentioned in the command prompt when building the application using the :ref:`dm_code_base`.
When building :ref:`workspace applications <create_application_types_workspace>` copied from :ref:`nRF repositories <dm_repo_types>`, using the :ref:`standard building procedure <building>` automatically includes :ref:`configuration_system_overview_sysbuild` (the ``--sysbuild`` parameter).
For this reason, unlike in Zephyr, ``--sysbuild`` does not have to be explicitly mentioned in the command prompt when building the application.

This rule does not apply if you work with out-of-tree :ref:`freestanding applications <create_application_types_freestanding>`, for which you need to manually pass ``--sysbuild`` to build commands in every case.

You can disable building with sysbuild by using the ``--no-sysbuild`` parameter in the build command.

Expand Down
Loading

0 comments on commit e51a021

Please sign in to comment.