doc: make pdfdocs: Address issues with the make pdfdocs target
v2 cover doc: make pdfdocs: Address issues with the make pdfdocs target
This patch series address several issues that were affecting the make pdfdocs target.
In the end, the make pdfdocs could be considered fixed. It is at least with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025.
The thing is fixed only after the 6th commit. Each commit solves one issue, in the order as they appeared. I hope it makes sense.
Changes from v1:
- Use already in place kfigure sphinx extension instead of sphinxcontrib.inkscapeconverter.
- I have kept the dependency on inkscape because: (1) ImageMagick's convert fails to the job, and (2) it's what's done in the Linux kernel on which kfigure is based.
Adriano Carvalho (7):
doc: make pdfdocs: Specify texlive-xetex as a prerequisite
doc: make pdfdocs: Update the description with the needed steps
doc: make pdfdocs: Add pip install -r test/py/requirements.txt to the
list of needed steps
doc: make pdfdocs: Ensure SVG files are converted to PDF before the
compilation of *.tex files
doc: make pdfdocs: Update kfigure sphinx extension to support inkscape
as well
doc: make pdfdocs: Increase the maximum list depth
doc: make pdfdocs: Remove redundant "-j" option
doc/Makefile | 1 - doc/board/beagle/am62x_beagleplay.rst | 8 +- doc/board/beagle/am67a_beagley_ai.rst | 6 +- doc/board/beagle/j721e_beagleboneai64.rst | 10 +- doc/board/samsung/e850-96.rst | 2 +- doc/board/ti/am62ax_sk.rst | 6 +- doc/board/ti/am62px_sk.rst | 8 +- doc/board/ti/am62x_sk.rst | 8 +- doc/board/ti/am64x_evm.rst | 8 +- doc/board/ti/am65x_evm.rst | 12 +- doc/board/ti/j7200_evm.rst | 10 +- doc/board/ti/j721e_evm.rst | 10 +- doc/board/ti/j721s2_evm.rst | 6 +- doc/board/ti/j722s_evm.rst | 6 +- doc/board/ti/j784s4_evm.rst | 8 +- doc/board/ti/k3.rst | 8 +- doc/build/documentation.rst | 28 ++- doc/conf.py | 4 + doc/develop/memory.rst | 4 +- doc/develop/trace.rst | 10 +- doc/sphinx/kfigure.py | 212 ++++++++++++++++------ tools/docker/Dockerfile | 2 + tools/patman/patman.rst | 2 +- 23 files changed, 252 insertions(+), 127 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/7 doc: make pdfdocs: Specify texlive-xetex as a prerequisite
Dockerfile updated as well.
If I don't apt install texlive-xetex, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs HOSTCC scripts/basic/fixdep doc/Makefile:89: The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output. SKIP Sphinx pdfdocs target.
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
--- doc/build/documentation.rst | 2 ++ tools/docker/Dockerfile | 1 + 2 files changed, 3 insertions(+)
doc/build/documentation.rst +2 -0
@@ -16,6 +16,8 @@ the following dependencies are needed to build the documentation: * texinfo (if building the `Infodoc documentation`_) +* texlive-xetex (if building the `PDF documentation`_ through the *pdfdocs* target) + When submitting patches for documentation always build with KDOC_WERROR=1 to treat warnings as errors.
tools/docker/Dockerfile +1 -0
@@ -136,6 +136,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ sudo \ swig \ texinfo \ + texlive-xetex \ util-linux \ uuid-dev \ vboot-kernel-utils \
Signature · 1 line
2.34.1
Re: [PATCH v2 1/7] doc: make pdfdocs: Specify texlive-xetex as a prerequisite
Quoted 5 lines · Adriano Carvalho
Dockerfile updated as well.
If I don't apt install texlive-xetex, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
Quoted 8 lines
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs HOSTCC scripts/basic/fixdep doc/Makefile:89: The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output. SKIP Sphinx pdfdocs target.NOTE: This won't completely fix the pdfdocs target. See next commit(s).
Signed-off-by Adriano Carvalho <[email protected]>
Signature · 1 line
Tom
Re: [PATCH v2 1/7] doc: make pdfdocs: Specify texlive-xetex as a prerequisite
In reply to Adriano CarvalhoQuoted 37 lines · Adriano Carvalho
Dockerfile updated as well.
If I don't apt install texlive-xetex, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs HOSTCC scripts/basic/fixdep doc/Makefile:89: The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output. SKIP Sphinx pdfdocs target.NOTE: This won't completely fix the pdfdocs target. See next commit(s).
Signed-off-by Adriano Carvalho <[email protected]>Reviewed-by Tom Rini <[email protected]>--- doc/build/documentation.rst | 2 ++ tools/docker/Dockerfile | 1 + 2 files changed, 3 insertions(+)doc/build/documentation.rst +2
-0@@ -16,6 +16,8 @@ the following dependencies are needed to build the documentation: * texinfo (if building the `Infodoc documentation`_) +* texlive-xetex (if building the `PDF documentation`_ through the *pdfdocs* target) + When submitting patches for documentation always build with KDOC_WERROR=1 to treat warnings as errors.tools/docker/Dockerfile +0
-0
tools/docker/Dockerfile RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ · line 139
Quoted 4 lines
tools/docker/Dockerfile +1
-0@@ -136,6 +136,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ sudo \ swig \ texinfo \ + texlive-xetex \
When I try to run make pdfdocs I see an error message
! LaTeX Error: File `xeCJK.sty' not found.
Why wouldn't you install package texlive-lang-cjk?
Best regards
Heinrich
Quoted 3 lines
tools/docker/Dockerfile +0
-0util-linux \ uuid-dev \ vboot-kernel-utils \
Re: [PATCH v2 1/7] doc: make pdfdocs: Specify texlive-xetex as a prerequisite
Quoted 47 lines · Heinrich Schuchardt
Quoted 38 lines · Adriano Carvalho
Dockerfile updated as well.
If I don't apt install texlive-xetex, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs HOSTCC scripts/basic/fixdep doc/Makefile:89: The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output. SKIP Sphinx pdfdocs target.NOTE: This won't completely fix the pdfdocs target. See next commit(s).
Signed-off-by Adriano Carvalho <[email protected]>Reviewed-by Tom Rini <[email protected]>---
doc/build/documentation.rst| 2 ++
tools/docker/Dockerfile | 1 +2 files changed, 3 insertions(+)doc/build/documentation.rst +0
-0@@ -16,6 +16,8 @@ the following dependencies are needed to build thedocumentation:
* texinfo (if building theInfodoc documentation_) +* texlive-xetex (if building thePDF documentation_ through the *pdfdocs* target)
+
When submitting patches for documentation always build with KDOC_WERROR=1 to
treat warnings as errors.
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index5b4c75f8400..8e166eda4bc100644tools/docker/Dockerfile RUN --mount=type=cache,target=/var/cache/ · line 140
Quoted 5 lines
tools/docker/Dockerfile +1
-0@@ -136,6 +136,7 @@ RUN --mount=type=cache,target=/var/cache/ apt,sharing=locked \ sudo \ swig \ texinfo \ + texlive-xetex \When I try to run
make pdfdocsI see an error message
Quoted 12 lines
! LaTeX Error: File `xeCJK.sty' not found.
Why wouldn't you install package texlive-lang-cjk?
Best regards
Heinrich
Quoted 3 lines
tools/docker/Dockerfile +0
-0util-linux \ uuid-dev \vboot-kernel-utils \
$ apt rdepends texlive-lang-cjk texlive-lang-cjk Reverse Depends: Breaks: texlive-xetex (<< 2021.20220204) Recommends: yatex Depends: texlive-lang-korean (>= 2024.20240401) Depends: texlive-lang-japanese (>= 2024.20240401) Depends: texlive-lang-chinese (>= 2024.20240401) Depends: texlive-lang-all (>= 2024.20240401) Conflicts: texlive-base (<< 2024.20240401) Depends: texlive-full (>= 2024.20240401) Suggests: sisu-complete Suggests: sisu-pdf
$ apt rdepends texlive-fonts-recommended texlive-fonts-recommended Reverse Depends: Breaks: texlive-base (<< 2019.20200213) Depends: wims Recommends: wiki2beamer Depends: tth-common Suggests: texstudio Depends: texmacs-texmf Depends: texlive-science (>= 2024.20240401) Recommends: texlive-latex-extra Depends: texlive-formats-extra (>= 2024.20240401) Recommends: texlive-fonts-extra Depends: texlive-full (>= 2024.20240401) Replaces: texlive-base (<< 2019.20200213) Depends: texlive (>= 2024.20240401) Conflicts: texlive-base (<< 2024.20240401) ...
Should that be texlive-full or possibly texlive-fonts-recommended ?
https://qa.debian.org/popcon.php?package=texlive-base
Package popularity by dkpg action:
texlive-base 23153 texlive-latex-base 21623 texlive-latex-recommended 18692 texlive-fonts-recommended 17301 texlive-pictures 16209 texlive-luatex 12072 texlive-metapost 5498 texlive-xetex 9345 texlive 8392 texlive-full 3513 texlive-fonts-recommended-doc 6340
Not texlive-full as this is much less likely to be installed. Maybe then texlive instead of texlive-xetex.
-E
PATCH v2 2/7 doc: make pdfdocs: Update the description with the needed steps
In reply to Adriano CarvalhoIt is not clear that before "make pdfdocs" it is also necessary to install "doc/sphinx/requirements.txt".
If I don't install "doc/sphinx/requirements.txt", this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs SPHINX latexdocs --> file:///home/uboot/u-boot/doc/output/latex PARSE include/linker_lists.h Running Sphinx v4.3.2 Warning: The Sphinx 'sphinx_rtd_theme' HTML theme was not found. Make sure you have the theme installed to produce pretty HTML output. Falling back to the default theme. loading translations [en]... done
Extension error:
Could not import extension sphinx-prompt (exception: No module named 'sphinx-prompt') make[1]: *** [doc/Makefile:84: latexdocs] Error 2
make: *** [Makefile:2687: pdfdocs] Error 2
A "t" was also missing in "documenation". This commit also fixes that.
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
--- doc/build/documentation.rst | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
doc/build/documentation.rst +16 -2
@@ -68,8 +68,22 @@ The *infodocs* target builds both a texinfo and an info file: PDF documentation ----------------- -The *pdfdocs* target is meant to be used to build PDF documenation. -As v2023.01 it fails with 'LaTeX Error: Too deeply nested'. +The *pdfdocs* target is meant to be used to build PDF documentation: + +.. code-block:: bash + + # Create Python environment 'myenv' + python3 -m venv myenv + # Activate the Python environment + . myenv/bin/activate + # Install build requirements + python3 -m pip install -r doc/sphinx/requirements.txt + # Build the documentation + make pdfdocs + # Deactivate the Python environment + deactivate + +However, as of v2023.01 it fails with 'LaTeX Error: Too deeply nested'. We can use texi2pdf instead:
Signature · 1 line
2.34.1
PATCH v2 3/7 doc: make pdfdocs: Add pip install -r test/py/requirements.txt to the list of needed steps
In reply to Adriano CarvalhoAs requested, I added this step to all doc targets.
If I don't do this, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs [...] WARNING: autodoc: failed to import module 'test_bind'; the following exception was raised: No module named 'pytest' [autodoc.import_object] WARNING: autodoc: failed to import module 'test_bootmenu'; the following exception was raised: No module named 'pytest' [autodoc.import_object] WARNING: autodoc: failed to import module 'test_bootstage'; the following exception was raised: No module named 'pytest' [autodoc.import_object] WARNING: autodoc: failed to import module 'test_button'; the following exception was raised: No module named 'pytest' [autodoc.import_object] WARNING: autodoc: failed to import module 'test_efi_loader'; the following exception was raised: No module named 'pytest' [autodoc.import_object] WARNING: autodoc: failed to import module 'test_net'; the following exception was raised: No module named 'pytest' [autodoc.import_object] WARNING: autodoc: failed to import module 'test_net_boot'; the following exception was raised: No module named 'pytest' [autodoc.import_object] [...] build finished with problems, 7 warnings (with warnings treated as errors). make[1]: *** [doc/Makefile:84: latexdocs] Error 1 make: *** [Makefile:2687: pdfdocs] Error 2
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
--- doc/build/documentation.rst | 5 +++++ 1 file changed, 5 insertions(+)
doc/build/documentation.rst +5 -0
@@ -35,6 +35,7 @@ The *htmldocs* target is used to build the HTML documentation. It uses the . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make htmldocs # Deactivate the Python environment
@@ -58,6 +59,7 @@ The *infodocs* target builds both a texinfo and an info file: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make infodocs # Deactivate the Python environment
@@ -78,6 +80,7 @@ The *pdfdocs* target is meant to be used to build PDF documentation: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make pdfdocs # Deactivate the Python environment
@@ -95,6 +98,7 @@ We can use texi2pdf instead: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make texinfodocs # Deactivate the Python environment
@@ -115,6 +119,7 @@ To build only the texinfo documentation the *texinfodocs* target is used: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make texinfodocs # Deactivate the Python environment
Signature · 1 line
2.34.1
Re: [PATCH v2 3/7] doc: make pdfdocs: Add pip install -r test/py/requirements.txt to the list of needed steps
Quoted 1 line · Adriano Carvalho
As requested, I added this step to all doc targets.
This change looks wrong to me.
Everything needed to build the documentation should be in doc/sphinx/requirements.txt.
Everything needed to run tests should be in test/py/requirements.txt.
If there is an overlap that is fine. But, please, abstain from confusing the two.
Please, add missing dependencies to doc/sphinx/requirements.txt.
Quoted 8 lines
If I don't do this, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs [...] WARNING: autodoc: failed to import module 'test_bind'; the following exception was raised: No module named 'pytest' [autodoc.import_object]
Why should pytest be needed to build documentation?
Something must be really wrong in the pdfdocs make target if this error comes up.
Best regards
Heinrich
Quoted 68 lines
WARNING: autodoc: failed to import module '
test_bootmenu'; the following exception was raised:
No module named 'pytest' [autodoc.import_object]
WARNING: autodoc: failed to import module 'test_bootstage'; the following exception was raised:
No module named 'pytest' [autodoc.import_object]
WARNING: autodoc: failed to import module 'test_button'; the following exception was raised:
No module named 'pytest' [autodoc.import_object]
WARNING: autodoc: failed to import module 'test_efi_loader'; the following exception was raised:
No module named 'pytest' [autodoc.import_object]
WARNING: autodoc: failed to import module 'test_net'; the following exception was raised:
No module named 'pytest' [autodoc.import_object]
WARNING: autodoc: failed to import module 'test_net_boot'; the following exception was raised:
No module named 'pytest' [autodoc.import_object]
[...]
build finished with problems, 7 warnings (with warnings treated as errors). make[1]: *** [doc/Makefile:84: latexdocs] Error 1
make: *** [Makefile:2687: pdfdocs] Error 2NOTE: This won't completely fix the pdfdocs target. See next commit(s).
Signed-off-by Adriano Carvalho <[email protected]>--- doc/build/documentation.rst | 5 +++++ 1 file changed, 5 insertions(+)doc/build/documentation.rst +5
-0@@ -35,6 +35,7 @@ The *htmldocs* target is used to build the HTML documentation. It uses the . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make htmldocs # Deactivate the Python environment@@ -58,6 +59,7 @@ The *infodocs* target builds both a texinfo and an info file: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make infodocs # Deactivate the Python environment@@ -78,6 +80,7 @@ The *pdfdocs* target is meant to be used to build PDF documentation: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make pdfdocs # Deactivate the Python environment@@ -95,6 +98,7 @@ We can use texi2pdf instead: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make texinfodocs # Deactivate the Python environment@@ -115,6 +119,7 @@ To build only the texinfo documentation the *texinfodocs* target is used: . myenv/bin/activate # Install build requirements python3 -m pip install -r doc/sphinx/requirements.txt + python3 -m pip install -r test/py/requirements.txt # Build the documentation make texinfodocs # Deactivate the Python environment
Re: [PATCH v2 3/7] doc: make pdfdocs: Add pip install -r test/py/requirements.txt to the list of needed steps
Quoted 19 lines · Heinrich Schuchardt
Quoted 1 line · Adriano Carvalho
As requested, I added this step to all doc targets.
This change looks wrong to me.
Everything needed to build the documentation should be in
doc/sphinx/requirements.txt.Everything needed to run tests should be in
test/py/requirements.txt.If there is an overlap that is fine. But, please, abstain from confusing the two.
Please, add missing dependencies to
doc/sphinx/requirements.txt.Quoted 4 lines
If I don't do this, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
Quoted 6 lines
Quoted 4 lines
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs [...] WARNING: autodoc: failed to import module 'test_bind'; the following exception was raised: No module named 'pytest' [autodoc.import_object]Why should pytest be needed to build documentation?
Because the pytest documentation requires it, iedoc/develop/pytest/test_*.rst.
Can we just list pytest in both requirements.txt, or will it become annoying to have to update two places each time? I'm not sure.
Signature · 1 line
Tom
PATCH v2 4/7 doc: make pdfdocs: Ensure SVG files are converted to PDF before the compilation of *.tex files
In reply to Adriano CarvalhoSVG files are not handled directly in the *.tex files. This commit replaces all instances of ".. image::" with ".. kernel-figure::". With this, the kfigure sphinx extension (already present) ensures that SVG files are converted to PDF before the compilation of *.tex files.
If I don't do this, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs [...] xelatex 'android.tex' [...] Output written on android.pdf (28 pages). [...] xelatex 'api.tex' [...] Output written on api.pdf (431 pages). [...] xelatex 'arch.tex' [...] Output written on arch.pdf (62 pages). [...] xelatex 'board.tex' [...]
[152]
Chapter 14.
! LaTeX Error: Cannot determine size of graphic in boot_diagram_am62.svg (no Bo undingBox).
See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help.
...
l.11422 ...ncludegraphics{{boot_diagram_am62}.svg}
?
! Emergency stop.
...
[...]
Output written on board.pdf (156 pages).
Transcript written on board.log.
make[2]: *** [Makefile:29: board.pdf] Error 1
make[1]: *** [doc/Makefile:95: pdfdocs] Error 2
make: *** [Makefile:2687: pdfdocs] Error 2
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
--- doc/board/beagle/am62x_beagleplay.rst | 8 ++++---- doc/board/beagle/am67a_beagley_ai.rst | 6 +++--- doc/board/beagle/j721e_beagleboneai64.rst | 10 +++++----- doc/board/samsung/e850-96.rst | 2 +- doc/board/ti/am62ax_sk.rst | 6 +++--- doc/board/ti/am62px_sk.rst | 8 ++++---- doc/board/ti/am62x_sk.rst | 8 ++++---- doc/board/ti/am64x_evm.rst | 8 ++++---- doc/board/ti/am65x_evm.rst | 12 ++++++------ doc/board/ti/j7200_evm.rst | 10 +++++----- doc/board/ti/j721e_evm.rst | 10 +++++----- doc/board/ti/j721s2_evm.rst | 6 +++--- doc/board/ti/j722s_evm.rst | 6 +++--- doc/board/ti/j784s4_evm.rst | 8 ++++---- doc/board/ti/k3.rst | 8 ++++---- doc/develop/memory.rst | 4 ++-- doc/develop/trace.rst | 10 +++++----- tools/patman/patman.rst | 2 +- 18 files changed, 66 insertions(+), 66 deletions(-)
doc/board/beagle/am62x_beagleplay.rst +4 -4
@@ -23,7 +23,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: ../ti/img/boot_diagram_am62.svg +.. kernel-figure:: ../ti/img/boot_diagram_am62.svg :alt: Boot flow diagram - On this platform, 'TI Foundational Security' (TIFS) functions as the
@@ -85,12 +85,12 @@ Image formats - tiboot3.bin -.. image:: ../ti/img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: ../ti/img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: ../ti/img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: ../ti/img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Additional hardware for U-Boot development
@@ -172,7 +172,7 @@ Area (UDA) hardware partition of the eMMC. These components can vary significantly in size. The choice of keeping tiboot3.bin in boot0 or boot1 partition depends on A/B update requirements. -.. image:: img/beagleplay_emmc.svg +.. kernel-figure:: img/beagleplay_emmc.svg :alt: eMMC partitions and boot file organization for BeaglePlay The following are the steps from Linux shell to program eMMC:
doc/board/beagle/am67a_beagley_ai.rst +3 -3
@@ -23,7 +23,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: ../ti/img/boot_diagram_k3_current.svg +.. kernel-figure:: ../ti/img/boot_diagram_k3_current.svg :alt: Boot flow diagram - On this platform, 'TI Foundational Security' (TIFS) functions as the
@@ -84,12 +84,12 @@ Image formats - tiboot3.bin -.. image:: ../ti/img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: ../ti/img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: ../ti/img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: ../ti/img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Additional hardware for U-Boot development
doc/board/beagle/j721e_beagleboneai64.rst +5 -5
@@ -26,7 +26,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: ../ti/img/boot_diagram_j721e.svg +.. kernel-figure:: ../ti/img/boot_diagram_j721e.svg :alt: Boot flow diagram - On this platform, DMSC runs 'TI Foundational Security' (TIFS) which
@@ -92,17 +92,17 @@ Image formats - tiboot3.bin -.. image:: ../ti/img/no_multi_cert_tiboot3.bin.svg +.. kernel-figure:: ../ti/img/no_multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: ../ti/img/dm_tispl.bin.svg +.. kernel-figure:: ../ti/img/dm_tispl.bin.svg :alt: tispl.bin image format - sysfw.itb -.. image:: ../ti/img/sysfw.itb.svg +.. kernel-figure:: ../ti/img/sysfw.itb.svg :alt: sysfw.itb image format Additional hardware for U-Boot development
@@ -184,7 +184,7 @@ Area (UDA) hardware partition of the eMMC. These components can vary significantly in size. The choice of keeping tiboot3.bin in boot0 or boot1 partition depends on A/B update requirements. -.. image:: img/beagleplay_emmc.svg +.. kernel-figure:: img/beagleplay_emmc.svg :alt: eMMC partitions and boot file organization for BeagleBone AI-64 The following are the steps from Linux shell to program eMMC:
doc/board/samsung/e850-96.rst +1 -1
@@ -28,7 +28,7 @@ Boot Flow The boot path for Exynos850 is shown on the figure below. -.. image:: img/exynos850-boot-architecture.svg +.. kernel-figure:: img/exynos850-boot-architecture.svg :alt: Exynos850 SoC boot flow Legend:
doc/board/ti/am62ax_sk.rst +3 -3
@@ -47,7 +47,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_am62.svg +.. kernel-figure:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -138,12 +138,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Switch Setting for Boot Mode
doc/board/ti/am62px_sk.rst +4 -4
@@ -55,7 +55,7 @@ Boot Flow: The bootflow is exactly the same as all SoCs in the am62xxx extended SoC family. Below is the pictorial representation: -.. image:: img/boot_diagram_am62.svg +.. kernel-figure:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -152,12 +152,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format OSPI:
@@ -181,7 +181,7 @@ over tftp and then flash those to OSPI at their respective addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw2.svg +.. kernel-figure:: img/ospi_sysfw2.svg :alt: OSPI flash partition layout A53 SPL DDR Memory Layout
doc/board/ti/am62x_sk.rst +4 -4
@@ -46,7 +46,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_am62.svg +.. kernel-figure:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -174,12 +174,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format OSPI:
@@ -203,7 +203,7 @@ over tftp and then flash those to OSPI at their respective addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw2.svg +.. kernel-figure:: img/ospi_sysfw2.svg :alt: OSPI flash partition layout A53 SPL DDR Memory Layout
doc/board/ti/am64x_evm.rst +4 -4
@@ -35,7 +35,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_am64.svg +.. kernel-figure:: img/boot_diagram_am64.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -136,12 +136,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/nodm_tispl.bin.svg +.. kernel-figure:: img/nodm_tispl.bin.svg :alt: tispl.bin image format OSPI:
@@ -165,7 +165,7 @@ over tftp and then flash those to OSPI at their respective addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw-am64.svg +.. kernel-figure:: img/ospi_sysfw-am64.svg :alt: OSPI flash partition layout Switch Setting for Boot Mode
doc/board/ti/am65x_evm.rst +6 -6
@@ -45,7 +45,7 @@ applications. This should happen before running Linux. 3. In production boot flow, we might not like to use full U-Boot, instead use Falcon boot flow to reduce boot time. -.. image:: img/boot_diagram_am65.svg +.. kernel-figure:: img/boot_diagram_am65.svg :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A53
@@ -141,17 +141,17 @@ Image formats: - tiboot3.bin -.. image:: img/no_multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/no_multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/nodm_tispl.bin.svg +.. kernel-figure:: img/nodm_tispl.bin.svg :alt: tispl.bin image format - sysfw.itb -.. image:: img/sysfw.itb.svg +.. kernel-figure:: img/sysfw.itb.svg :alt: sysfw.itb image format eMMC:
@@ -193,7 +193,7 @@ used: eMMC layout: -.. image:: img/emmc_am65x_evm_boot0.svg +.. kernel-figure:: img/emmc_am65x_evm_boot0.svg :alt: emmc boot partition layout Kernel image and DT are expected to be present in the /boot folder of rootfs.
@@ -229,7 +229,7 @@ addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw.svg +.. kernel-figure:: img/ospi_sysfw.svg :alt: OSPI flash partition layout Kernel Image and DT are expected to be present in the /boot folder of UBIFS
doc/board/ti/j7200_evm.rst +5 -5
@@ -34,7 +34,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A72
@@ -135,12 +135,12 @@ Image formats: - tiboot3.bin -.. image:: img/j7200_tiboot3.bin.svg +.. kernel-figure:: img/j7200_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin image format Switch Setting for Boot Mode
@@ -196,7 +196,7 @@ Current allocated size for tiboot3 size is 1MB, tispl is 2MB. Size of u-boot.img is taken 4MB for refernece, But this is subject to change depending upon atf, optee size -.. image:: img/emmc_j7200_evm_boot01.svg +.. kernel-figure:: img/emmc_j7200_evm_boot01.svg :alt: Traditional eMMC boot partition layout In case of UDA FS mode booting, following is layout.
@@ -204,7 +204,7 @@ In case of UDA FS mode booting, following is layout. All boot images tiboot3.bin, tispl and u-boot should be written to fat formatted UDA FS as file. -.. image:: img/emmc_j7200_evm_udafs.svg +.. kernel-figure:: img/emmc_j7200_evm_udafs.svg :alt: eMMC UDA boot partition layout In case of booting from eMMC, write above images into raw or UDA FS.
doc/board/ti/j721e_evm.rst +5 -5
@@ -39,7 +39,7 @@ Boot Flow: Boot flow is similar to that of AM65x SoC and extending it with remoteproc support. Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_j721e.svg +.. kernel-figure:: img/boot_diagram_j721e.svg :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A72
@@ -141,17 +141,17 @@ Image formats: - tiboot3.bin -.. image:: img/no_multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/no_multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin image format - sysfw.itb -.. image:: img/sysfw.itb.svg +.. kernel-figure:: img/sysfw.itb.svg :alt: sysfw.itb image format OSPI:
@@ -178,7 +178,7 @@ addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw.svg +.. kernel-figure:: img/ospi_sysfw.svg :alt: OSPI flash partition layout R5 Memory Map:
doc/board/ti/j721s2_evm.rst +3 -3
@@ -42,7 +42,7 @@ Boot Flow: Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg - On this platform, "TI Foundational Security" (TIFS) functions as the security enclave master while "Device Manager" (DM), also known as the
@@ -152,11 +152,11 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg R5 Memory Map: --------------
doc/board/ti/j722s_evm.rst +3 -3
@@ -32,7 +32,7 @@ Boot Flow: The bootflow is exactly the same as all SoCs in the am62xxx extended SoC family. Below is the pictorial representation: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -126,12 +126,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin image format A53 SPL DDR Memory Layout
doc/board/ti/j784s4_evm.rst +4 -4
@@ -41,7 +41,7 @@ Boot Flow --------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg :alt: K3 boot flow - On this platform, "TI Foundational Security" (TIFS) functions as the
@@ -158,12 +158,12 @@ Image formats - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin format OSPI:
@@ -188,7 +188,7 @@ addresses. Flash layout for OSPI NOR: -.. image:: img/ospi_sysfw3.svg +.. kernel-figure:: img/ospi_sysfw3.svg :alt: OSPI NOR flash partition layout R5 Memory Map
doc/board/ti/k3.rst +4 -4
@@ -61,7 +61,7 @@ boot media needed to load the binaries packaged inside `tiboot3.bin`, including a 32bit U-Boot SPL, (called the wakeup SPL) that ROM will jump to after it has finished loading everything into internal SRAM. -.. image:: img/boot_flow_01.svg +.. kernel-figure:: img/boot_flow_01.svg :alt: Boot flow up to wakeup domain SPL The wakeup SPL, running on a wakeup domain core, will initialize DDR and
@@ -71,7 +71,7 @@ application cores inside the main domain to initialize the main domain, starting with Trusted Firmware-A (TF-A), before moving on to start OP-TEE and the main domain's U-Boot SPL. -.. image:: img/boot_flow_02.svg +.. kernel-figure:: img/boot_flow_02.svg :alt: Boot flow up to main domain SPL The main domain's SPL, running on a 64bit application core, has
@@ -80,7 +80,7 @@ initialize even more peripherals needed to load in the `u-boot.img` which loads more firmware into the micro-controller & wakeup domains and finally prepare the main domain to run Linux. -.. image:: img/boot_flow_03.svg +.. kernel-figure:: img/boot_flow_03.svg :alt: Complete boot flow up to Linux This is the typical boot flow for all K3 based SoCs, however this flow
@@ -691,7 +691,7 @@ generation device. The overall structure of this setup is in the following figure. -.. image:: img/openocd-overview.svg +.. kernel-figure:: img/openocd-overview.svg :alt: Overview of OpenOCD setup. .. note::
doc/develop/memory.rst +2 -2
@@ -69,7 +69,7 @@ SPL Flow Prior to setting up of the DRAM, the stack, malloc is defined as below possibly sitting on a smaller readily available memory (SRAM etc.): - .. image:: pics/spl_before_reloc.svg + .. kernel-figure:: pics/spl_before_reloc.svg :alt: contents of ready RAM before relocation in SPL Please see CONFIG_SPL_EARLY_BSS if BSS initialization is needed prior
@@ -95,7 +95,7 @@ SPL Flow The final environment is setup and the system RAM now looks like this: - .. image:: pics/spl_after_reloc.svg + .. kernel-figure:: pics/spl_after_reloc.svg :alt: contents of DRAM after relocation in SPL Again stack and gd are an optional move and may still remain in the
doc/develop/trace.rst +5 -5
@@ -111,7 +111,7 @@ Finally run kernelshark to display it (note it only works with `.dat` files!): Using this tool you can view the trace records and see the timestamp for each function. -.. image:: pics/kernelshark.png +.. kernel-figure:: pics/kernelshark.png :width: 800 :alt: Kernelshark showing function-trace records
@@ -144,7 +144,7 @@ There is a -f option available to select a function graph: Again, you can use kernelshark or trace-cmd to look at the output. In this case you will see the time taken by each function shown against its exit record. -.. image:: pics/kernelshark_fg.png +.. kernel-figure:: pics/kernelshark_fg.png :width: 800 :alt: Kernelshark showing function-graph records
@@ -188,11 +188,11 @@ command: You can load the .svg file into a viewer. If you use Chrome (and some other programs) you can click around and zoom in and out. -.. image:: pics/flamegraph.png +.. kernel-figure:: pics/flamegraph.png :width: 800 :alt: Chrome showing the flamegraph.pl output -.. image:: pics/flamegraph_zoom.png +.. kernel-figure:: pics/flamegraph_zoom.png :width: 800 :alt: Chrome showing zooming into the flamegraph.pl output
@@ -209,7 +209,7 @@ Note that trace collection does slow down execution so the timings will be inflated. They should be used to guide optimisation. For accurate boot timings, use bootstage. -.. image:: pics/flamegraph_timing.png +.. kernel-figure:: pics/flamegraph_timing.png :width: 800 :alt: Chrome showing flamegraph.pl output with timing
tools/patman/patman.rst +1 -1
@@ -932,7 +932,7 @@ be sure to check out the help. Here is a sample 'progress' view: -.. image:: pics/patman.jpg +.. kernel-figure:: pics/patman.jpg :width: 800 :alt: Patman showing the progress view
Signature · 1 line
2.34.1
Re: [PATCH v2 4/7] doc: make pdfdocs: Ensure SVG files are converted to PDF before the compilation of *.tex files
Quoted 49 lines · Adriano Carvalho
SVG files are not handled directly in the *.tex files. This commit replaces all instances of ".. image::" with ".. kernel-figure::". With this, the kfigure sphinx extension (already present) ensures that SVG files are converted to PDF before the compilation of *.tex files.
If I don't do this, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs [...] xelatex 'android.tex' [...] Output written on android.pdf (28 pages). [...] xelatex 'api.tex' [...] Output written on api.pdf (431 pages). [...] xelatex 'arch.tex' [...] Output written on arch.pdf (62 pages). [...] xelatex 'board.tex' [...][152]
Chapter 14.! LaTeX Error: Cannot determine size of graphic in boot_diagram_am62.svg (no Bo undingBox).
See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help.
...l.11422 ...ncludegraphics{{boot_diagram_am62}.svg}
?
! Emergency stop.
...[...]
Output written on board.pdf (156 pages).
Transcript written on board.log.
make[2]: *** [Makefile:29: board.pdf] Error 1
make[1]: *** [doc/Makefile:95: pdfdocs] Error 2
make: *** [Makefile:2687: pdfdocs] Error 2
Quoted 3 lines
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
Signed-off-by Adriano Carvalho <[email protected]>
Signature · 1 line
Tom
Re: [PATCH v2 4/7] doc: make pdfdocs: Ensure SVG files are converted to PDF before the compilation of *.tex files
In reply to Adriano CarvalhoQuoted 49 lines · Adriano Carvalho
SVG files are not handled directly in the *.tex files. This commit replaces all instances of ".. image::" with ".. kernel-figure::". With this, the kfigure sphinx extension (already present) ensures that SVG files are converted to PDF before the compilation of *.tex files.
If I don't do this, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
uboot@35c89b9ab70e:~/u-boot$ make pdfdocs [...] xelatex 'android.tex' [...] Output written on android.pdf (28 pages). [...] xelatex 'api.tex' [...] Output written on api.pdf (431 pages). [...] xelatex 'arch.tex' [...] Output written on arch.pdf (62 pages). [...] xelatex 'board.tex' [...][152]
Chapter 14.! LaTeX Error: Cannot determine size of graphic in boot_diagram_am62.svg (no Bo undingBox).
See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help.
...l.11422 ...ncludegraphics{{boot_diagram_am62}.svg}
?
! Emergency stop.
...[...]
Output written on board.pdf (156 pages).
Transcript written on board.log.
make[2]: *** [Makefile:29: board.pdf] Error 1
make[1]: *** [doc/Makefile:95: pdfdocs] Error 2
make: *** [Makefile:2687: pdfdocs] Error 2
Quoted 4 lines
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
Signed-off-by Adriano Carvalho <[email protected]>Reviewed-by Tom Rini <[email protected]>
Please, describe the usage of kernel-figure in doc/develop/docstyle.rst so that documentation maintainers know when to use it.
Best regards
Heinrich
Quoted 634 lines
--- doc/board/beagle/am62x_beagleplay.rst | 8 ++++---- doc/board/beagle/am67a_beagley_ai.rst | 6 +++--- doc/board/beagle/j721e_beagleboneai64.rst | 10 +++++----- doc/board/samsung/e850-96.rst | 2 +- doc/board/ti/am62ax_sk.rst | 6 +++--- doc/board/ti/am62px_sk.rst | 8 ++++---- doc/board/ti/am62x_sk.rst | 8 ++++---- doc/board/ti/am64x_evm.rst | 8 ++++---- doc/board/ti/am65x_evm.rst | 12 ++++++------ doc/board/ti/j7200_evm.rst | 10 +++++----- doc/board/ti/j721e_evm.rst | 10 +++++----- doc/board/ti/j721s2_evm.rst | 6 +++--- doc/board/ti/j722s_evm.rst | 6 +++--- doc/board/ti/j784s4_evm.rst | 8 ++++---- doc/board/ti/k3.rst | 8 ++++---- doc/develop/memory.rst | 4 ++-- doc/develop/trace.rst | 10 +++++----- tools/patman/patman.rst | 2 +- 18 files changed, 66 insertions(+), 66 deletions(-)doc/board/beagle/am62x_beagleplay.rst +4
-4@@ -23,7 +23,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: ../ti/img/boot_diagram_am62.svg +.. kernel-figure:: ../ti/img/boot_diagram_am62.svg :alt: Boot flow diagram - On this platform, 'TI Foundational Security' (TIFS) functions as the@@ -85,12 +85,12 @@ Image formats - tiboot3.bin -.. image:: ../ti/img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: ../ti/img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: ../ti/img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: ../ti/img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Additional hardware for U-Boot development@@ -172,7 +172,7 @@ Area (UDA) hardware partition of the eMMC. These components can vary significantly in size. The choice of keeping tiboot3.bin in boot0 or boot1 partition depends on A/B update requirements. -.. image:: img/beagleplay_emmc.svg +.. kernel-figure:: img/beagleplay_emmc.svg :alt: eMMC partitions and boot file organization for BeaglePlay The following are the steps from Linux shell to program eMMC:doc/board/beagle/am67a_beagley_ai.rst +3
-3@@ -23,7 +23,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: ../ti/img/boot_diagram_k3_current.svg +.. kernel-figure:: ../ti/img/boot_diagram_k3_current.svg :alt: Boot flow diagram - On this platform, 'TI Foundational Security' (TIFS) functions as the@@ -84,12 +84,12 @@ Image formats - tiboot3.bin -.. image:: ../ti/img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: ../ti/img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: ../ti/img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: ../ti/img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Additional hardware for U-Boot developmentdoc/board/beagle/j721e_beagleboneai64.rst +5
-5@@ -26,7 +26,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: ../ti/img/boot_diagram_j721e.svg +.. kernel-figure:: ../ti/img/boot_diagram_j721e.svg :alt: Boot flow diagram - On this platform, DMSC runs 'TI Foundational Security' (TIFS) which@@ -92,17 +92,17 @@ Image formats - tiboot3.bin -.. image:: ../ti/img/no_multi_cert_tiboot3.bin.svg +.. kernel-figure:: ../ti/img/no_multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: ../ti/img/dm_tispl.bin.svg +.. kernel-figure:: ../ti/img/dm_tispl.bin.svg :alt: tispl.bin image format - sysfw.itb -.. image:: ../ti/img/sysfw.itb.svg +.. kernel-figure:: ../ti/img/sysfw.itb.svg :alt: sysfw.itb image format Additional hardware for U-Boot development@@ -184,7 +184,7 @@ Area (UDA) hardware partition of the eMMC. These components can vary significantly in size. The choice of keeping tiboot3.bin in boot0 or boot1 partition depends on A/B update requirements. -.. image:: img/beagleplay_emmc.svg +.. kernel-figure:: img/beagleplay_emmc.svg :alt: eMMC partitions and boot file organization for BeagleBone AI-64 The following are the steps from Linux shell to program eMMC:doc/board/samsung/e850-96.rst +1
-1@@ -28,7 +28,7 @@ Boot Flow The boot path for Exynos850 is shown on the figure below. -.. image:: img/exynos850-boot-architecture.svg +.. kernel-figure:: img/exynos850-boot-architecture.svg :alt: Exynos850 SoC boot flow Legend:doc/board/ti/am62ax_sk.rst +3
-3@@ -47,7 +47,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_am62.svg +.. kernel-figure:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53@@ -138,12 +138,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Switch Setting for Boot Modedoc/board/ti/am62px_sk.rst +4
-4@@ -55,7 +55,7 @@ Boot Flow: The bootflow is exactly the same as all SoCs in the am62xxx extended SoC family. Below is the pictorial representation: -.. image:: img/boot_diagram_am62.svg +.. kernel-figure:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53@@ -152,12 +152,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format OSPI:@@ -181,7 +181,7 @@ over tftp and then flash those to OSPI at their respective addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw2.svg +.. kernel-figure:: img/ospi_sysfw2.svg :alt: OSPI flash partition layout A53 SPL DDR Memory Layoutdoc/board/ti/am62x_sk.rst +4
-4@@ -46,7 +46,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_am62.svg +.. kernel-figure:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53@@ -174,12 +174,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/tifsstub_dm_tispl.bin.svg +.. kernel-figure:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format OSPI:@@ -203,7 +203,7 @@ over tftp and then flash those to OSPI at their respective addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw2.svg +.. kernel-figure:: img/ospi_sysfw2.svg :alt: OSPI flash partition layout A53 SPL DDR Memory Layoutdoc/board/ti/am64x_evm.rst +4
-4@@ -35,7 +35,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_am64.svg +.. kernel-figure:: img/boot_diagram_am64.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53@@ -136,12 +136,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/nodm_tispl.bin.svg +.. kernel-figure:: img/nodm_tispl.bin.svg :alt: tispl.bin image format OSPI:@@ -165,7 +165,7 @@ over tftp and then flash those to OSPI at their respective addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw-am64.svg +.. kernel-figure:: img/ospi_sysfw-am64.svg :alt: OSPI flash partition layout Switch Setting for Boot Modedoc/board/ti/am65x_evm.rst +6
-6@@ -45,7 +45,7 @@ applications. This should happen before running Linux. 3. In production boot flow, we might not like to use full U-Boot, instead use Falcon boot flow to reduce boot time. -.. image:: img/boot_diagram_am65.svg +.. kernel-figure:: img/boot_diagram_am65.svg :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A53@@ -141,17 +141,17 @@ Image formats: - tiboot3.bin -.. image:: img/no_multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/no_multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/nodm_tispl.bin.svg +.. kernel-figure:: img/nodm_tispl.bin.svg :alt: tispl.bin image format - sysfw.itb -.. image:: img/sysfw.itb.svg +.. kernel-figure:: img/sysfw.itb.svg :alt: sysfw.itb image format eMMC:@@ -193,7 +193,7 @@ used: eMMC layout: -.. image:: img/emmc_am65x_evm_boot0.svg +.. kernel-figure:: img/emmc_am65x_evm_boot0.svg :alt: emmc boot partition layout Kernel image and DT are expected to be present in the /boot folder of rootfs.@@ -229,7 +229,7 @@ addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw.svg +.. kernel-figure:: img/ospi_sysfw.svg :alt: OSPI flash partition layout Kernel Image and DT are expected to be present in the /boot folder of UBIFSdoc/board/ti/j7200_evm.rst +5
-5@@ -34,7 +34,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A72@@ -135,12 +135,12 @@ Image formats: - tiboot3.bin -.. image:: img/j7200_tiboot3.bin.svg +.. kernel-figure:: img/j7200_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin image format Switch Setting for Boot Mode@@ -196,7 +196,7 @@ Current allocated size for tiboot3 size is 1MB, tispl is 2MB. Size of u-boot.img is taken 4MB for refernece, But this is subject to change depending upon atf, optee size -.. image:: img/emmc_j7200_evm_boot01.svg +.. kernel-figure:: img/emmc_j7200_evm_boot01.svg :alt: Traditional eMMC boot partition layout In case of UDA FS mode booting, following is layout.@@ -204,7 +204,7 @@ In case of UDA FS mode booting, following is layout. All boot images tiboot3.bin, tispl and u-boot should be written to fat formatted UDA FS as file. -.. image:: img/emmc_j7200_evm_udafs.svg +.. kernel-figure:: img/emmc_j7200_evm_udafs.svg :alt: eMMC UDA boot partition layout In case of booting from eMMC, write above images into raw or UDA FS.doc/board/ti/j721e_evm.rst +5
-5@@ -39,7 +39,7 @@ Boot Flow: Boot flow is similar to that of AM65x SoC and extending it with remoteproc support. Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_j721e.svg +.. kernel-figure:: img/boot_diagram_j721e.svg :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A72@@ -141,17 +141,17 @@ Image formats: - tiboot3.bin -.. image:: img/no_multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/no_multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin image format - sysfw.itb -.. image:: img/sysfw.itb.svg +.. kernel-figure:: img/sysfw.itb.svg :alt: sysfw.itb image format OSPI:@@ -178,7 +178,7 @@ addresses. Flash layout for OSPI: -.. image:: img/ospi_sysfw.svg +.. kernel-figure:: img/ospi_sysfw.svg :alt: OSPI flash partition layout R5 Memory Map:doc/board/ti/j721s2_evm.rst +3
-3@@ -42,7 +42,7 @@ Boot Flow: Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg - On this platform, "TI Foundational Security" (TIFS) functions as the security enclave master while "Device Manager" (DM), also known as the@@ -152,11 +152,11 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg R5 Memory Map: --------------doc/board/ti/j722s_evm.rst +3
-3@@ -32,7 +32,7 @@ Boot Flow: The bootflow is exactly the same as all SoCs in the am62xxx extended SoC family. Below is the pictorial representation: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53@@ -126,12 +126,12 @@ Image formats: - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin image format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin image format A53 SPL DDR Memory Layoutdoc/board/ti/j784s4_evm.rst +4
-4@@ -41,7 +41,7 @@ Boot Flow --------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. kernel-figure:: img/boot_diagram_k3_current.svg :alt: K3 boot flow - On this platform, "TI Foundational Security" (TIFS) functions as the@@ -158,12 +158,12 @@ Image formats - tiboot3.bin -.. image:: img/multi_cert_tiboot3.bin.svg +.. kernel-figure:: img/multi_cert_tiboot3.bin.svg :alt: tiboot3.bin format - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. kernel-figure:: img/dm_tispl.bin.svg :alt: tispl.bin format OSPI:@@ -188,7 +188,7 @@ addresses. Flash layout for OSPI NOR: -.. image:: img/ospi_sysfw3.svg +.. kernel-figure:: img/ospi_sysfw3.svg :alt: OSPI NOR flash partition layout R5 Memory Mapdoc/board/ti/k3.rst +4
-4@@ -61,7 +61,7 @@ boot media needed to load the binaries packaged inside `tiboot3.bin`, including a 32bit U-Boot SPL, (called the wakeup SPL) that ROM will jump to after it has finished loading everything into internal SRAM. -.. image:: img/boot_flow_01.svg +.. kernel-figure:: img/boot_flow_01.svg :alt: Boot flow up to wakeup domain SPL The wakeup SPL, running on a wakeup domain core, will initialize DDR and@@ -71,7 +71,7 @@ application cores inside the main domain to initialize the main domain, starting with Trusted Firmware-A (TF-A), before moving on to start OP-TEE and the main domain's U-Boot SPL. -.. image:: img/boot_flow_02.svg +.. kernel-figure:: img/boot_flow_02.svg :alt: Boot flow up to main domain SPL The main domain's SPL, running on a 64bit application core, has@@ -80,7 +80,7 @@ initialize even more peripherals needed to load in the `u-boot.img` which loads more firmware into the micro-controller & wakeup domains and finally prepare the main domain to run Linux. -.. image:: img/boot_flow_03.svg +.. kernel-figure:: img/boot_flow_03.svg :alt: Complete boot flow up to Linux This is the typical boot flow for all K3 based SoCs, however this flow@@ -691,7 +691,7 @@ generation device. The overall structure of this setup is in the following figure. -.. image:: img/openocd-overview.svg +.. kernel-figure:: img/openocd-overview.svg :alt: Overview of OpenOCD setup. .. note::doc/develop/memory.rst +2
-2@@ -69,7 +69,7 @@ SPL Flow Prior to setting up of the DRAM, the stack, malloc is defined as below possibly sitting on a smaller readily available memory (SRAM etc.): - .. image:: pics/spl_before_reloc.svg + .. kernel-figure:: pics/spl_before_reloc.svg :alt: contents of ready RAM before relocation in SPL Please see CONFIG_SPL_EARLY_BSS if BSS initialization is needed prior@@ -95,7 +95,7 @@ SPL Flow The final environment is setup and the system RAM now looks like this: - .. image:: pics/spl_after_reloc.svg + .. kernel-figure:: pics/spl_after_reloc.svg :alt: contents of DRAM after relocation in SPL Again stack and gd are an optional move and may still remain in thedoc/develop/trace.rst +5
-5@@ -111,7 +111,7 @@ Finally run kernelshark to display it (note it only works with `.dat` files!): Using this tool you can view the trace records and see the timestamp for each function. -.. image:: pics/kernelshark.png +.. kernel-figure:: pics/kernelshark.png :width: 800 :alt: Kernelshark showing function-trace records@@ -144,7 +144,7 @@ There is a -f option available to select a function graph: Again, you can use kernelshark or trace-cmd to look at the output. In this case you will see the time taken by each function shown against its exit record. -.. image:: pics/kernelshark_fg.png +.. kernel-figure:: pics/kernelshark_fg.png :width: 800 :alt: Kernelshark showing function-graph records@@ -188,11 +188,11 @@ command: You can load the .svg file into a viewer. If you use Chrome (and some other programs) you can click around and zoom in and out. -.. image:: pics/flamegraph.png +.. kernel-figure:: pics/flamegraph.png :width: 800 :alt: Chrome showing the flamegraph.pl output -.. image:: pics/flamegraph_zoom.png +.. kernel-figure:: pics/flamegraph_zoom.png :width: 800 :alt: Chrome showing zooming into the flamegraph.pl output@@ -209,7 +209,7 @@ Note that trace collection does slow down execution so the timings will be inflated. They should be used to guide optimisation. For accurate boot timings, use bootstage. -.. image:: pics/flamegraph_timing.png +.. kernel-figure:: pics/flamegraph_timing.png :width: 800 :alt: Chrome showing flamegraph.pl output with timingtools/patman/patman.rst +1
-1@@ -932,7 +932,7 @@ be sure to check out the help. Here is a sample 'progress' view: -.. image:: pics/patman.jpg +.. kernel-figure:: pics/patman.jpg :width: 800 :alt: Patman showing the progress view
PATCH v2 5/7 doc: make pdfdocs: Update kfigure sphinx extension to support inkscape as well
In reply to Adriano CarvalhoAs it is right now, kfigure relies on ImageMagick's convert. It, however, fails to convert some SVG files (see below). With this change, inkscape support is added. If present, inkscape is preferred over ImageMagick's convert.
With this change kfigure.py is an exact copy of the Linux kernel's at v6.17. I reviewed all the changes and, it seems to me that, only one change may cause trouble: logging uses a slightly different approach (logger v. kernellog).
inkscape is also added as a dependency. Dockerfile updated as well.
Without this change, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
[...]
convert: unrecognized color `context-stroke' @ warning/color.c/GetColorCompliance/1057.
convert: non-conforming drawing primitive definition `stroke' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/develop/pics/spl_before_reloc.svg /home/uboot/u-boot/doc/output/latex/spl_before_reloc.pdf
convert: unrecognized color `context-stroke' @ warning/color.c/GetColorCompliance/1057.
convert: non-conforming drawing primitive definition `stroke' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/develop/pics/spl_after_reloc.svg /home/uboot/u-boot/doc/output/latex/spl_after_reloc.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/board/ti/img/ospi_sysfw2.svg /home/uboot/u-boot/doc/output/latex/ospi_sysfw2.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/board/ti/img/ospi_sysfw-am64.svg /home/uboot/u-boot/doc/output/latex/ospi_sysfw-am64.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/board/ti/img/emmc_am65x_evm_boot0.svg /home/uboot/u-boot/doc/output/latex/emmc_am65x_evm_boot0.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/board/ti/img/ospi_sysfw.svg /home/uboot/u-boot/doc/output/latex/ospi_sysfw.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/board/ti/img/emmc_j7200_evm_boot01.svg /home/uboot/u-boot/doc/output/latex/emmc_j7200_evm_boot01.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/board/ti/img/emmc_j7200_evm_udafs.svg /home/uboot/u-boot/doc/output/latex/emmc_j7200_evm_udafs.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling: /usr/bin/convert /home/uboot/u-boot/doc/board/ti/img/ospi_sysfw3.svg /home/uboot/u-boot/doc/output/latex/ospi_sysfw3.pdf [...]
build finished with problems, 9 warnings (with warnings treated as errors).
make[1]: *** [doc/Makefile:84: latexdocs] Error 1
make: *** [Makefile:2687: pdfdocs] Error 2
To get the above the following line in /etc/ImageMagick-6/policy.xml needs to be deleted or commented out:
<policy domain="coder" rights="none" pattern="PDF" />
Otherwise, we'll get:
convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/426.
inkscape has the added advantage of this not being necessary.
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
--- doc/build/documentation.rst | 2 + doc/sphinx/kfigure.py | 212 ++++++++++++++++++++++++++---------- tools/docker/Dockerfile | 1 + 3 files changed, 158 insertions(+), 57 deletions(-)
doc/build/documentation.rst +2 -0
@@ -18,6 +18,8 @@ the following dependencies are needed to build the documentation: * texlive-xetex (if building the `PDF documentation`_ through the *pdfdocs* target) +* inkscape (if building the `PDF documentation`_ through the *pdfdocs* target) + When submitting patches for documentation always build with KDOC_WERROR=1 to treat warnings as errors.
doc/sphinx/kfigure.py +155 -57
356 lines not on this page · raw message
tools/docker/Dockerfile +1 -0
@@ -90,6 +90,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ help2man \ iasl \ imagemagick \ + inkscape \ inetutils-telnet \ iputils-ping \ libconfuse-dev \
Signature · 1 line
2.34.1
Re: [PATCH v2 5/7] doc: make pdfdocs: Update kfigure sphinx extension to support inkscape as well
Quoted 48 lines · Adriano Carvalho
As it is right now, kfigure relies on ImageMagick's convert. It, however, fails to convert some SVG files (see below). With this change, inkscape support is added. If present, inkscape is preferred over ImageMagick's convert.
With this change
kfigure.pyis an exact copy of the Linux kernel's at v6.17. I reviewed all the changes and, it seems to me that, only one change may cause trouble: logging uses a slightly different approach (logger v. kernellog).inkscape is also added as a dependency. Dockerfile updated as well.
Without this change, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
[...]
convert: unrecognized color `context-stroke' @ warning/color.c/GetColorCompliance/1057.
convert: non-conforming drawing primitive definition `stroke' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/develop/pics/spl_before_reloc.svg/home/uboot/u-boot/doc/output/latex/spl_before_reloc.pdf
convert: unrecognized color `context-stroke' @ warning/color.c/GetColorCompliance/1057.
convert: non-conforming drawing primitive definition `stroke' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/develop/pics/spl_after_reloc.svg/home/uboot/u-boot/doc/output/latex/spl_after_reloc.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/board/ti/img/ospi_sysfw2.svg/home/uboot/u-boot/doc/output/latex/ospi_sysfw2.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/board/ti/img/ospi_sysfw-am64.svg/home/uboot/u-boot/doc/output/latex/ospi_sysfw-am64.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/board/ti/img/emmc_am65x_evm_boot0.svg/home/uboot/u-boot/doc/output/latex/emmc_am65x_evm_boot0.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/board/ti/img/ospi_sysfw.svg/home/uboot/u-boot/doc/output/latex/ospi_sysfw.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/board/ti/img/emmc_j7200_evm_boot01.svg/home/uboot/u-boot/doc/output/latex/emmc_j7200_evm_boot01.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/board/ti/img/emmc_j7200_evm_udafs.svg/home/uboot/u-boot/doc/output/latex/emmc_j7200_evm_udafs.pdf
convert: non-conforming drawing primitive definition `Liberation' @ error/draw.c/RenderMVGContent/4414.
WARNING: Error #1 when calling:/usr/bin/convert/home/uboot/u-boot/doc/board/ti/img/ospi_sysfw3.svg/home/uboot/u-boot/doc/output/latex/ospi_sysfw3.pdf[...]
build finished with problems, 9 warnings (with warnings treated as errors).
make[1]: *** [doc/Makefile:84: latexdocs] Error 1
make: *** [Makefile:2687: pdfdocs] Error 2To get the above the following line in
/etc/ImageMagick-6/policy.xmlneeds to be deleted or commented out:<policy domain="coder" rights="none" pattern="PDF" />
Otherwise, we'll get:
Quoted 7 lines
convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/426.
inkscape has the added advantage of this not being necessary.
NOTE: This won't completely fix the pdfdocs target. See next commit(s).
Signed-off-by Adriano Carvalho <[email protected]>
Signature · 1 line
Tom
PATCH v2 6/7 doc: make pdfdocs: Increase the maximum list depth
In reply to Adriano CarvalhoAccording to sphinx-build's documentation, by default the maximum list depth (latex_elements.maxlistdepth in conf.py) is six, which is not enough for U-Boot's documentation, leading to errors. See below.
This commit sets maxlistdepth to ten, solving the problem.
If maxlistdepth is not set to ten, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
(myenv) uboot@35c89b9ab70e:~/u-boot$ make pdfdocs
[...]
xelatex 'android.tex'
[...]
Output written on android.pdf (28 pages).
[...]
xelatex 'api.tex'
[...]
Output written on api.pdf (431 pages).
[...]
xelatex 'arch.tex'
[...]
Output written on arch.pdf (62 pages).
[...]
xelatex 'board.tex'
[...]
[361]
! LaTeX Error: Too deeply nested.
See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help.
...
l.26806 \begin{itemize}
?
! Emergency stop.
...
[...]
Output written on board.pdf (365 pages).
Transcript written on board.log.
make[2]: *** [Makefile:29: board.pdf] Error 1
make[1]: *** [doc/Makefile:95: pdfdocs] Error 2
make: *** [Makefile:2687: pdfdocs] Error 2
This solves the problem with the pdfdocs target (in docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025 at least).
The docs have been updated as well, assuming the issues with the pdfdocs target are fixed.
--- doc/build/documentation.rst | 5 ++--- doc/conf.py | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-)
doc/build/documentation.rst +2 -3
@@ -88,9 +88,8 @@ The *pdfdocs* target is meant to be used to build PDF documentation: # Deactivate the Python environment deactivate -However, as of v2023.01 it fails with 'LaTeX Error: Too deeply nested'. - -We can use texi2pdf instead: +The *texinfodocs* target, together with *texi2pdf*, can also be used to build +PDF documentation: .. code-block:: bash
doc/conf.py +4 -0
@@ -376,6 +376,10 @@ latex_elements = { \\setromanfont{DejaVu Serif} \\setmonofont{DejaVu Sans Mono} ''', + # + # Deep nesting; tell latex to cope. + # + "maxlistdepth": "10", } # At least one book (translations) may have Asian characters
Signature · 1 line
2.34.1
PATCH v2 7/7 doc: make pdfdocs: Remove redundant "-j" option
In reply to Adriano CarvalhoThe "-j" option is specified twice which seems redundant. sphinx-build's documentation doesn't mention the use of this options twice. The "-j auto" version has been kept and the other version removed.
--- doc/Makefile | 1 - 1 file changed, 1 deletion(-)
doc/Makefile +0 -1
@@ -56,7 +56,6 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) PYTHONDONTWRITEBYTECODE=1 \ BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ $(SPHINXBUILD) \ - -j$(shell nproc) \ -b $2 \ -j auto \ -c $(abspath $(srctree)/$(src)) \
Signature · 1 line
2.34.1
Quoted 9 lines · Adriano Carvalho
This patch series address several issues that were affecting the make pdfdocs target.
In the end, the make pdfdocs could be considered fixed. It is at least with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025.
The thing is fixed only after the 6th commit. Each commit solves one issue, in the order as they appeared. I hope it makes sense.
Quoted 6 lines
Changes from v1:
- Use already in place kfigure sphinx extension instead of sphinxcontrib.inkscapeconverter.
- I have kept the dependency on inkscape because: (1) ImageMagick's convert fails to the job, and (2) it's what's done in the Linux kernel on which kfigure is based.
Can you please follow-up (or in v3 if there's real comments) with adding adding make pdfdocs to the CI targets that already do htmldocs/infodocs ? Thanks again for working on all this!
Signature · 1 line
Tom
Quoted 7 lines · Tom Rini
[...]
Can you please follow-up (or in v3 if there's real comments) with adding adding make pdfdocs to the CI targets that already do htmldocs/infodocs ? Thanks again for working on all this!--
Tom
Sure. I'll wait a bit to see if there are any comments.
Com os melhores cumprimentos. / Best regards.
Adriano Carvalho
Quoted 8 lines · Adriano Carvalho
This patch series address several issues that were affecting the make pdfdocs target.
In the end, the make pdfdocs could be considered fixed. It is at least with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025.
The thing is fixed only after the 6th commit. Each commit solves one issue, in the order as they appeared. I hope it makes sense.
Thanks for investigating the build failure.
The output seems to be separate pdfs usage.pdf, develop.pdf, ... . Does this really make sense?
I still wonder if anybody ever would use such pdf files when he can have HTML documentation. Maybe you could use the files when dealing with a regulatory authority.
Best regards
Heinrich
Quoted 46 lines
Changes from v1:
- Use already in place kfigure sphinx extension instead of sphinxcontrib.inkscapeconverter.
- I have kept the dependency on inkscape because: (1) ImageMagick's convert fails to the job, and (2) it's what's done in the Linux kernel on which kfigure is based.Signed-off-by Adriano Carvalho <[email protected]>Adriano Carvalho (7):
doc: make pdfdocs: Specify texlive-xetex as a prerequisite
doc: make pdfdocs: Update the description with the needed steps
doc: make pdfdocs: Add pip install -rtest/py/requirements.txtto the
list of needed steps
doc: make pdfdocs: Ensure SVG files are converted to PDF before the
compilation of *.tex files
doc: make pdfdocs: Update kfigure sphinx extension to support inkscape
as well
doc: make pdfdocs: Increase the maximum list depth
doc: make pdfdocs: Remove redundant "-j" optiondoc/Makefile | 1 - doc/board/beagle/am62x_beagleplay.rst | 8 +- doc/board/beagle/am67a_beagley_ai.rst | 6 +- doc/board/beagle/j721e_beagleboneai64.rst | 10 +- doc/board/samsung/e850-96.rst | 2 +- doc/board/ti/am62ax_sk.rst | 6 +- doc/board/ti/am62px_sk.rst | 8 +- doc/board/ti/am62x_sk.rst | 8 +- doc/board/ti/am64x_evm.rst | 8 +- doc/board/ti/am65x_evm.rst | 12 +- doc/board/ti/j7200_evm.rst | 10 +- doc/board/ti/j721e_evm.rst | 10 +- doc/board/ti/j721s2_evm.rst | 6 +- doc/board/ti/j722s_evm.rst | 6 +- doc/board/ti/j784s4_evm.rst | 8 +- doc/board/ti/k3.rst | 8 +- doc/build/documentation.rst | 28 ++- doc/conf.py | 4 + doc/develop/memory.rst | 4 +- doc/develop/trace.rst | 10 +- doc/sphinx/kfigure.py | 212 ++++++++++++++++------ tools/docker/Dockerfile | 2 + tools/patman/patman.rst | 2 +- 23 files changed, 252 insertions(+), 127 deletions(-)
Quoted 18 lines · Adriano Carvalho
This patch series address several issues that were affecting the make pdfdocs target.
In the end, the make pdfdocs could be considered fixed. It is at least with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025.
The thing is fixed only after the 6th commit. Each commit solves one issue, in the order as they appeared. I hope it makes sense.
Changes from v1:
- Use already in place kfigure sphinx extension instead of sphinxcontrib.inkscapeconverter.
- I have kept the dependency on inkscape because: (1) ImageMagick's convert fails to the job, and (2) it's what's done in the Linux kernel on which kfigure is based.Signed-off-by Adriano Carvalho <[email protected]>
Quoted 11 lines
Adriano Carvalho (7):
doc: make pdfdocs: Specify texlive-xetex as a prerequisite
doc: make pdfdocs: Update the description with the needed steps
doc: make pdfdocs: Add pip install -rtest/py/requirements.txtto the
list of needed steps
doc: make pdfdocs: Ensure SVG files are converted to PDF before the
compilation of *.tex files
doc: make pdfdocs: Update kfigure sphinx extension to support inkscape
as well
doc: make pdfdocs: Increase the maximum list depth
doc: make pdfdocs: Remove redundant "-j" option
Please, add a patch that runs make pdfdocs on the CI. Otherwise I would expect that it will stop building again.
Best regards
Heinrich
Quoted 26 lines
doc/Makefile | 1 - doc/board/beagle/am62x_beagleplay.rst | 8 +- doc/board/beagle/am67a_beagley_ai.rst | 6 +- doc/board/beagle/j721e_beagleboneai64.rst | 10 +- doc/board/samsung/e850-96.rst | 2 +- doc/board/ti/am62ax_sk.rst | 6 +- doc/board/ti/am62px_sk.rst | 8 +- doc/board/ti/am62x_sk.rst | 8 +- doc/board/ti/am64x_evm.rst | 8 +- doc/board/ti/am65x_evm.rst | 12 +- doc/board/ti/j7200_evm.rst | 10 +- doc/board/ti/j721e_evm.rst | 10 +- doc/board/ti/j721s2_evm.rst | 6 +- doc/board/ti/j722s_evm.rst | 6 +- doc/board/ti/j784s4_evm.rst | 8 +- doc/board/ti/k3.rst | 8 +- doc/build/documentation.rst | 28 ++- doc/conf.py | 4 + doc/develop/memory.rst | 4 +- doc/develop/trace.rst | 10 +- doc/sphinx/kfigure.py | 212 ++++++++++++++++------ tools/docker/Dockerfile | 2 + tools/patman/patman.rst | 2 +- 23 files changed, 252 insertions(+), 127 deletions(-)