Skip to content

Commit b02e3cc

Browse files
tejlmandde-nordic
authored andcommitted
[nrf fromtree] 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 <[email protected]> (cherry picked from commit 1561a07) (cherry picked from commit d683f25)
1 parent d94f71a commit b02e3cc

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

doc/build/snippets/writing.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ this:
2828
2929
name: foo
3030
append:
31-
DTC_OVERLAY_FILE: foo.overlay
32-
OVERLAY_CONFIG: foo.conf
31+
EXTRA_DTC_OVERLAY_FILE: foo.overlay
32+
EXTRA_CONF_FILE: foo.conf
3333
3434
Namespacing
3535
***********
@@ -113,7 +113,7 @@ This :file:`snippet.yml` adds :file:`foo.overlay` to the build:
113113
114114
name: foo
115115
append:
116-
DTC_OVERLAY_FILE: foo.overlay
116+
EXTRA_DTC_OVERLAY_FILE: foo.overlay
117117
118118
The path to :file:`foo.overlay` is relative to the directory containing
119119
:file:`snippet.yml`.
@@ -129,7 +129,7 @@ This :file:`snippet.yml` adds :file:`foo.conf` to the build:
129129
130130
name: foo
131131
append:
132-
OVERLAY_CONFIG: foo.conf
132+
EXTRA_CONF_FILE: foo.conf
133133
134134
The path to :file:`foo.conf` is relative to the directory containing
135135
:file:`snippet.yml`.
@@ -154,10 +154,10 @@ By name
154154
boards:
155155
bar: # settings for board "bar" go here
156156
append:
157-
DTC_OVERLAY_FILE: bar.overlay
157+
EXTRA_DTC_OVERLAY_FILE: bar.overlay
158158
baz: # settings for board "baz" go here
159159
append:
160-
DTC_OVERLAY_FILE: baz.overlay
160+
EXTRA_DTC_OVERLAY_FILE: baz.overlay
161161
162162
The above example uses :file:`bar.overlay` when building for board ``bar``, and
163163
:file:`baz.overlay` when building for ``baz``.
@@ -180,7 +180,7 @@ For example:
180180
boards:
181181
/my_vendor_.*/:
182182
append:
183-
DTC_OVERLAY_FILE: my_vendor.overlay
183+
EXTRA_DTC_OVERLAY_FILE: my_vendor.overlay
184184
185185
The above example uses devicetree overlay :file:`my_vendor.overlay` when
186186
building for either board ``my_vendor_board1`` or ``my_vendor_board2``. It

scripts/schemas/snippet-schema.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ schema;append-schema:
99
# See uses under 'append:' keys below.
1010
type: map
1111
mapping:
12-
DTC_OVERLAY_FILE:
12+
EXTRA_DTC_OVERLAY_FILE:
1313
type: str
14-
OVERLAY_CONFIG:
14+
EXTRA_CONF_FILE:
1515
type: str
1616

1717
type: map

scripts/snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def process_data(self, pathobj: Path, snippet_data: dict):
5252
'''Process the data in a snippet.yml file, after it is loaded into a
5353
python object and validated by pykwalify.'''
5454
def append_value(variable, value):
55-
if variable in ('DTC_OVERLAY_FILE', 'OVERLAY_CONFIG'):
55+
if variable in ('EXTRA_DTC_OVERLAY_FILE', 'EXTRA_CONF_FILE'):
5656
path = pathobj.parent / value
5757
if not path.is_file():
5858
_err(f'snippet file {pathobj}: {variable}: file not found: {path}')

snippets/cdc-acm-console/snippet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: cdc-acm-console
22
append:
3-
OVERLAY_CONFIG: cdc-acm-console.conf
4-
DTC_OVERLAY_FILE: cdc-acm-console.overlay
3+
EXTRA_CONF_FILE: cdc-acm-console.conf
4+
EXTRA_DTC_OVERLAY_FILE: cdc-acm-console.overlay
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
name: bar
22
append:
3-
DTC_OVERLAY_FILE: bar.overlay
3+
EXTRA_DTC_OVERLAY_FILE: bar.overlay
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
name: foo
22
append:
3-
OVERLAY_CONFIG: foo.conf
3+
EXTRA_CONF_FILE: foo.conf

0 commit comments

Comments
 (0)