Apply dts board_variant.overlay specific to mcuboot instead of generic one from board root.

NCS 2.7, nrf52840, sysbuild with mcuboot

2 applications: manufacturing and customer

3 board variants implemented through revisions in boards.yml.  Board revisions enable additional components and configuration which will be used in the application but should not be included into mcuboot.  The two applications use common overlays from the board root directory.

I am having problems because devicetree is taking the board directory overlay instead of the more specific one in sysbuild/mcuboot/boards/.   As I understand it the philosophy is that the most specific file should be used, which in this case would be the sysbuild/mcuboot/boards directory, however devicetree processing uses the overlays from the board directory instead of the mcuboot specific version.  The mcuboot overlay needs to disable or not define the components are that application specific.

Any recommendations for how to structure my directories and builds to avoid duplicating files in many places, which tends to lead to errors when a file is changed in one place but not all other places.

Related