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:
parent
fd526cc4b2
commit
1561a0705f
14
doc/build/snippets/writing.rst
vendored
14
doc/build/snippets/writing.rst
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}')
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
name: bar
|
||||
append:
|
||||
DTC_OVERLAY_FILE: bar.overlay
|
||||
EXTRA_DTC_OVERLAY_FILE: bar.overlay
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
name: foo
|
||||
append:
|
||||
OVERLAY_CONFIG: foo.conf
|
||||
EXTRA_CONF_FILE: foo.conf
|
||||
|
|
Loading…
Reference in a new issue