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
|
name: foo
|
||||||
append:
|
append:
|
||||||
DTC_OVERLAY_FILE: foo.overlay
|
EXTRA_DTC_OVERLAY_FILE: foo.overlay
|
||||||
OVERLAY_CONFIG: foo.conf
|
EXTRA_CONF_FILE: foo.conf
|
||||||
|
|
||||||
Namespacing
|
Namespacing
|
||||||
***********
|
***********
|
||||||
|
@ -113,7 +113,7 @@ This :file:`snippet.yml` adds :file:`foo.overlay` to the build:
|
||||||
|
|
||||||
name: foo
|
name: foo
|
||||||
append:
|
append:
|
||||||
DTC_OVERLAY_FILE: foo.overlay
|
EXTRA_DTC_OVERLAY_FILE: foo.overlay
|
||||||
|
|
||||||
The path to :file:`foo.overlay` is relative to the directory containing
|
The path to :file:`foo.overlay` is relative to the directory containing
|
||||||
:file:`snippet.yml`.
|
:file:`snippet.yml`.
|
||||||
|
@ -129,7 +129,7 @@ This :file:`snippet.yml` adds :file:`foo.conf` to the build:
|
||||||
|
|
||||||
name: foo
|
name: foo
|
||||||
append:
|
append:
|
||||||
OVERLAY_CONFIG: foo.conf
|
EXTRA_CONF_FILE: foo.conf
|
||||||
|
|
||||||
The path to :file:`foo.conf` is relative to the directory containing
|
The path to :file:`foo.conf` is relative to the directory containing
|
||||||
:file:`snippet.yml`.
|
:file:`snippet.yml`.
|
||||||
|
@ -154,10 +154,10 @@ By name
|
||||||
boards:
|
boards:
|
||||||
bar: # settings for board "bar" go here
|
bar: # settings for board "bar" go here
|
||||||
append:
|
append:
|
||||||
DTC_OVERLAY_FILE: bar.overlay
|
EXTRA_DTC_OVERLAY_FILE: bar.overlay
|
||||||
baz: # settings for board "baz" go here
|
baz: # settings for board "baz" go here
|
||||||
append:
|
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
|
The above example uses :file:`bar.overlay` when building for board ``bar``, and
|
||||||
:file:`baz.overlay` when building for ``baz``.
|
:file:`baz.overlay` when building for ``baz``.
|
||||||
|
@ -180,7 +180,7 @@ For example:
|
||||||
boards:
|
boards:
|
||||||
/my_vendor_.*/:
|
/my_vendor_.*/:
|
||||||
append:
|
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
|
The above example uses devicetree overlay :file:`my_vendor.overlay` when
|
||||||
building for either board ``my_vendor_board1`` or ``my_vendor_board2``. It
|
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.
|
# See uses under 'append:' keys below.
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
DTC_OVERLAY_FILE:
|
EXTRA_DTC_OVERLAY_FILE:
|
||||||
type: str
|
type: str
|
||||||
OVERLAY_CONFIG:
|
EXTRA_CONF_FILE:
|
||||||
type: str
|
type: str
|
||||||
|
|
||||||
type: map
|
type: map
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Snippet:
|
||||||
'''Process the data in a snippet.yml file, after it is loaded into a
|
'''Process the data in a snippet.yml file, after it is loaded into a
|
||||||
python object and validated by pykwalify.'''
|
python object and validated by pykwalify.'''
|
||||||
def append_value(variable, value):
|
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
|
path = pathobj.parent / value
|
||||||
if not path.is_file():
|
if not path.is_file():
|
||||||
_err(f'snippet file {pathobj}: {variable}: file not found: {path}')
|
_err(f'snippet file {pathobj}: {variable}: file not found: {path}')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: cdc-acm-console
|
name: cdc-acm-console
|
||||||
append:
|
append:
|
||||||
OVERLAY_CONFIG: cdc-acm-console.conf
|
EXTRA_CONF_FILE: cdc-acm-console.conf
|
||||||
DTC_OVERLAY_FILE: cdc-acm-console.overlay
|
EXTRA_DTC_OVERLAY_FILE: cdc-acm-console.overlay
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name: bar
|
name: bar
|
||||||
append:
|
append:
|
||||||
DTC_OVERLAY_FILE: bar.overlay
|
EXTRA_DTC_OVERLAY_FILE: bar.overlay
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name: foo
|
name: foo
|
||||||
append:
|
append:
|
||||||
OVERLAY_CONFIG: foo.conf
|
EXTRA_CONF_FILE: foo.conf
|
||||||
|
|
Loading…
Reference in a new issue