diff --git a/doc/_extensions/zephyr/kconfig/__init__.py b/doc/_extensions/zephyr/kconfig/__init__.py index 26c082a086a..4a58b370cce 100644 --- a/doc/_extensions/zephyr/kconfig/__init__.py +++ b/doc/_extensions/zephyr/kconfig/__init__.py @@ -127,8 +127,7 @@ def kconfig_load(app: Sphinx) -> Tuple[kconfiglib.Kconfig, Dict[str, str]]: board_str = 'BOARD_' + re.sub(r"[^a-zA-Z0-9_]", "_", qualifier).upper() f.write('config ' + board_str + '\n') f.write('\t bool\n') - f.write('source "' + - (board.directories[0] / ('Kconfig.' + board.name)).as_posix() + '"\n\n') + f.write('source "' + (board.dir / ('Kconfig.' + board.name)).as_posix() + '"\n\n') # base environment os.environ["ZEPHYR_BASE"] = str(ZEPHYR_BASE) diff --git a/scripts/ci/check_compliance.py b/scripts/ci/check_compliance.py index 3d42b642f0e..50241b39842 100755 --- a/scripts/ci/check_compliance.py +++ b/scripts/ci/check_compliance.py @@ -479,8 +479,7 @@ def get_v2_model(self, kconfig_dir, settings_file): with open(kconfig_defconfig_file, 'w') as fp: for board in v2_boards: - fp.write('osource "' + - (board.directories[0] / 'Kconfig.defconfig').as_posix() + '"\n') + fp.write('osource "' + (Path(board.dir) / 'Kconfig.defconfig').as_posix() + '"\n') with open(kconfig_boards_file, 'w') as fp: for board in v2_boards: @@ -493,8 +492,7 @@ def get_v2_model(self, kconfig_dir, settings_file): fp.write('config ' + board_str + '\n') fp.write('\t bool\n') fp.write( - 'source "' + - (board.directories[0] / ('Kconfig.' + board.name)).as_posix() + '"\n\n' + 'source "' + (Path(board.dir) / ('Kconfig.' + board.name)).as_posix() + '"\n\n' ) with open(kconfig_file, 'w') as fp: @@ -502,7 +500,7 @@ def get_v2_model(self, kconfig_dir, settings_file): 'osource "' + (Path(kconfig_dir) / 'boards' / 'Kconfig.syms.v1').as_posix() + '"\n' ) for board in v2_boards: - fp.write('osource "' + (Path(board.directories[0]) / 'Kconfig').as_posix() + '"\n') + fp.write('osource "' + (Path(board.dir) / 'Kconfig').as_posix() + '"\n') kconfig_defconfig_file = os.path.join(kconfig_dir, 'soc', 'Kconfig.defconfig') kconfig_soc_file = os.path.join(kconfig_dir, 'soc', 'Kconfig.soc') diff --git a/scripts/ci/test_plan.py b/scripts/ci/test_plan.py index 7501db5198a..3a36a11dd4e 100755 --- a/scripts/ci/test_plan.py +++ b/scripts/ci/test_plan.py @@ -242,7 +242,7 @@ def find_boards(self): for changed in changed_boards: for board in known_boards: c = (zephyr_base / changed).resolve() - if c.is_relative_to(board.directories[0].resolve()): + if c.is_relative_to(board.dir.resolve()): for file in glob.glob(os.path.join(board.dir, f"{board.name}*.yaml")): with open(file, 'r') as f: b = yaml.load(f.read(), Loader=SafeLoader) diff --git a/scripts/list_boards.py b/scripts/list_boards.py index c2b8e3740b3..12222c13846 100755 --- a/scripts/list_boards.py +++ b/scripts/list_boards.py @@ -445,7 +445,7 @@ def dump_boards(args): if args.cmakeformat is not None: info = args.cmakeformat.format( NAME='NAME;' + board.name, - DIR='DIR;' + str(board.directories.as_posix()), + DIR='DIR;' + str(board.dir.as_posix()), HWM='HWM;' + board.hwm, VENDOR='VENDOR;NOTFOUND', REVISION_DEFAULT='REVISION_DEFAULT;NOTFOUND', diff --git a/scripts/west_commands/boards.py b/scripts/west_commands/boards.py index ae57545da7c..3e171bbabe4 100644 --- a/scripts/west_commands/boards.py +++ b/scripts/west_commands/boards.py @@ -98,6 +98,5 @@ def do_run(self, args, _): for board in list_boards.find_v2_boards(args).values(): if name_re is not None and not name_re.search(board.name): continue - log.inf(args.format.format(name=board.name, arch='', dir=board.directories[0], - hwm=board.hwm, + log.inf(args.format.format(name=board.name, arch='', dir=board.dir, hwm=board.hwm, qualifiers=list_boards.board_v2_qualifiers_csv(board)))