Skip to content

Commit 8f5fe75

Browse files
committed
doc: _scripts: capture boards' compatibles in board catalog
This commits adds a `compatibles` field to each board entry in the board catalog, similar to the `supported_features` field. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 4b3cb73 commit 8f5fe75

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/_scripts/gen_boards_catalog.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,13 @@ def get_catalog(generate_hw_features=False, hw_features_vendor_filter=None):
290290
doc_page = guess_doc_page(board)
291291

292292
supported_features = {}
293+
compatibles = {}
293294

294295
# Use pre-gathered build info and DTS files
295296
if board.name in board_devicetrees:
296297
for board_target, edt in board_devicetrees[board.name].items():
297298
features = {}
299+
target_compatibles = set()
298300
for node in edt.nodes:
299301
if node.binding_path is None:
300302
continue
@@ -328,6 +330,7 @@ def get_catalog(generate_hw_features=False, hw_features_vendor_filter=None):
328330
locations.add("soc")
329331

330332
existing_feature = features.get(binding_type, {}).get(node.matching_compat)
333+
target_compatibles.add(node.matching_compat)
331334

332335
node_info = {
333336
"filename": str(filename),
@@ -354,8 +357,9 @@ def get_catalog(generate_hw_features=False, hw_features_vendor_filter=None):
354357

355358
features.setdefault(binding_type, {})[node.matching_compat] = feature_data
356359

357-
# Store features for this specific target
360+
# Store features and compatibles for this specific target
358361
supported_features[board_target] = features
362+
compatibles[board_target] = list(target_compatibles)
359363

360364
board_runner_info = {}
361365
if board.name in board_runners:
@@ -392,6 +396,7 @@ def get_catalog(generate_hw_features=False, hw_features_vendor_filter=None):
392396
"socs": list(socs),
393397
"revision_default": board.revision_default,
394398
"supported_features": supported_features,
399+
"compatibles": compatibles,
395400
"image": guess_image(board),
396401
# runners
397402
"supported_runners": board_runner_info.get("runners", []),

0 commit comments

Comments
 (0)