Topics

Zephyr module and build settings. (BOARD, SOC, DTS, and ARCH root support)


Rasmussen, Torsten
 

Hi,

 

Zephyr modules has been extended to support multiple BOARD_ROOT, SOC_ROOT, DTS_ROOT, and ARCH_ROOT on command line.

Also Zephyr modules `module.yml` schema has been extended to allow modules to describe those roots as build settings.

 

For example:

build:

  settings:

    board_root: .

    dts_root: .

    soc_root: .

    arch_root: .

 

See more here: https://docs.zephyrproject.org/latest/guides/modules.html#build-settings

 

As part of this, the `SOC_DIR` in Kconfig files has been removed, and any Kconfig code relying on `SOC_DIR` must be updated, for example to use `rsource`.

If your code is currently having a Kconfig in `<my_soc_root>/<arch>/Kconfig` sourcing other files based on `SOC_DIR`:

 

<my_soc_root>/<arch>/Kconfig:

source $(SOC_DIR)/$(ARCH)/Kconfig.soc

 

then such code can be updated to:

rsource Kconfig.soc

 

For more details, see release notes and relevant PRs:

https://github.com/zephyrproject-rtos/zephyr/blob/master/doc/releases/release-notes-2.4.rst#build-and-infrastructure

https://github.com/zephyrproject-rtos/zephyr/pull/26715

https://github.com/zephyrproject-rtos/zephyr/pull/27431

 

 

Torsten Tejlmand Rasmussen

Senior R&D Engineer

P: +47 72 89 92 47

 

 

 

Nordic Semiconductor

Otto Nielsens veg 12, 7052 Trondheim, Norway

www.nordicsemi.com