snippets: support for EXTRA_DTC_OVERLAY_FILE and EXTRA_CONF_FILE

This commit adds change snippets to use the new EXTRA_DTC_OVERLAY_FILE
and EXTRA_CONF_FILE Zephyr build system variables instead of
DTC_OVERLAY_FILE and OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2023-05-24 12:34:34 +02:00 committed by Fabio Baltieri
parent fd526cc4b2
commit 1561a0705f
6 changed files with 14 additions and 14 deletions

View file

@ -28,8 +28,8 @@ this:
name: foo
append:
DTC_OVERLAY_FILE: foo.overlay
OVERLAY_CONFIG: foo.conf
EXTRA_DTC_OVERLAY_FILE: foo.overlay
EXTRA_CONF_FILE: foo.conf
Namespacing
***********
@ -113,7 +113,7 @@ This :file:`snippet.yml` adds :file:`foo.overlay` to the build:
name: foo
append:
DTC_OVERLAY_FILE: foo.overlay
EXTRA_DTC_OVERLAY_FILE: foo.overlay
The path to :file:`foo.overlay` is relative to the directory containing
:file:`snippet.yml`.
@ -129,7 +129,7 @@ This :file:`snippet.yml` adds :file:`foo.conf` to the build:
name: foo
append:
OVERLAY_CONFIG: foo.conf
EXTRA_CONF_FILE: foo.conf
The path to :file:`foo.conf` is relative to the directory containing
:file:`snippet.yml`.
@ -154,10 +154,10 @@ By name
boards:
bar: # settings for board "bar" go here
append:
DTC_OVERLAY_FILE: bar.overlay
EXTRA_DTC_OVERLAY_FILE: bar.overlay
baz: # settings for board "baz" go here
append:
DTC_OVERLAY_FILE: baz.overlay
EXTRA_DTC_OVERLAY_FILE: baz.overlay
The above example uses :file:`bar.overlay` when building for board ``bar``, and
:file:`baz.overlay` when building for ``baz``.
@ -180,7 +180,7 @@ For example:
boards:
/my_vendor_.*/:
append:
DTC_OVERLAY_FILE: my_vendor.overlay
EXTRA_DTC_OVERLAY_FILE: my_vendor.overlay
The above example uses devicetree overlay :file:`my_vendor.overlay` when
building for either board ``my_vendor_board1`` or ``my_vendor_board2``. It

View file

@ -9,9 +9,9 @@ schema;append-schema:
# See uses under 'append:' keys below.
type: map
mapping:
DTC_OVERLAY_FILE:
EXTRA_DTC_OVERLAY_FILE:
type: str
OVERLAY_CONFIG:
EXTRA_CONF_FILE:
type: str
type: map

View file

@ -52,7 +52,7 @@ class Snippet:
'''Process the data in a snippet.yml file, after it is loaded into a
python object and validated by pykwalify.'''
def append_value(variable, value):
if variable in ('DTC_OVERLAY_FILE', 'OVERLAY_CONFIG'):
if variable in ('EXTRA_DTC_OVERLAY_FILE', 'EXTRA_CONF_FILE'):
path = pathobj.parent / value
if not path.is_file():
_err(f'snippet file {pathobj}: {variable}: file not found: {path}')

View file

@ -1,4 +1,4 @@
name: cdc-acm-console
append:
OVERLAY_CONFIG: cdc-acm-console.conf
DTC_OVERLAY_FILE: cdc-acm-console.overlay
EXTRA_CONF_FILE: cdc-acm-console.conf
EXTRA_DTC_OVERLAY_FILE: cdc-acm-console.overlay

View file

@ -1,3 +1,3 @@
name: bar
append:
DTC_OVERLAY_FILE: bar.overlay
EXTRA_DTC_OVERLAY_FILE: bar.overlay

View file

@ -1,3 +1,3 @@
name: foo
append:
OVERLAY_CONFIG: foo.conf
EXTRA_CONF_FILE: foo.conf