[NCS 2.7.0] Sysbuild + MCUBOOT. Including out of tree driver with MCUBOOT sysbuild?

I am currently migrating from ncs 2.5.0 to 2.7.0 and am trying to move to using sysbuild instead of child / parent image. I have an out of tree flash driver that currently gets built and configured as part of the mcuboot child image build.

So far, organising the configs and overlays for mcuboot and my app is pretty straightforward (they are organized under sysbuild/), but when I try to enable my out of tree flash driver in sysbuild/mcuboot/boards/[board].conf it says my config symbols are undefined.

In the child / parent image set up we simple did something like this in app/CMakeLists.txt

list(append zephyr_extra_modules ${cmake_current_list_dir}/../drivers/flash/my_out_of_tree_driver/)

this doesn't seem to work. neither does adding another CMakeLists.txt file in the sysbuild/mcuboot directory. What's the best way to let the mcuboot sysbuild know about the location of my driver?

  • i was able to find a simpler solution by adding sylinks to my boards dts/bindings folder. sysbuild looks in the application folder and the board folder for DTS files by default

  • Hi. Thanks for sharing this problem and solution. I too needed sysbuild to include out of tree drivers for MCUBOOT.

    I followed your approach and set the mcuboot_EXTRA_ZEPHYR_MODULES to point to my drivers folder in my sysbuild.cmake and it works! So thanks for sharing. 

    However I don't know if this can help your situation: I don't need to set the dts_root because I structure my out of tree "drivers" folder to follow zephyr's module structure (which includes a Zephyr folder containing module.yaml). That points the dts_root to the same folder, along with the start of my KConfig chain. My out of tree dts reside along side my drivers. Additionally, whole folder is a git  submodule which I can pull in other projects. You then don't need to worry about creating symlinks for each project. 

    Hope that helps! 

    Dom

Related