Skip to content

Commit 839d2d4

Browse files
committed
doc: _scripts: simplify vendor determination in board catalog generation
Use the board's vendor from board.yml as the source of truth. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 6dc27a4 commit 839d2d4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

doc/_scripts/gen_boards_catalog.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -262,17 +262,7 @@ def get_catalog(generate_hw_features=False):
262262
logger.info("Skipping generation of supported hardware features.")
263263

264264
for board in boards.values():
265-
# We could use board.vendor but it is often incorrect. Instead, deduce vendor from
266-
# containing folder. There are a few exceptions, like the "native" and "others" folders
267-
# which we know are not actual vendors so treat them as such.
268-
for folder in board.dir.parents:
269-
if folder.name in ["native", "others"]:
270-
vendor = "others"
271-
break
272-
elif vnd_lookup.vnd2vendor.get(folder.name):
273-
vendor = folder.name
274-
break
275-
265+
vendor = board.vendor or "others"
276266
socs = {soc.name for soc in board.socs}
277267
full_name = board.full_name or board.name
278268
doc_page = guess_doc_page(board)

0 commit comments

Comments
 (0)