]> git.ipfire.org Git - thirdparty/u-boot.git/commit
binman: Add Sphinx extension to auto-generate entry and bintool docs
authorSimon Glass <sjg@chromium.org>
Wed, 18 Mar 2026 13:23:56 +0000 (07:23 -0600)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 17 Apr 2026 05:12:07 +0000 (07:12 +0200)
commit1ab7f4e2ed5ebee17f5e31d3b39536ae00008f8f
tree6c0ee51c61ce2eff55d1a6f7e932dc4cabe6da1d
parent70fd0c3bb7c26d42f24d10145dd5f3168ac92eac
binman: Add Sphinx extension to auto-generate entry and bintool docs

Currently entries.rst and bintools.rst are generated manually by running
'binman entry-docs' and 'binman bintool-docs', then committed to the
repo. This means the docs can drift out of date when docstrings are
updated but the RST files are not regenerated.

Add a Sphinx extension (binman_docs) that provides two custom
directives:

    .. binman-entry-docs::
    .. binman-bintool-docs::

These parse the etype and btool source files using the ast module to
extract class docstrings, then insert the documentation directly into
the document tree. This avoids the need to import binman modules (which
have dependencies like libfdt that are not available in the ReadTheDocs
build environment) and avoids writing any intermediate files.

Signed-off-by: Simon Glass <sjg@chromium.org>
doc/.gitignore
doc/conf.py
doc/sphinx/binman_docs.py [new file with mode: 0644]