Commit Graph

8 Commits

Author SHA1 Message Date
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