samples: fast_pair: locator_tag: migrate nRF53 targets to DTS partitioning#28462
samples: fast_pair: locator_tag: migrate nRF53 targets to DTS partitioning#28462kapi-no wants to merge 5 commits into
Conversation
ef72204 to
a0461ec
Compare
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 408d86203662302bb10d7e128b75e25d3aa64d06 more detailssdk-nrf:
Github labels
List of changed files detected by CI (48)Outputs:ToolchainVersion: f0aa129f09 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
| If your application is based on the nRF53 Series MCUboot DFU configuration of this sample, follow the generic Fast Pair PM-to-DTS migration steps described in the *Google Fast Pair* recommended changes of the :ref:`migration_3.3` guide. | ||
| In addition to the generic steps, the nRF53 Series DFU configuration with MCUboot in the overwrite mode requires the following unique adjustments: | ||
|
|
||
| 1. Enable the multi-image update mode in your sysbuild configuration so that the application core and the network core images are updated together through MCUboot: |
There was a problem hiding this comment.
| 1. Enable the multi-image update mode in your sysbuild configuration so that the application core and the network core images are updated together through MCUboot: | |
| 1. Enable the multi-image update mode in your sysbuild configuration so that the application core and network core images are updated together through MCUboot: |
|
|
||
| The size of ``slot3_partition`` must match the corresponding RAM-backed ``slot2_partition`` defined in :file:`nrf/modules/mcuboot/flash_sim.overlay`, which MCUboot uses to forward the network core image during DFU. | ||
|
|
||
| As a consequence of moving the secondary slots to external flash, the internal flash node (``flash0``) only needs to declare a single MCUboot slot partition (``slot0_partition``), in contrast to nRF52 and nRF54L Series board targets where ``slot1_partition`` is also placed on the internal flash. |
There was a problem hiding this comment.
| As a consequence of moving the secondary slots to external flash, the internal flash node (``flash0``) only needs to declare a single MCUboot slot partition (``slot0_partition``), in contrast to nRF52 and nRF54L Series board targets where ``slot1_partition`` is also placed on the internal flash. | |
| As a consequence of moving the secondary slots to external flash, the internal flash node (``flash0``) only needs to declare a single MCUboot slot partition (``slot0_partition``). | |
| In the nRF52 and nRF54L Series board targets, the ``slot1_partition`` is also placed on the internal flash. |
| Place this overlay in :file:`sysbuild/ipc_radio/boards/<board_target>.overlay` so that it is applied to the IPC radio image. | ||
| Size ``s0_partition`` so that the network core image fits within the RAM-backed ``slot2_partition`` of :file:`nrf/modules/mcuboot/flash_sim.overlay`. |
There was a problem hiding this comment.
| Place this overlay in :file:`sysbuild/ipc_radio/boards/<board_target>.overlay` so that it is applied to the IPC radio image. | |
| Size ``s0_partition`` so that the network core image fits within the RAM-backed ``slot2_partition`` of :file:`nrf/modules/mcuboot/flash_sim.overlay`. | |
| Place this overlay in :file:`sysbuild/ipc_radio/boards/<board_target>.overlay` file so that it is applied to the IPC radio image. | |
| Size ``s0_partition`` so that the network core image fits within the RAM-backed ``slot2_partition`` of the :file:`nrf/modules/mcuboot/flash_sim.overlay` file. |
| ---------------------------- | ||
|
|
||
| |no_changes_yet_note| | ||
| * Updated the :ref:`Google Fast Pair integration <ug_bt_fast_pair_integration>` guide to reflect that all supported board targets use devicetree (DTS) for partition definitions. |
There was a problem hiding this comment.
| * Updated the :ref:`Google Fast Pair integration <ug_bt_fast_pair_integration>` guide to reflect that all supported board targets use devicetree (DTS) for partition definitions. | |
| * Updated the :ref:`Google Fast Pair integration guide<ug_bt_fast_pair_integration>` to reflect that all supported board targets use devicetree (DTS) for partition definitions. |
| * ``slot1_partition`` (``image-1``) for the application core secondary slot. | ||
| * ``slot3_partition`` (``image-3``) for the network core secondary slot. | ||
|
|
||
| The size of ``slot3_partition`` must match the corresponding RAM-backed ``slot2_partition`` defined in :file:`nrf/modules/mcuboot/flash_sim.overlay`, which MCUboot uses to forward the network core image during DFU. |
There was a problem hiding this comment.
| The size of ``slot3_partition`` must match the corresponding RAM-backed ``slot2_partition`` defined in :file:`nrf/modules/mcuboot/flash_sim.overlay`, which MCUboot uses to forward the network core image during DFU. | |
| The size of ``slot3_partition`` must match the corresponding RAM-backed ``slot2_partition`` defined in the :file:`nrf/modules/mcuboot/flash_sim.overlay` file, which MCUboot uses to forward the network core image during DFU. |
dchat-nordic
left a comment
There was a problem hiding this comment.
nit, otherwise lgtm
| @@ -1,18 +1,24 @@ | |||
| # | |||
| # Copyright (c) 2024-2025 Nordic Semiconductor | |||
| # Copyright (c) 2024-2026 Nordic Semiconductor | |||
There was a problem hiding this comment.
| # Copyright (c) 2024-2026 Nordic Semiconductor | |
| # Copyright (c) 2024-2026 Nordic Semiconductor ASA |
| @@ -1,10 +1,24 @@ | |||
| # | |||
| # Copyright (c) 2024-2025 Nordic Semiconductor | |||
| # Copyright (c) 2024-2026 Nordic Semiconductor | |||
There was a problem hiding this comment.
| # Copyright (c) 2024-2026 Nordic Semiconductor | |
| # Copyright (c) 2024-2026 Nordic Semiconductor ASA |
| @@ -1,11 +1,9 @@ | |||
| # | |||
| # Copyright (c) 2024 Nordic Semiconductor | |||
| # Copyright (c) 2024-2026 Nordic Semiconductor | |||
There was a problem hiding this comment.
| # Copyright (c) 2024-2026 Nordic Semiconductor | |
| # Copyright (c) 2024-2026 Nordic Semiconductor ASA |
| @@ -1,11 +1,9 @@ | |||
| # | |||
| # Copyright (c) 2024 Nordic Semiconductor | |||
| # Copyright (c) 2024-2026 Nordic Semiconductor | |||
There was a problem hiding this comment.
| # Copyright (c) 2024-2026 Nordic Semiconductor | |
| # Copyright (c) 2024-2026 Nordic Semiconductor ASA |
|
|
||
| .. |sample path| replace:: :file:`samples/bluetooth/fast_pair/locator_tag` | ||
|
|
||
| .. include:: /includes/build_and_run_ns.txt |
There was a problem hiding this comment.
We could replace this include with ".. include:: /includes/build_and_run.txt" as the PR is about removing _ns.
a0461ec to
6d3297a
Compare
|
Pure rebase, no file diff has changed. |
| # Disable image address verification as it relies on PM-specific macros for | ||
| # the network core image slot that are not available in the DTS build. | ||
| CONFIG_MCUBOOT_VERIFY_IMG_ADDRESS=n |
There was a problem hiding this comment.
please verify both CONFIG_FLASH_SIMULATOR (if it is enabled by default/what it enables now if it was needed previously) and CONFIG_MCUBOOT_VERIFY_IMG_ADDRESS=n (if it is needed)
There was a problem hiding this comment.
Regarding the FLASH_SIMULATOR Kconfig option:
nrf/sysbuild/CMakeLists.txt:L598:
if(SB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE)
set_config_bool(mcuboot CONFIG_NRF53_MULTI_IMAGE_UPDATE y)
set_config_bool(mcuboot CONFIG_BOOT_IMAGE_ACCESS_HOOKS y)
set_config_bool(mcuboot CONFIG_FLASH_SIMULATOR y)
set_config_bool(mcuboot CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES y)
set_config_bool(mcuboot CONFIG_FLASH_SIMULATOR_STATS n)
There was a problem hiding this comment.
Regarding the explicit setting of the MCUBOOT_VERIFY_IMG_ADDRESS Kconfig option:
*****************************
* Running CMake for mcuboot *
*****************************
Loading Zephyr default modules (Zephyr base).
-- Application: /home/kapi/Repos/ncs/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.21.0
-- Found Python3: /home/kapi/.pyenv/versions/3.12.4/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.12") found components: Interpreter
-- Cache files will be written to: /home/kapi/.cache/zephyr
-- Zephyr version: 4.4.0 (/home/kapi/Repos/ncs/zephyr)
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
-- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
-- Found host-tools: zephyr 1.0.1 (/opt/zephyr-sdk/zephyr-sdk-1.0.1)
-- Found toolchain: zephyr 1.0.1 (/opt/zephyr-sdk/zephyr-sdk-1.0.1)
-- Found Dtc: /opt/zephyr-sdk/zephyr-sdk-1.0.1/hosttools/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/kapi/Repos/ncs/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: /home/kapi/Repos/ncs/nrf/samples/bluetooth/fast_pair/locator_tag/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay
-- Found devicetree overlay: /home/kapi/Repos/ncs/nrf/modules/mcuboot/flash_sim_mcuboot.overlay
-- Generated zephyr.dts: /home/kapi/Repos/ncs/nrf/samples/bluetooth/fast_pair/locator_tag/build/mcuboot/zephyr/zephyr.dts
-- Generated pickled edt: /home/kapi/Repos/ncs/nrf/samples/bluetooth/fast_pair/locator_tag/build/mcuboot/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/kapi/Repos/ncs/nrf/samples/bluetooth/fast_pair/locator_tag/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
warning: Deprecated symbol MCUBOOT_VERIFY_IMG_ADDRESS is enabled.
The option is enabled by default and emits the deprecated warning. @nrfconnect/ncs-eris, you can consider improving this part.
| /delete-node/ partitions; | ||
|
|
||
| partitions { | ||
| compatible = "fixed-partitions"; |
There was a problem hiding this comment.
rerun with latest script in main which will correctly generated mapped partitions
There was a problem hiding this comment.
Sure! However, in the first step, I need to correct the main branch state:
There was a problem hiding this comment.
done, the PR is now aligned with the mapped-partition compatible and ranges syntax
| * against it: ih_img_size + ih_hdr_size must fit in slot2. | ||
| * Keep s0_partition at 222 KB to leave room for the header. | ||
| */ | ||
| s0_partition: partition@8800 { |
There was a problem hiding this comment.
Are you sure you want to start partition in the middle of the erase page? Seems that the update that would come to this would have to erase a part of provisioning too, assuming that the page boundaries will be rounded down to 0x8000.
There was a problem hiding this comment.
misconception there, page size of nrf5340 application core is is 4KiB, on nrf5340 network core it is 2KiB
There was a problem hiding this comment.
Either way, we need to keep it at 0x2800 start address to maintain backwards compatibility with the default PM configuration.
| * against it: ih_img_size + ih_hdr_size must fit in slot2. | ||
| * Keep s0_partition at 222 KB to leave room for the header. | ||
| */ | ||
| s0_partition: partition@8800 { |
There was a problem hiding this comment.
Same issue with partition start offset.
| # Enable code partitioning with DTS | ||
| CONFIG_USE_DT_CODE_PARTITION=y |
There was a problem hiding this comment.
Are you sure this is needed?
There was a problem hiding this comment.
This Kconfig option is disabled by default and needs to be explicitly enabled.
Without it, the memory footprint information for the b0n image may confuse the users:
CONFIG_USE_DT_CODE_PARTITION=y
correct
Memory region Used Size Region Size %age Used
FLASH: 8480 B 9600 B 88.33%
RAM: 3248 B 64 KB 4.96%
SRAM1: 0 B 64 KB 0.00%
IDT_LIST: 0 B 32 KB 0.00%
CONFIG_USE_DT_CODE_PARTITION=n
incorrect
Memory region Used Size Region Size %age Used
FLASH: 8480 B 256 KB 3.23%
RAM: 3248 B 64 KB 4.96%
SRAM1: 0 B 64 KB 0.00%
IDT_LIST: 0 B 32 KB 0.00%
There was a problem hiding this comment.
Generally all sysbuild images that have a claim over any memory region of the target device should have the CONFIG_USE_DT_CODE_PARTITION Kconfig option enabled.
| CONFIG_TIMEOUT_64BIT=n | ||
|
|
||
| # Enable code partitioning with DTS | ||
| CONFIG_USE_DT_CODE_PARTITION=y |
There was a problem hiding this comment.
Is this needed, seems that defult conf for netboot already sets this.
6d3297a to
763211d
Compare
|
Pure rebase |
763211d to
18c9134
Compare
|
Addressed comments from @dchat-nordic, @divipillai, @nordicjm and @peknis. I also created a new commit with the migration guide description. The new documentation covers the migration from the fixed-partitions to the mapped-partition DTS property. It is relevant for all Fast Pair samples and their supported board targets. |
| * against it: ih_img_size + ih_hdr_size must fit in slot2. | ||
| * Keep s0_partition at 222 KB to leave room for the header. | ||
| */ | ||
| s0_partition: partition@8800 { |
There was a problem hiding this comment.
misconception there, page size of nrf5340 application core is is 4KiB, on nrf5340 network core it is 2KiB
peknis
left a comment
There was a problem hiding this comment.
Approved with a minor nit.
| See the :file:`sysbuild/configuration/<board_target>/sysbuild.conf` file from the :ref:`fast_pair_locator_tag` sample as an example. | ||
|
|
||
| #. Override the external flash node in the application core overlay to define the MCUboot secondary slot partitions there. | ||
| In the nRF53 Series DFU configuration, the secondary slots reside in external QSPI flash (for example, ``mx25r64`` on the ``nrf5340dk/nrf5340/cpuapp`` board target) instead of the internal flash. |
There was a problem hiding this comment.
| In the nRF53 Series DFU configuration, the secondary slots reside in external QSPI flash (for example, ``mx25r64`` on the ``nrf5340dk/nrf5340/cpuapp`` board target) instead of the internal flash. | |
| In the nRF53 Series DFU configuration, the secondary slots reside in the external QSPI flash (for example, ``mx25r64`` on the ``nrf5340dk/nrf5340/cpuapp`` board target) instead of the internal flash. |
|
Potential fix available in the following draft PR: |
62e5076 to
8f5f02a
Compare
|
Rebased my PR to include a fix for the network core flashing procedure that had been introduced by the following PR: |
|
I am also waiting for a fix for the image verification solution that currently fails to build. The following PR seems to fix it: I would like to keep the same feature that was used with the deprecated PM solution. |
8f5f02a to
93a2c12
Compare
|
Force-pushed an amendment to the What changed: Both nRF53 MCUboot board configs ( Why: With the new DTS layout, MCUboot's auto-compute prints a CMake warning during the build ( Verified on |
93a2c12 to
1185ef7
Compare
|
Rebased my PR to include a fix for the image verification solution that had been introduced by the following PR: |
The build process is broken after the quoted PR got included. Attempted to fix it in the following PR: |
1185ef7 to
845b5c1
Compare
|
Rebase after mbedTLS upmerge (and to resolve conflicts). |
845b5c1 to
daa1a7e
Compare
|
Another rebase to include a fix from the following PR: |
daa1a7e to
f049a77
Compare
|
Force-pushed another amendment. What changed: Enabled the new address verification mechanism in the nRF53 MCUboot configs (sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf and thingy53_nrf5340_cpuapp.conf): Why: Now that nrfconnect/sdk-mcuboot#677 has landed (manifest already bumped on main), MCUboot finally derives NETCPU_APP_SLOT_OFFSET / NETCPU_APP_SLOT_END from the b0n s0_partition DTS node (via the PCD_NET_CORE_APP_ADDRESS / PCD_NET_CORE_APP_SIZE compile defs). This means address verification of the secondary slot can be re-enabled on nRF53 DTS builds — previously we had to disable it because those symbols only existed in PM builds. |
Migrated the Fast Pair Locator Tag sample on the nRF53 board targets
away from the deprecated Partition Manager static YAML files to a
DTS-based partition layout, in line with the migration style
established for the remaining board targets. Documentation updates that
go beyond the sample-local README is done in an independent commit.
The new DTS partition layout is aligned with the legacy Partition
Manager static configuration from the |NCS| v3.3.0 release so that
field-deployed devices running v3.3.0 firmware can be updated to
v3.4.0 over DFU without re-flashing.
Affected board targets:
- nrf5340dk/nrf5340/cpuapp
- thingy53/nrf5340/cpuapp
Application core changes (configuration/boards/*_cpuapp.overlay):
- Defined the full flash0 partition layout (boot_partition,
slot0_partition, bt_fast_pair_partition, storage_partition).
- Defined the mx25r64 partition layout for slot1_partition (956 KB,
matching the original PM offsets) and slot3_partition. Set
status = "okay" on the &mx25r64 node explicitly to follow the NCS
convention used by other overlays that consume mx25r64 partitions
(the node already defaults to okay through the board DTS).
- Set slot3_partition to DT_SIZE_K(256) so it matches both the
upstream RAM-backed slot2_partition in
nrf/modules/mcuboot/flash_sim.overlay that MCUboot uses to forward
the network core image and the legacy PM mcuboot_secondary_1
partition (0x40000 / 256 KB).
- Used DT_SIZE_K() consistently for partition sizes.
- Removed the per-board common dtsi files; both /ns variants and the
related dtsi includes are gone with the /ns scope removal.
Sysbuild overlays (sysbuild/{ipc_radio,b0n,mcuboot}/boards/):
- Introduced a single ipc_radio cpunet overlay that defines
b0n_partition (offset 0x0, size 0x2580), the bl_storage /
provision_partition node (offset 0x2580, size 0x280), and
s0_partition (offset 0x2800, size DT_SIZE_K(246)). The offsets
and sizes match the legacy PM b0n, provision, and app/ipc_radio
partitions, and s0_partition fits within the 256 KB RAM-backed
slot2_partition of flash_sim.overlay with room for the MCUboot
image header during DFU.
- The b0n overlay reuses the IPC radio cpunet layout via a relative
include and only sets zephyr,code-partition to b0n_partition,
avoiding any duplication of the cpunet partition map.
- The MCUboot overlays continue to include the cpuapp overlay and
point zephyr,code-partition at boot_partition.
- Enabled CONFIG_MCUBOOT_CHECK_HEADER_LOAD_ADDRESS=y for the secondary
slot address verification against the NETCPU_APP_SLOT range derived
from the b0n s0_partition DTS node. CONFIG_MCUBOOT_VERIFY_IMG_ADDRESS,
the deprecated predecessor of the option, is disabled explicitly to
suppress its auto-y default in the overwrite-only mode.
Sysbuild configuration (sysbuild/configuration/*/sysbuild.conf):
- Disabled SB_CONFIG_PARTITION_MANAGER for the nRF53 board targets.
- Kept SB_CONFIG_SECURE_BOOT_NETCORE=y and
SB_CONFIG_NETCORE_APP_UPDATE=y so that the upstream s0-partition
and flash_sim overlays apply, and aligned the layout with
SB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE.
Removed /ns scope (per updated NCSDK-38010 description):
- Deleted nrf5340dk/nrf5340/cpuapp/ns and
thingy53/nrf5340/cpuapp/ns board configs, overlays, PM static
YAMLs, sysbuild folders, and signature key files.
- Removed the matching entries from sample.yaml.
Project-wide configuration:
- Moved CONFIG_USE_DT_CODE_PARTITION=y from per-board *.conf files
to configuration/prj.conf and configuration/prj_release.conf, and
highlighted it with a leading blank line, mirroring the style of
nrf/samples/bluetooth/fast_pair/input_device/prj.conf. Now that
every supported target is on DTS partitioning, the option only
needs to be set once at the sample level. The b0n image keeps its
own CONFIG_USE_DT_CODE_PARTITION=y in sysbuild/b0n/prj.conf since
it is a separate sysbuild image.
README.rst alignment:
- Removed nrf5340dk/nrf5340/cpuapp/ns and thingy53/nrf5340/cpuapp/ns
from the DFU solution and signature algorithm tables.
- Replaced the /includes/build_and_run_ns.txt include with the
/includes/build_and_run.txt one in the Building and running section,
as no /ns variant is supported now.
Ref: NCSDK-38010
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Update the Fast Pair integration guide and the Fast Pair library documentation to reflect that the nRF53 Series DFU configuration with MCUboot is no longer the exception that requires the Partition Manager. With the nRF53 migration to devicetree (DTS) for the Fast Pair Locator Tag sample, all supported board targets now define the Fast Pair partition through DTS. Replace the manually written Partition Manager deprecation note in both pages with the shared /includes/pm_deprecation.txt include, drop the nRF53 carve-out paragraph, and align the dependency note in the integration guide to mark the Partition Manager as fully deprecated (without the nRF53-only caveat). Ref: NCSDK-38010 Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
…ation Added a Google Fast Pair section under "Libraries / Recommended changes" of the v3.4 migration guide that documents the migration of the Fast Pair sample partition overlays from the legacy fixed-partitions compatible string to the new zephyr,mapped-partition compatible string. The new section is anchored as migration_3.4_google_fast_pair so that other parts of the migration guide can reference it. The migration is generic and applies to all Fast Pair samples and board targets, but the section also highlights that it is mandatory on nRF53 Series board targets: after the recent Zephyr SoC devicetree updates that added a ranges translation to the cpunet flash node, the legacy fixed-partitions style makes the linker double-count the flash base address. Without the migration, the network core image is linked outside the valid flash range and nrfutil rejects programming. Ref: NCSDK-38010 Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
f049a77 to
cbb3301
Compare
|
Force-pushed: set The node already defaulted to |
cbb3301 to
9d5de66
Compare
|
Force-pushed to align the migration guide with the last code/configuration changes::
|
Add a Fast Pair Locator Tag sample entry to the v3.4 migration guide
that lists the unique adjustments required when migrating the nRF53
Series DFU configuration with MCUboot in the overwrite mode from the
Partition Manager to devicetree (DTS).
The new entry refers the reader to the generic Fast Pair PM-to-DTS
migration steps from the v3.3 migration guide and supplements them
with the nRF53-specific actions:
- Enable SB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE in sysbuild so
that the application core and network core images are updated
together through MCUboot.
- Override the external flash node (for example, mx25r64) in the
application core overlay to host slot1_partition (image-1) and
slot3_partition (image-3); align slot3_partition with the
RAM-backed slot2_partition from the upstream flash_sim overlay.
Note that, unlike on nRF52 and nRF54L Series targets, the internal
flash (flash0) only needs slot0_partition for MCUboot. Set
status = "okay" on the external flash node explicitly to follow
the convention used by the other |NCS| samples that consume its
partitions and to guard against any overlay that might disable the
chip before this one.
- Define the network core (flash1) partition layout (b0n_partition,
provision_partition aliased as bl_storage, and s0_partition) once
in the IPC radio sysbuild overlay.
- Add a B0N sysbuild image overlay that includes the IPC radio
cpunet overlay and chooses b0n_partition as zephyr,code-partition,
and enable CONFIG_USE_DT_CODE_PARTITION in the B0N image
configuration.
- Adjust the MCUboot sysbuild image Kconfig configuration to align
MCUboot with the DTS partition layout:
* Disable CONFIG_BOOT_MAX_IMG_SECTORS_AUTO and set
CONFIG_BOOT_MAX_IMG_SECTORS explicitly, because the
nordic,qspi-nor binding used by mx25r64 does not declare the
erase-block-size property and the MCUboot auto-compute therefore
cannot determine the slot sector count from DTS.
* Enable CONFIG_MCUBOOT_CHECK_HEADER_LOAD_ADDRESS and disable its
deprecated predecessor CONFIG_MCUBOOT_VERIFY_IMG_ADDRESS, which
otherwise auto-defaults to y in the overwrite-only mode. The
new option verifies the secondary-slot image against the load
address embedded in the image header, which is compatible with
the DTS partition layout (the expected primary-slot range is
derived from the DTS s0_partition node).
In addition, append a backwards compatibility note at the end of the
section that lists the specific partition offsets and sizes (slot3,
b0n, provision, and s0 partitions) needed to keep the new DTS layout
aligned with the legacy Partition Manager layout from |NCS| v3.3.0,
so that field-deployed devices flashed with the v3.3.0 release can
still receive DFU updates after the migration.
Ref: NCSDK-38010
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Add changelog entries for the Fast Pair Locator Tag nRF53 PM-to-DTS migration: - Bluetooth Fast Pair samples: note the migration of the nrf5340dk/nrf5340/cpuapp and thingy53/nrf5340/cpuapp board targets from the deprecated Partition Manager to the devicetree (DTS) partition layout, and the removal of the corresponding /ns board target variants from the sample. Highlight that the new DTS partition layout preserves DFU backwards compatibility with the legacy Partition Manager layout from the |NCS| v3.3.0 release. - Google Fast Pair integration: note that the integration guide no longer carries the nRF53-specific Partition Manager exception, so the Partition Manager is fully deprecated for the supported Fast Pair project configurations. Ref: NCSDK-38010 Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
9d5de66 to
408d862
Compare
|
Force pushed to clarify the misleading content |
|
Heads-up on a sysbuild signing gap that affects the image address verification enabled in this PR. The verification works for the cpunet image but not for the application imageThis PR sets I tested the SMP/MCUmgr DFU flow on the nRF5340 DK with three v10.2.99 packages built from this branch:
1. Application image is signed with Not specific to a single "bad" package - it is true for every legitimate build of this sample. The NCS sysbuild signing script ( The cpunet image is unaffected because 2. MCUboot's cpunet check is range membership, not equality to slot start. The wrong-radio package was signed with Fix in flightsdk-nrf#29021 -
With #29021 applied, the signed application image now carries A matching upstream Zephyr change in No changes needed in this PR; once #29021 lands the verification enabled here will work for both legitimate application updates and rejection of mis-targeted ones. |
Summary
Migrate the Fast Pair Locator Tag sample on the nRF53 Series board targets (
nrf5340dk/nrf5340/cpuappandthingy53/nrf5340/cpuapp) from the deprecated Partition Manager (PM) static YAML configuration to a devicetree (DTS) partition layout, following the migration style established by NCSDK-37587 and NCSDK-37790. With this change, all board targets supported by the sample now define partitions through DTS, and the Partition Manager no longer carries any Fast Pair-specific exception.The PR is split into four commits:
samples: bluetooth: fast_pair: locator_tag: migrate nRF53 to DTS partitioningpm_static.ymlfiles with DTS overlays for both nRF5340 DK and Thingy:53.flash0(boot_partition,slot0_partition,bt_fast_pair_partition,storage_partition) and the secondary slots on the externalmx25r64(slot1_partitionfor the application core,slot3_partitionaligned with the upstreamflash_simslot2_partitionfor the network core).flash1once in a sysbuild overlay shared by the IPC radio image (b0n_partition,provision_partitionaliased asbl_storage,s0_partition).b0n_partitionaszephyr,code-partition. The MCUboot image overlay similarly reuses the application core overlay and selectsboot_partition.DT_SIZE_K()consistently for partition sizes.SB_CONFIG_PARTITION_MANAGER=n, keepSB_CONFIG_SECURE_BOOT_NETCORE=yandSB_CONFIG_NETCORE_APP_UPDATE=y, and align withSB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE=y. In the MCUboot image, disableCONFIG_MCUBOOT_VERIFY_IMG_ADDRESS(depends on PM-only macros for the network core slot) and drop the Direct XIP-onlysecondary_app_partition: &slot1_partition {}alias.nrf5340dk/nrf5340/cpuapp/nsandthingy53/nrf5340/cpuapp/nsboard targets per the updated NCSDK-38010 description (board configs, overlays, PM YAMLs, sysbuild folders, signature key files, andsample.yamlentries).CONFIG_USE_DT_CODE_PARTITION=yfrom per-board*.conffiles toconfiguration/prj.confandconfiguration/prj_release.conf(matching theinput_devicesample style). Theb0nimage keeps its ownCONFIG_USE_DT_CODE_PARTITION=yinsysbuild/b0n/prj.conf.README.rstto drop the_nsrows from the DFU and signature algorithm tables and thebuild_and_run_ns.txtinclude.doc: bt_fast_pair: drop nRF53 Partition Manager exception/includes/pm_deprecation.txtinclude and drop the nRF53-only carve-out paragraph.doc: migration guide: add Fast Pair nRF53 PM to DTS migration stepsmigration_guide_3.4.rstthat lists the unique nRF53 adjustments on top of the generic Fast Pair PM-to-DTS steps frommigration_guide_3.3.rst: enablingSB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE, the external flash node override (with theflash0-only-slot0_partitionnote relative to nRF52/nRF54L), the network core (flash1) layout, the new B0N sysbuild image overlay (withCONFIG_USE_DT_CODE_PARTITION=y), and disablingCONFIG_MCUBOOT_VERIFY_IMG_ADDRESSin the MCUboot image.doc: release notes: add Fast Pair nRF53 PM deprecation changelog entries_nsremoval under Bluetooth Fast Pair samples.Verified on
nrf5340dk/nrf5340/cpuapplocator_tagFLASH used 231584 / 978560 B (matchesslot0_partition956 KB).b0nFLASH used 8524 / 34176 B.ipc_radioFLASH used 136512 / 246 KB.west flash --recover, MCUboot validates slot 0 withBOOT_VALIDATE_SLOT0enabled, B0N validates and chainloadsipc_radio, BT HCI IPC binds, and the sample reaches Sample has started with active Fast Pair advertising.Ref: NCSDK-38010
Test plan
nrf5340dk/nrf5340/cpuapp(debug + release).thingy53/nrf5340/cpuapp(debug + release).prj.conf/prj_release.confmove ofCONFIG_USE_DT_CODE_PARTITION).west flash --recoveronnrf5340dk/nrf5340/cpuapp, confirm MCUboot + B0N chainload, IPC radio start, and Fast Pair advertising / pairing.