···2424 - How to do DMA with ISA (and LPC) devices.2525DMA-attributes.txt2626 - listing of the various possible attributes a DMA region can have2727-DocBook/2828- - directory with DocBook templates etc. for kernel documentation.2927EDID/3028 - directory with info on customizing EDID for broken gfx/displays.3129IPMI.txt···3739Intel-IOMMU.txt3840 - basic info on the Intel IOMMU virtualization support.3941Makefile4040- - It's not of interest for those who aren't touching the build system.4141-Makefile.sphinx4242 - It's not of interest for those who aren't touching the build system.4343PCI/4444 - info related to PCI drivers.
···11+# -*- makefile -*-22+# Makefile for Sphinx documentation33+#44+15subdir-y :=66+77+# You can set these variables from the command line.88+SPHINXBUILD = sphinx-build99+SPHINXOPTS =1010+SPHINXDIRS = .1111+_SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(srctree)/Documentation/*/conf.py))1212+SPHINX_CONF = conf.py1313+PAPER =1414+BUILDDIR = $(obj)/output1515+PDFLATEX = xelatex1616+LATEXOPTS = -interaction=batchmode1717+1818+# User-friendly check for sphinx-build1919+HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)2020+2121+ifeq ($(HAVE_SPHINX),0)2222+2323+.DEFAULT:2424+ $(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)2525+ @echo " SKIP Sphinx $@ target."2626+2727+else # HAVE_SPHINX2828+2929+# User-friendly check for pdflatex3030+HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)3131+3232+# Internal variables.3333+PAPEROPT_a4 = -D latex_paper_size=a43434+PAPEROPT_letter = -D latex_paper_size=letter3535+KERNELDOC = $(srctree)/scripts/kernel-doc3636+KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)3737+ALLSPHINXOPTS = $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)3838+# the i18n builder cannot share the environment and doctrees with the others3939+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .4040+4141+# commands; the 'cmd' from scripts/Kbuild.include is not *loopable*4242+loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;4343+4444+# $2 sphinx builder e.g. "html"4545+# $3 name of the build subfolder / e.g. "media", used as:4646+# * dest folder relative to $(BUILDDIR) and4747+# * cache folder relative to $(BUILDDIR)/.doctrees4848+# $4 dest subfolder e.g. "man" for man pages at media/man4949+# $5 reST source folder relative to $(srctree)/$(src),5050+# e.g. "media" for the linux-tv book-set at ./Documentation/media5151+5252+quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)5353+ cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \5454+ PYTHONDONTWRITEBYTECODE=1 \5555+ BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \5656+ $(SPHINXBUILD) \5757+ -b $2 \5858+ -c $(abspath $(srctree)/$(src)) \5959+ -d $(abspath $(BUILDDIR)/.doctrees/$3) \6060+ -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \6161+ $(ALLSPHINXOPTS) \6262+ $(abspath $(srctree)/$(src)/$5) \6363+ $(abspath $(BUILDDIR)/$3/$4)6464+6565+htmldocs:6666+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))6767+6868+linkcheckdocs:6969+ @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))7070+7171+latexdocs:7272+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))7373+7474+ifeq ($(HAVE_PDFLATEX),0)7575+7676+pdfdocs:7777+ $(warning The '$(PDFLATEX)' command was not found. Make sure you have it installed and in PATH to produce PDF output.)7878+ @echo " SKIP Sphinx $@ target."7979+8080+else # HAVE_PDFLATEX8181+8282+pdfdocs: latexdocs8383+ $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)8484+8585+endif # HAVE_PDFLATEX8686+8787+epubdocs:8888+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))8989+9090+xmldocs:9191+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))9292+9393+endif # HAVE_SPHINX9494+9595+# The following targets are independent of HAVE_SPHINX, and the rules should9696+# work or silently pass without Sphinx.9797+9898+# no-ops for the Sphinx toolchain9999+sgmldocs:100100+ @:101101+psdocs:102102+ @:103103+mandocs:104104+ @:105105+installmandocs:106106+ @:107107+108108+cleandocs:109109+ $(Q)rm -rf $(BUILDDIR)110110+ $(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media clean111111+112112+dochelp:113113+ @echo ' Linux kernel internal documentation in different formats from ReST:'114114+ @echo ' htmldocs - HTML'115115+ @echo ' latexdocs - LaTeX'116116+ @echo ' pdfdocs - PDF'117117+ @echo ' epubdocs - EPUB'118118+ @echo ' xmldocs - XML'119119+ @echo ' linkcheckdocs - check for broken external links (will connect to external hosts)'120120+ @echo ' cleandocs - clean all generated files'121121+ @echo122122+ @echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'123123+ @echo ' valid values for SPHINXDIRS are: $(_SPHINXDIRS)'124124+ @echo125125+ @echo ' make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build'126126+ @echo ' configuration. This is e.g. useful to build with nit-picking config.'
-130
Documentation/Makefile.sphinx
···11-# -*- makefile -*-22-# Makefile for Sphinx documentation33-#44-55-# You can set these variables from the command line.66-SPHINXBUILD = sphinx-build77-SPHINXOPTS =88-SPHINXDIRS = .99-_SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(srctree)/Documentation/*/conf.py))1010-SPHINX_CONF = conf.py1111-PAPER =1212-BUILDDIR = $(obj)/output1313-PDFLATEX = xelatex1414-LATEXOPTS = -interaction=batchmode1515-1616-# User-friendly check for sphinx-build1717-HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)1818-1919-ifeq ($(HAVE_SPHINX),0)2020-2121-.DEFAULT:2222- $(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)2323- @echo " SKIP Sphinx $@ target."2424-2525-else ifneq ($(DOCBOOKS),)2626-2727-# Skip Sphinx build if the user explicitly requested DOCBOOKS.2828-.DEFAULT:2929- @echo " SKIP Sphinx $@ target (DOCBOOKS specified)."3030-3131-else # HAVE_SPHINX3232-3333-# User-friendly check for pdflatex3434-HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)3535-3636-# Internal variables.3737-PAPEROPT_a4 = -D latex_paper_size=a43838-PAPEROPT_letter = -D latex_paper_size=letter3939-KERNELDOC = $(srctree)/scripts/kernel-doc4040-KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)4141-ALLSPHINXOPTS = $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)4242-# the i18n builder cannot share the environment and doctrees with the others4343-I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .4444-4545-# commands; the 'cmd' from scripts/Kbuild.include is not *loopable*4646-loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;4747-4848-# $2 sphinx builder e.g. "html"4949-# $3 name of the build subfolder / e.g. "media", used as:5050-# * dest folder relative to $(BUILDDIR) and5151-# * cache folder relative to $(BUILDDIR)/.doctrees5252-# $4 dest subfolder e.g. "man" for man pages at media/man5353-# $5 reST source folder relative to $(srctree)/$(src),5454-# e.g. "media" for the linux-tv book-set at ./Documentation/media5555-5656-quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)5757- cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \5858- PYTHONDONTWRITEBYTECODE=1 \5959- BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \6060- $(SPHINXBUILD) \6161- -b $2 \6262- -c $(abspath $(srctree)/$(src)) \6363- -d $(abspath $(BUILDDIR)/.doctrees/$3) \6464- -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \6565- $(ALLSPHINXOPTS) \6666- $(abspath $(srctree)/$(src)/$5) \6767- $(abspath $(BUILDDIR)/$3/$4)6868-6969-htmldocs:7070- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))7171-7272-linkcheckdocs:7373- @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))7474-7575-latexdocs:7676- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))7777-7878-ifeq ($(HAVE_PDFLATEX),0)7979-8080-pdfdocs:8181- $(warning The '$(PDFLATEX)' command was not found. Make sure you have it installed and in PATH to produce PDF output.)8282- @echo " SKIP Sphinx $@ target."8383-8484-else # HAVE_PDFLATEX8585-8686-pdfdocs: latexdocs8787- $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)8888-8989-endif # HAVE_PDFLATEX9090-9191-epubdocs:9292- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))9393-9494-xmldocs:9595- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))9696-9797-endif # HAVE_SPHINX9898-9999-# The following targets are independent of HAVE_SPHINX, and the rules should100100-# work or silently pass without Sphinx.101101-102102-# no-ops for the Sphinx toolchain103103-sgmldocs:104104- @:105105-psdocs:106106- @:107107-mandocs:108108- @:109109-installmandocs:110110- @:111111-112112-cleandocs:113113- $(Q)rm -rf $(BUILDDIR)114114- $(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media clean115115-116116-dochelp:117117- @echo ' Linux kernel internal documentation in different formats (Sphinx):'118118- @echo ' htmldocs - HTML'119119- @echo ' latexdocs - LaTeX'120120- @echo ' pdfdocs - PDF'121121- @echo ' epubdocs - EPUB'122122- @echo ' xmldocs - XML'123123- @echo ' linkcheckdocs - check for broken external links (will connect to external hosts)'124124- @echo ' cleandocs - clean all generated files'125125- @echo126126- @echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'127127- @echo ' valid values for SPHINXDIRS are: $(_SPHINXDIRS)'128128- @echo129129- @echo ' make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build'130130- @echo ' configuration. This is e.g. useful to build with nit-picking config.'
-90
Documentation/doc-guide/docbook.rst
···11-DocBook XML [DEPRECATED]22-========================33-44-.. attention::55-66- This section describes the deprecated DocBook XML toolchain. Please do not77- create new DocBook XML template files. Please consider converting existing88- DocBook XML templates files to Sphinx/reStructuredText.99-1010-Converting DocBook to Sphinx1111-----------------------------1212-1313-Over time, we expect all of the documents under ``Documentation/DocBook`` to be1414-converted to Sphinx and reStructuredText. For most DocBook XML documents, a good1515-enough solution is to use the simple ``Documentation/sphinx/tmplcvt`` script,1616-which uses ``pandoc`` under the hood. For example::1717-1818- $ cd Documentation/sphinx1919- $ ./tmplcvt ../DocBook/in.tmpl ../out.rst2020-2121-Then edit the resulting rst files to fix any remaining issues, and add the2222-document in the ``toctree`` in ``Documentation/index.rst``.2323-2424-Components of the kernel-doc system2525------------------------------------2626-2727-Many places in the source tree have extractable documentation in the form of2828-block comments above functions. The components of this system are:2929-3030-- ``scripts/kernel-doc``3131-3232- This is a perl script that hunts for the block comments and can mark them up3333- directly into reStructuredText, DocBook, man, text, and HTML. (No, not3434- texinfo.)3535-3636-- ``Documentation/DocBook/*.tmpl``3737-3838- These are XML template files, which are normal XML files with special3939- place-holders for where the extracted documentation should go.4040-4141-- ``scripts/docproc.c``4242-4343- This is a program for converting XML template files into XML files. When a4444- file is referenced it is searched for symbols exported (EXPORT_SYMBOL), to be4545- able to distinguish between internal and external functions.4646-4747- It invokes kernel-doc, giving it the list of functions that are to be4848- documented.4949-5050- Additionally it is used to scan the XML template files to locate all the files5151- referenced herein. This is used to generate dependency information as used by5252- make.5353-5454-- ``Makefile``5555-5656- The targets 'xmldocs', 'psdocs', 'pdfdocs', and 'htmldocs' are used to build5757- DocBook XML files, PostScript files, PDF files, and html files in5858- Documentation/DocBook. The older target 'sgmldocs' is equivalent to 'xmldocs'.5959-6060-- ``Documentation/DocBook/Makefile``6161-6262- This is where C files are associated with SGML templates.6363-6464-How to use kernel-doc comments in DocBook XML template files6565-------------------------------------------------------------6666-6767-DocBook XML template files (\*.tmpl) are like normal XML files, except that they6868-can contain escape sequences where extracted documentation should be inserted.6969-7070-``!E<filename>`` is replaced by the documentation, in ``<filename>``, for7171-functions that are exported using ``EXPORT_SYMBOL``: the function list is7272-collected from files listed in ``Documentation/DocBook/Makefile``.7373-7474-``!I<filename>`` is replaced by the documentation for functions that are **not**7575-exported using ``EXPORT_SYMBOL``.7676-7777-``!D<filename>`` is used to name additional files to search for functions7878-exported using ``EXPORT_SYMBOL``.7979-8080-``!F<filename> <function [functions...]>`` is replaced by the documentation, in8181-``<filename>``, for the functions listed.8282-8383-``!P<filename> <section title>`` is replaced by the contents of the ``DOC:``8484-section titled ``<section title>`` from ``<filename>``. Spaces are allowed in8585-``<section title>``; do not quote the ``<section title>``.8686-8787-``!C<filename>`` is replaced by nothing, but makes the tools check that all DOC:8888-sections and documented functions, symbols, etc. are used. This makes sense to8989-use when you use ``!F`` or ``!P`` only and want to verify that all documentation9090-is included.
···66# pnmttologo: Convert pnm files to logo files77# conmakehash: Create chartable88# conmakehash: Create arrays for initializing the kernel console tables99-# docproc: Used in Documentation/DocBook1010-# check-lc_ctype: Used in Documentation/DocBook99+# docproc: Used in Documentation/11101211HOST_EXTRACFLAGS += -I$(srctree)/tools/include1312···2829always := $(hostprogs-y) $(hostprogs-m)29303031# The following hostprogs-y programs are only build on demand3131-hostprogs-y += unifdef docproc check-lc_ctype3232+hostprogs-y += unifdef docproc32333334# These targets are used internally to avoid "is up to date" messages3434-PHONY += build_unifdef build_docproc build_check-lc_ctype3535+PHONY += build_unifdef build_docproc3536build_unifdef: $(obj)/unifdef3637 @:3738build_docproc: $(obj)/docproc3838- @:3939-build_check-lc_ctype: $(obj)/check-lc_ctype4039 @:41404241subdir-$(CONFIG_MODVERSIONS) += genksyms
-11
scripts/check-lc_ctype.c
···11-/*22- * Check that a specified locale works as LC_CTYPE. Used by the33- * DocBook build system to probe for C.UTF-8 support.44- */55-66-#include <locale.h>77-88-int main(void)99-{1010- return !setlocale(LC_CTYPE, "");1111-}