Trying to use MCUBoot for FOTA under SDK 2.8 and build system doesn't see sysbuild.conf afai can tell

I'm running SDK 2.8 and 2.8 Toolchain. I created the sysbuild.conf setting:

SB_CONFIG_BOOTLOADER_MCUBOOT=y

and put it in the application folder (per this support request:  RE: Issue with MCUBOOT enabling) and it wasn't recognized. I got the error "was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: BOOTLOADER_MCUBOOT (=n)".

I then read another post where the reply stated that I should put the sysbuild.conf in the build folder. So I tried that, and also tried in the subfolder under build with the project name ("l8_e3"). All resulted in the same error - BOOTLOADER_MCUBOOT dependency is not set to y. I tried checking the documentation at the links provided above https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding_sysbuild.html, but it is not clear about the location of sysbuild.conf, just that it needs to be created.

Just to make this clear to others traveling this path who tried to use the intermediate academy exercise (ncs-inter\v2.6.2-v2.5.2\l8\l8_e3) and found that 2.8 is not yet supported, could you lay out exactly what and where changes must be made to upgrade that sample to 2.8?

Thanks for any input! Appreciate this forum so much!
Parents
  • Hi Robb, 

    To build MCUboot with a Zephyr or nRF Connect SDK sample, enable the SB_CONFIG_BOOTLOADER_MCUBOOT in the application’s sysbuild.conf file or using the command line:

    west build -b nrf52840dk/nrf52840 zephyr/samples/hello_world -- -DSB_CONFIG_BOOTLOADER_MCUBOOT=y

    See Configuring and building for information on how to set the required configuration options temporarily or permanently. Like other images, you can assign image-specific configurations at build time to further customize the bootloader’s functionality. For details, see Sysbuild (System build) documentation in Zephyr. Here is an example used by a sample.

    Regards,
    Amanda H.

  • Hi Amanda,

    Thanks for the reply.

    This is the setting I have been using on the l8_e3 code sample from the academy intermediate course. Using this sample I had a build environment in 2.6.1 and successfully got FOTA working. I then removed the build and created a new one using 2.8.0 and added a sysbuild.conf file and put the setting SB_CONFIG_BOOTLOADER_MCUBOOT=y in there. The above is the result of doing that. Is there some residual issue with changing build SDK and toolchain? Everywhere I have read on the forums says it should just work but it is not working for me.

    I also tried adding a sysbuild.conf file to the hello_world sample. This went further than I got previously, as MCUBoot is recognized as included, but no app_update.bin is generated.

    The result is:

    * Executing task: nRF Connect: Build: hello_world_withMCUBoot/build

    ... Wouldn't let me include the entire output

    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/git/nordic/samples/hello_world_withMCUBoot/build/hello_world_withMCUBoot
    [135/135] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 21828 B 499200 B 4.37%
    RAM: 7680 B 256 KB 2.93%
    IDT_LIST: 0 GB 32 KB 0.00%
    Generating files from C:/git/nordic/samples/hello_world_withMCUBoot/build/hello_world_withMCUBoot/zephyr/zephyr.elf for board: nrf52840dk
    image.py: sign the payload
    image.py: sign the payload
    [6/191] Generating include/generated/zephyr/version.h
    -- Zephyr version: 3.7.99 (C:/ncs/v2.8.0/zephyr), build: v3.7.99-ncs1
    [191/191] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 32326 B 48 KB 65.77%
    RAM: 17728 B 256 KB 6.76%
    IDT_LIST: 0 GB 32 KB 0.00%
    Generating files from C:/git/nordic/samples/hello_world_withMCUBoot/build/mcuboot/zephyr/zephyr.elf for board: nrf52840dk
    [15/15] Generating ../merged.hex
    * Terminal will be reused by tasks, press any key to close it.

    So no app_update.bin...

    I am running the build from VS Code, as I have not yet used the west CLI.

    Again, appreciate your help!

  • Hi,

    robbsadler said:
    Is there some residual issue with changing build SDK and toolchain? Everywhere I have read on the forums says it should just work but it is not working for me.

    Not sure what caused the issue, but it seems you can enable SB_CONFIG_BOOTLOADER_MCUBOOT without issue later. Maybe try to delete the build folder and restart VS Code for the NCS v2.8.0 environment. 

    robbsadler said:
    This went further than I got previously, as MCUBoot is recognized as included, but no app_update.bin is generated.

    zephyr/app_update.bin is changed to <app_name>/zephyr/<kernel_name>.signed.bin where <kernel_name> is the application’s Kconfig CONFIG_KERNEL_BIN_NAME value. 

    Some filenames are changed in the sysbuild. See Filename changes.

    I would suggest you also take a look at the Migrating from multi-image builds to sysbuild doc.

    -Amanda H. 

Reply
  • Hi,

    robbsadler said:
    Is there some residual issue with changing build SDK and toolchain? Everywhere I have read on the forums says it should just work but it is not working for me.

    Not sure what caused the issue, but it seems you can enable SB_CONFIG_BOOTLOADER_MCUBOOT without issue later. Maybe try to delete the build folder and restart VS Code for the NCS v2.8.0 environment. 

    robbsadler said:
    This went further than I got previously, as MCUBoot is recognized as included, but no app_update.bin is generated.

    zephyr/app_update.bin is changed to <app_name>/zephyr/<kernel_name>.signed.bin where <kernel_name> is the application’s Kconfig CONFIG_KERNEL_BIN_NAME value. 

    Some filenames are changed in the sysbuild. See Filename changes.

    I would suggest you also take a look at the Migrating from multi-image builds to sysbuild doc.

    -Amanda H. 

Children
No Data
Related