Skip to content

Commit 9b23002

Browse files
committed
[nrf noup] doc: extensions: kconfig: Add SoC/board sysbuild Kconfigs
Allows listing sysbuild Kconfigs for boards and SoCs Signed-off-by: Jamie McCrae <[email protected]>
1 parent d4d69a4 commit 9b23002

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/_extensions/zephyr/kconfig/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def kconfig_load(app: Sphinx) -> tuple[kconfiglib.Kconfig, kconfiglib.Kconfig, d
105105
with open(Path(td) / "soc" / "Kconfig.soc", "w") as f:
106106
for folder in soc_folders:
107107
f.write('source "' + (Path(folder) / 'Kconfig.soc').as_posix() + '"\n')
108+
f.write('osource "' + (Path(folder) / 'Kconfig.sysbuild').as_posix() + '"\n')
108109

109110
with open(Path(td) / "soc" / "Kconfig", "w") as f:
110111
for folder in soc_folders:
@@ -130,6 +131,12 @@ def kconfig_load(app: Sphinx) -> tuple[kconfiglib.Kconfig, kconfiglib.Kconfig, d
130131
board_str = 'BOARD_' + re.sub(r"[^a-zA-Z0-9_]", "_", board.name).upper()
131132
f.write('config ' + board_str + '\n')
132133
f.write('\t bool\n')
134+
135+
if board.vendor == "nordic" and os.path.isfile(board.dir / 'Kconfig.sysbuild'):
136+
f.write('if ' + board_str + '\n')
137+
f.write('source "' + (board.dir / 'Kconfig.sysbuild').as_posix() + '"\n')
138+
f.write('endifif\n')
139+
133140
for qualifier in list_boards.board_v2_qualifiers(board):
134141
board_str = 'BOARD_' + re.sub(r"[^a-zA-Z0-9_]", "_", qualifier).upper()
135142
f.write('config ' + board_str + '\n')

0 commit comments

Comments
 (0)