How to migrate from Partition Manager to DTS with NSIB (b0) + MCUboot + TF-M on nRF54L15 / nRF54LM20B?

Hello,

I am trying to migrate my project from Partition Manager to devicetree-based partitioning following the NCS v3.3.0 migration guide, but I am running into issues with the NSIB (b0) image configuration.

Project configuration:

  • Boards: nrf54l15dk/nrf54l15/cpuapp/ns and nrf54lm20dk/nrf54lm20b/cpuapp/ns
  • NCS version: v3.3.0
  • Boot chain: NSIB (b0) → MCUboot (s0/s1 slots with swap-using-move) → TF-M + NS application
  • ED25519 signatures with KMU key storage
  • OTA/FOTA via SMP/MCUmgr over BLE NUS

Current sysbuild.conf:

SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_PM_MCUBOOT_PAD=0x800
SB_CONFIG_MCUBOOT_MODE_SWAP_USING_MOVE=y
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="${APP_DIR}/keys/mcuboot_private.pem"
SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y
SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU=y
SB_CONFIG_MCUBOOT_GENERATE_DEFAULT_KMU_KEYFILE=y
SB_CONFIG_SECURE_BOOT_APPCORE=y
SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE="${APP_DIR}/keys/nsib_private.pem"
SB_CONFIG_SECURE_BOOT_GENERATE_DEFAULT_KMU_KEYFILE=y
SB_CONFIG_SECURE_BOOT_BOOTCONF_LOCK_WRITES=n

What I tried:

I ran pm_to_dts.py to generate overlay files, added SB_CONFIG_PARTITION_MANAGER=n, and the build succeeds. However, the application does not run after flashing.

The root cause I identified: b0 links to the wrong address unless I explicitly add a sysbuild/b0/boards/ overlay with:

/ {
    chosen {
        zephyr,code-partition = &b0_partition;
    };
};

Without this, b0's zephyr,code-partition defaults to &slot0_partition from the board DTS, causing b0 to link at the wrong address.

I also had to create sysbuild/b0/prj.conf manually, and samples/bootloader/socs/nrf54lm20b_cpuapp.conf was missing from NCS (only nrf54lm20a_cpuapp.conf exists).

Questions:

  1. Is there an official example or recommended way to migrate a project with NSIB + MCUboot + TF-M to DTS partitioning on nRF54L15 / nRF54LM20B?

  2. What is the correct sysbuild/b0/ directory structure needed for DTS-based builds? Should sysbuild/b0/boards/<board>.overlay with zephyr,code-partition = &b0_partition always be required?

  3. Is nrf54lm20b_cpuapp.conf missing intentionally from samples/bootloader/socs/, or is this a bug?

  4. Are there any NCS samples that demonstrate the full NSIB + MCUboot + TF-M + DTS combination for nRF54L series?

Thank you.

Related