Commit Graph

20 Commits

Author SHA1 Message Date
Benjamin Cabé
bb710309ef doc: _scripts: update gen_boards_catalog.py to support sysbuild
Boards that have sysbuild enabled in Twister will have the build folder
for the hello_world sample in a subfolder, so update the code
accordingly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-31 22:00:02 +02:00
Benjamin Cabé
f6d11a51e8 doc: _extensions: add board target selector for supported HW features
This show a nice widget to switch between the various board targets and
see their respective list of supported features.

The original HTML content of the page is preserved and JavaScript code
"patches" the page on-the-fly. This is so that the actual HTML content
(that e.g. search engines see) is complete and indexable (as well as to
provide useful information for folks who might have JavaScript disabled
altogether).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-31 21:59:18 +02:00
Benjamin Cabé
38b87905ba doc: _scripts: boards: fix condition for revision
Revision might be `0` so update the condition to not inadvertently
exclude boards with such revision number.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-31 21:59:18 +02:00
Benjamin Cabé
7d1e98db70 doc: _extensions: boards: fix bug in board target name computation
The board revision should appear right after board name, not after the
qualifiers as was previously done.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-31 21:59:18 +02:00
Benjamin Cabé
258b89bd63 doc: _extensions: handle custom bindings in board catalog
Boards might have local bindings for which generating links using the
dtcompatible role doesn't work -- update the code accordingly so that
we can still provide a description of these custom bindings in the table
of supported features (but with no hyperlink).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-17 20:04:10 +01:00
Abderrahmane JARMOUNI
6402eb6e97 doc: scripts: board catalog: skip zephyr compats
Skip "zephyr,xxx" compats when collecting data for the new Supported
Features table, since they don't represent hardware features.

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-03-07 10:23:47 +00:00
Benjamin Cabé
4ddfe10b89 doc: boards: extensions: simplify DTS binding description extraction
Previous implementation was unneccesarily complex, and cutting of
words such as "802.15.4" to "802.".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-04 18:26:07 +00:00
Benjamin Cabé
fdb8b30da7 doc: extensions: Navigate to DTS entries from supported hardware list
Update the gen_board_catalog.py logic to also capture lineno for
each devicetree node. Use that info in the supported hardware list to
create clickable elements that directly take the user to the
corresponding line in the devicetree file on Github.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-04 17:28:57 +01:00
Benjamin Cabé
22ed2f73d4 doc: Enhance board supported hardware directive and catalog generation
Improve the board supported hardware feature catalog generation and
`.. zephyr:board-supported-hw` directive:

- Differentiate on-chip vs on-board hardware features
- Added count information when a given IP (compatible) appears multiple
  times.
- Show okay *and* disabled features
- Improve table layout and readability

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-26 22:02:39 +00:00
Benjamin Cabé
c9951281cd doc: boards: extensions: add Sphinx directive for board supported hardware
Introduce a new directive for displaying hardware features supported by
a board, using information available in the devicetree.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-21 04:47:17 +01:00
Benjamin Cabé
444964e031 doc: extensions: boards: Add hardware features filter to board catalog
Add a new hardware features filter to the board catalog that allows
users to filter boards based on their supported hardware capabilities.
The features are extracted from the devicetree files and organized by
binding type.

Key changes:
- Extract hardware feature descriptions from devicetree bindings
- Add HW_FEATURES_TURBO_MODE option to skip feature generation for
  faster builds (similar to DT_TURBO_MODE)
- Add tag-based UI for filtering boards by hardware features

The feature can be disabled for faster documentation builds using
-DHW_FEATURES_TURBO_MODE=1 or by using 'make html-fast'.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-20 15:08:50 +00:00
Benjamin Cabé
e544465cd6 doc: _scripts: conf: apply ruff lint rules
This makes all remaining Python scripts in doc compliant w.r.t current
Ruff rules

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-26 15:43:52 -05:00
Torsten Rasmussen
536d34fa7a cmake: scripts: support board extension
Fixes: #69548

Support extending an existing board with new board variants.

This commit introduces the following changes to allow a board to be
extended out-of-tree.

The board yaml schema is extended to support an extend field which
will be used to identify the board to be extended.

A board 'plank' can be extended like this:
> board:
>   extend: plank
>   variants:
>     - name: ext
>       qualifier: soc1

For the rest of the build system this means that there is no longer a
single board directory.
The existing CMake variable BOARD_DIR is kept and reference the
directory which defines the board.
A new CMake variable BOARD_DIRECTORIES provides a list of all
directories which defines board targets for the board.
This means the directory which defines the board as well as all
directories that extends the board.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Benjamin Cabé
c9b71045f8 doc: extensions: boards: Better handle unknown/other vendors
Boards under a folder that doesn't directly match a vendor prefix
incorrectly end up being categorized as "zephyr" since that's the only
prefix that is eventually found when navigating up the folder hierarchy.

This commits treats boards in the "others" and "native" folders as
special cases and associates them to an "Unknown/Other" category.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-23 16:50:30 +02:00
Benjamin Cabé
42354ccfce doc: scripts: boards: don't init pykwalify logging
This might be a leftover from a previous version but this is basically
silencing all Sphinx logs when generating the catalog from Sphinx -- not
good!

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
329f411196 doc: boards: extensions: add board name to catalog for convenience
This makes dictionary entries from the boards catalog more
self-contained as the name of the board is now included in the entry.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
04e6406edb doc: boards: extensions: store "raw" image path
Small change to the way image are stored in the catalog so that we know
where the source image is rather than anticipating on the final path
after build has happened. This allows to potentially reference the
source image from e.g. directives.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
86b72ee6e2 doc: extensions: boards: extract socs information
Store soc(s) information for each board in the catalog, as
well as populate a tree structure for the full list of
family->series->soc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 12:26:27 +02:00
Benjamin Cabé
c5529309f1 doc: extensions: boards: don't guess board full name anymore
Now that we have full_name available in board.yml, stop trying
to "guess" full/commercial name of the board based on its
documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 12:26:27 +02:00
Benjamin Cabé
f2f1496156 doc: Introduce boards catalog
This commit adds support for generating an interactive catalog of all
the supported boards that can be included in the documentation using
the `.. zephyr:board-catalog::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 14:56:57 -04:00