Update issue with bootloader chain

Hi everyone, I'm trying to set up a bootloader chain using sysbuild (NSIB → MCUboot → APP) so that MCUboot can act as an upgradable bootloader. I'm working with the nRF54L15 and followed the guides:
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding_sysbuild.html
https://docs.nordicsemi.com/bundle/ncs-3.0.1/page/nrf/applications/nrf_desktop/bootloader_dfu.html
With the firmware flashed, the full boot chain works fine. However, when I attempt to update the application using dfu_application.zip via the nRF Connect Device Manager, after the upload and test, the device reboots, but MCUboot can't find a bootable image.

Here's the relevant log output before and after the DFU update:

00> Booting nRF Connect SDK v3.0.1-9eb5615da66b

00> Using Zephyr OS v4.0.99-77f865b8f8d0

00> Fprotect disabled. No protection applied.

00> Attempting to boot slot 0.

00> Attempting to boot from address 0x10800.

00> I: Trying to get Firmware version

00> I: Firmware signature verified.

00> Firmware version 1

00> I: Setting monotonic counter (version: 1, slot: 0)

00> Booting (0x10800).

00> Booting MCUboot v2.1.0-dev-ae1ee57f3906

00> Using nRF Connect SDK v3.0.1-9eb5615da66b

00> Using Zephyr OS v4.0.99-77f865b8f8d0

00> I: Starting Direct-XIP bootloader

00> I: Primary slot: version=0.2.1+0

00> I: Secondary slot: version=0.2.1+0

00> I: Image 1 Primary slot: Image not found

00> I: Secondary slot: version=0.2.1+0

00> I: Image 0 loaded from the primary slot

00> I: Image 1 loaded from the secondary slot

00> I: Bootloader chainload address offset: 0x2b000

00> I: Image version: v0.2.1

00> I: Jumping to the image slot

00> Booting My Application v0.2.1-475bc1ecb46c

00> Using nRF Connect SDK v3.0.1-9eb5615da66b

00> Using Zephyr OS v4.0.99-77f865b8f8d0

(Connection lost)

00> Booting nRF Connect SDK v3.0.1-9eb5615da66b

00> Using Zephyr OS v4.0.99-77f865b8f8d0

00> Fprotect disabled. No protection applied.

00> Attempting to boot slot 0.

00> Attempting to boot from address 0x10800.

00> I: Trying to get Firmware version

00> I: Firmware signature verified.

00> Firmware version 1

00> Booting (0x10800).

00> Booting MCUboot v2.1.0-dev-ae1ee57f3906

00> Using nRF Connect SDK v3.0.1-9eb5615da66b

00> Using Zephyr OS v4.0.99-77f865b8f8d0

00> I: Starting Direct-XIP bootloader

00> I: Primary slot: version=0.2.1+0

00> I: Secondary slot: version=0.2.2+0

00> I: Image 1 Primary slot: Image not found

00> I: Secondary slot: version=0.2.2+0

00> I: No slot to load for image 1

00> E: Unable to find bootable image

Parents
  • Hello,

    Sorry for the delayed response. Andreas will be away for some time, so I’ll be looking into this issue in the meantime.

    Could you share a minimal project that I can run locally to reproduce the issue? I’m asking because I don’t see any specific problem or not sure why it is failing and may need to check internally.

    Also, I believe the smp_svr_mini_boot sample aligns with your use case, is that correct?

    Kind Regards,

    Abhijith

Reply
  • Hello,

    Sorry for the delayed response. Andreas will be away for some time, so I’ll be looking into this issue in the meantime.

    Could you share a minimal project that I can run locally to reproduce the issue? I’m asking because I don’t see any specific problem or not sure why it is failing and may need to check internally.

    Also, I believe the smp_svr_mini_boot sample aligns with your use case, is that correct?

    Kind Regards,

    Abhijith

Children
  • Hi,

    Also, I believe the smp_svr_mini_boot sample aligns with your use case, is that correct?

    You're correct that the smp_svr_mini_boot sample aligns in some ways, but my issue specifically relates to migrating to a two-stage bootloader setupnot the single-stage Direct-XIP configuration used in that sample.

    The issue started after enabling the following sysbuild configuration flags:

    SB_CONFIG_SECURE_BOOT_APPCORE=y
    SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE="${ZEPHYR_BASE}/../m_band/ota/keys/secure_boot_ed25519_priv_key.pem"
    SB_CONFIG_MCUBOOT_UPDATEABLE_IMAGES=1
    SB_CONFIG_MCUBOOT_APP_SYNC_UPDATEABLE_IMAGES=y
    


    Also, to help isolate the problem, I tried running the smp_svr_mini_boot sample using SDK 3.1.0-preview4, but encountered the following error:

    /home/tcunha/zp/zephyr/scripts/kconfig/kconfig.py: /home/tcunha/zp/nrf/soc/nordic/nrf71/Kconfig.defconfig:33: error: couldn't parse 'default $(dt_nodelabel_int_prop,grtc,clock-frequency) if NRF_GRTC_TIMER': macro expanded to blank string
    CMake Error at /home/tcunha/zp/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    


  • Hello,

    Sorry for getting back to you a bit late. It's summer vacation here in Norway, and many are on vacation, which creates some delay in getting back to the issue.

    Tcunha said:
    Also, to help isolate the problem, I tried running the smp_svr_mini_boot sample using SDK 3.1.0-preview4, but encountered the following error:

    It's not recommended to try this version of the SDK, as it is not a stable release. I recommend using version 3.0.2, as it is the latest stable release.

    Kind Regards,

    Abhijith

  • Hi,

    Thanks for the reply, totally understand about the summer holidays.

    I get your point about using a stable SDK, but it looks like the smp_svr_mini_boot sample isn’t available in version 3.0.2. That’s why I tried it with 3.1.0-preview4 to isolate the issue.

    Is there an alternative sample you’d recommend?

  • Hi again, 

    I've picked up this case again since I stumbled across it when working on a similar issue. I believe what is wrong here is the keys you're using to sign the image with. In the original description it looks like MCUboot rejects the new app image in the update because it can not verify it. This is reflected in 

    00> I: No slot to load for image 1
    
    00> E: Unable to find bootable image

    This sample is a bit different from what you want, but I believe you can dissect out what you don't want and add. The readme should also be sufficient w.r.t description of signing both NSIB and MCUBoot with the keys that you need to add at what step etc

    My sample Your project
    NSIB White check mark White check mark
    MCUboot White check mark White check mark
    BLE FOTA White check mark White check mark
    SPI External flash White check mark X
    Direct-XIP X White check mark
    Static partitioning White check mark White check mark
    KMU White check mark White check mark
    Custom private keys White check mark White check mark

    Please let me know if this is helpful. I may spend some time next week attempting to make a version that does not use SPI for external flash and uses direct-xip, but I can't give any guarantees that I have time available for said project since I belive this sample should get you there.

    8_54l15_chain_fota_ext.zip

    Kind regards,
    Andreas

  • Hi Andreas,

    Thanks for following up, and sorry for the late reply.
    I don’t think the issue is related to image verification. If that were the case, the logs would explicitly show a verification failure, and I wouldn’t be able to boot into the application after flashing. In my case, I can boot into the app just fine.

    I used your sample as a baseline and then added Direct-XIP and my pm_static setup that i previously provided, but I still ran into the same issue. The app boots fine after the initial flash, and I can see two images available. But after the upload of an updated image, I get the error that no bootable image can be found


    1425.8_54l15_chain_fota_ext.zip

Related