Commit Graph

66 Commits

Author SHA1 Message Date
Jiaqing Zhao 0d9b08633d doc: remove usage of sre_constants in filter-known-issues.py
sre_constants is an undocumented module that deprecated in python 3.11.
The sre_constants.error exception is also exposed through re.error,
this documented one should be used instead.

Tracked-On: #8425
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2023-08-03 14:56:29 -07:00
David B. Kinder 439fc12246 doc: update doc build requirements
Verified that the newly released RTD theme is OK to use with the doc build process,
so update the requirements.txt with that and tweak the acceptable docutils versions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-11-02 14:08:06 -07:00
Junjie Mao c526cbebf1 doc: handle anonymous complex types in XML schema
The schema of scenario XMLs uses both named and anonymous complex types,
but the configdoc.xsl today only works for named complex types. That causes
improper rendering of config items related to virtio devices (whose schema
uses anonymous types) as well as wrong applicable VM icons which states
that virtio devices apply to not only post-launched VMs but also
pre-launched and service VM, which does not make sense.

This patch improves configdoc.xsl by adding support of anonymous complex
types so that they are walked through in the same way as named ones.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-27 18:26:54 -07:00
David B. Kinder 893fbfec78 doc: fix views and applicable VMs label handling in config option doc
Custom attributes in the XML schema, such as `applicable-vms` and `views`,
are designed to recursively inherit those of the parent. Thus, the
effective attribute of an element should be derived by its lowest ancestor
that has that attribute explicitly defined. Looking up only one level would
not be sufficient.

This patch updates the `configdoc.xsl` to derive the effective attributes
properly so that icons in the generated doc properly reflects what is
specified in the schema. Addresses ACRN-7347

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-10-26 07:52:26 -07:00
David B. Kinder 38f8097b54 doc: update doc build tools for Ubuntu 22.04 and Sphinx
Update known-issues processing and tweak conf.py and requirements.txt
(for PyPI package versions) to handle a broader version of
doc-generation tools (sphinx, breathe, docutils, etc.).  This should
let us move to Ubuntu 22.04 while maintaining doc-build compatibility
with older tool versions available with Ubuntu 20.04 (doxygen in particular).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-10-19 09:37:39 -07:00
David B. Kinder 3b02e2ebe2 doc: add a doc helper script
changed-docs.sh (and the accompanying awk script) shows docs changed
between a previous release branch and the current master branch, in a format that
can be used for the releae notes (a list of :ref: items).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-30 11:45:35 -07:00
Ziheng Li eb8bcb06b3 Update copyright year range in code headers
Modified the copyright year range in code, and corrected "int32_tel"
into "Intel" in two "hypervisor/include/debug/profiling.h" and
"hypervisor/include/debug/profiling_internal.h".

Tracked-On: #7559
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-07-15 11:48:35 +08:00
David B. Kinder 98a3d0d2cf doc: parameterize hidden config option doc generation
Add a configuration parameter for the xsltproc processing to decide
whether to include hidden options.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-07 17:44:04 -07:00
David B. Kinder df0f8ba997 doc: properly handle empty and skipped acrn:title
Fix how the config option doc scripts behave when encountering elements
with blank titles (used to remove extraneous headings in the
configurator UI).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-27 13:31:07 -07:00
David B. Kinder a6a8f08854 doc: adjust views processing for schema documentation
The acrn:views processing for showing which tabs an option would display
on wasn't quite right when an element AND a parent both had a views
attribute (specifically when the parent had "basic, advanced" but the
element only had "basic" or "advanced").

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-25 14:00:21 -07:00
Junjie Mao 72445d01b4 config_tools: add placeholders in input widgets
The configurator today shows "Please Input" as the placeholder of input
widgets, which is far from informative.

This patch specifies element or type specific placeholders in the XML
schema by reusing the `acrn:widget-options` annotation mechanism. For
manually-designed widgets such as ivshmem or vUART the placeholders are
added in the corresponding vue directly.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 15:50:20 +08:00
David B. Kinder 819a179247 doc: improvements to config option doc generation from schema
Reduce expression complexity when searching for applicable-vms and views
annotations and increase ancestor search distance.

Don't sort glossary options to more closely mimic order found in the
configurator.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-29 12:48:59 -07:00
David B. Kinder 205e182ae2 doc: tweak option config doc processing for missing attributes
When an element in the schema does not have an acrn:applicable-vms or
acrn:views (as opposed to having the attribute with an empty value,
acrn:views="") we need to look up the ancestors to see if any of them
have an element with such an attribute defined.  If non of the ancestors
have that attribute defined, then the intrepretation is that the element
can be found for all VMs or for both basic and advanced tabs.

Tweak the xslt processing of the schema data to option config doc to
reflect these semantics.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-28 11:30:44 -07:00
David B. Kinder f71c7a8032 doc: use DX-friendly names in configuration option documentation
Change the generated config option documentation to use the DX-friendly
names defined for the configurator UI (instead of the XML element name
hierarchy previously used).

Options are grouped by the top-level section (aka complex type) they
belong to and then sorted alphabetically with these groups.

Use badges to indicate where options can be found in the configurator UI
and whether they're applicable to the Hypervisor or Pre/Post/Service VM.
Add a custom css style for the config-option doc that puts the first
paragraph of a glossary item on the same line as the glossary term so
these badges look pretty.

Added a acrn-custom.js patch that copies the alt text for images into a
title property for images within the config-doc document.  This provides
tooltip text when hovering over the badges.

Don't display options not visible in the configurator UI (elements with
acrn:views="").

A missing acrn:views or acrn:applicable-vm means we look for an
applicable value from an ancestor element.

Add processing of a second xs:documentation element within an
xs:annotation element. This second documentation element's content will
be appended as a new paragraph to the first xs:documentation content in
the generated documentation. Only the first xs:documentation element is
used by the Configurator for its tooltips.

Update documents that were referring to options by their XML names.

Because we're now using a glossary to provide links to config options,
we can't duplicate option names or glosary names anywhere in the doc
set.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-28 07:56:35 -07:00
David B. Kinder 81336a8ee4 doc: use Sphinx extension for showing last updated date in footers
Remove the proof-of-concept shell script that post-processes the
generated HTML to add the git date when the corresponding .rst file as
the last modified date, augmenting the existing published date.

Instead, use a custom last_updated.py Sphinx extension that's integrated
into the Sphinx build itself. Remove the old fix-git-modified-date.sh
script and calls to it.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-03-18 11:05:50 -07:00
Junjie Mao 0e225c4b23 config_tools: add a slicer of XML schema
We plan to add the following attributes to element definitions in the XML
schema:

  - acrn:applicable-vms, which specify if an element applies to a
    pre-launched VM, the service VM or a post-launched VM

  - acrn:views, which specify if an element shall appear in the basic or
    advanced tab in the configurator.

In order to reduce the attributes above to existing XML technologies, we
need to create new complex types that lists all config items that applies
to a pre-launched VM, the service VM or a post-launched VM, or that should
be shown in the basic or advanced view. Such types can then be used to
replace the original, all-in-one type during validation or configurator
rendering.

When unspecified, an element always applies under all possible
circumstances.

To realize this slicing mechanism, this patch adds a generic class
implementing the common part of slicing XML schema types and two
specific-purpose slicers according to the applicable VMs or views
attributes.

v2 -> v3:

  * Update configdoc.xsl to recognize types in xs:alternative nodes.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
David B. Kinder d1b2b58b19 doc: limit search engines scan on older content
Update robots.txt to exclude older documentation versions: 0.? 1.? and 2.0 through 2.4

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-02-22 11:30:14 -08:00
David B. Kinder 8fb3ca83a6 doc: update last updated information on page footers
The "Last Updated" footer shows the date the page was published, not
when the content was last updated. This has caused readers some
confusion.  Update the footer with the date of the git commit that last
updated the document, and clarify with both the last modified and
published dates in the footer, something like this:

   Last modified: Aug 19, 2021. Published: Nov 03, 2021.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-11-03 19:10:56 -07:00
David B. Kinder abb564ba41 doc: add top-level redirect
* Add a script for creating top-level redirects on the
  projectacrn.github.io site.
* Use it to generate the top-level index.html redirect to
  latest/index.html in the Makefile (for make publsh).
* Generate a new redirect for hardware.html to catch inbound links.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-28 13:22:14 -07:00
David B. Kinder e0bb4c800d doc: tweak python requirements for doc building
Add compatible version ranges for breathe and sphinx to appease check by
show-versions.py

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-19 18:20:36 -07:00
David B. Kinder e2e33f76b9 doc: update to sphinx_rtd_theme 1.0
The sphinx_rtd_theme 1.0 includes simplified configuration for Google
analytics, along with general fixes and improvements.

Anyone publishing project documentation to projectacrn.github.io must be
using this updated sphinx_rtd_theme for Google Analytics data to be
properly collected.

* Switch to use this new theme version, and clean up the previous method
  of collecting analytics data.
* Update requirements.txt to use this new theme version. Update the
  show-versions.py script (used to report on installed doc building tools)
  to also report if there's a mismatch on which version is expected (in
  requirements.txt) and what's currently installed.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-19 13:04:01 -07:00
David B. Kinder 24b555c75d doc: remove doc dependency on kerneldoc and acrn-kernel repo
We no longer need to generate API documentation for the upstreamed
gvt-g kernel additions so we can remove the doc generation dependency on
the acrn-kernel repo (and all use of the kerneldoc extension). We also
remove GVT-g API documentation and porting guide that are obsolete with
ACRN v2.6 and referenced this API documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-07-14 18:56:07 -07:00
David B. Kinder a061ce1aef doc: fix config option display
Seperate options with simple types with a heading so they don't get
hidden under the previous options that are part of a complex type.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-09 14:47:17 -04:00
David B. Kinder 0e317d56bf doc: clean up PDF generation for ACRN docs
PRs #5945 and #5949 introduced fixes to the doc building process to
support PDF generation of the documentation set.  This PR refines the
doc build process, cleaning up the Makefile, adding display of tool
version information, and updates the doc building documentation to
include additional dependencies needed for building the PDF and
instructions for how to build the PDF.  The latexpdf make target is
provided to just run the latex and PDF producing process that depends on
the HTML artifacts from a make html run.  A new make pdf target is
provided that combines the two steps into one.

A new know-issues pattern file is added that verifies the expected
output from the latexpdf process is returned, as it can't be completely
eliminated without losing potential error messages that need to be
resolved.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-04-26 19:50:44 -07:00
David B. Kinder ea9c713f28 doc: fix misspellings in config option doc
Some terms in the config option docs (Integer, Boolean) are being
flagged by one of our spell checking tools.  Let's make it happy.

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-15 12:14:32 -08:00
David B. Kinder 07f4b9f5eb doc: cleanup xsd-derived config doc text
Start cleaning up formatting and content layout issues in the
xsd-derived configuration option documentation.  Includes adding
documentation for unnamed embedded simple types within an element (and
updates to the XSLT transformation to display these), cleanup of element
and type documentation, typos and description clarity.

Improved xsdl translation to automatically include default values and if
an option is optional (instead of manually documenting this in the
description text).

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-04 10:04:56 -08:00
David B. Kinder c741468b9c doc: remove Kconfig reference documentation
With the new ACRN configuration architecture, we no longer use Kconfig
files.  Remove the Kconfig option documentation scripting (genrest.py)
Python dependencies, and Makefile commands, and change references in the
documentation from the Kconfig option (such as
:option:`CONFIG_MEM_LOGLEVEL`) to the new schema definition-based option
documentation (:option:`hv.DEBUG_OPTION.MEM_LOGLEVEL`).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-03 09:01:40 -08:00
Yang, Yu-chu f1c339df2a doc: integrate config xsl transform into doc build
Documentation for the scenario XML configuration options is pulled from the
schema definition files (xsd) maintained in the misc/config_tools/schema
folder.  Update the doc build process to generate and incorporate the
option documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-01 09:27:02 +08:00
David B. Kinder b74b4cd53d doc: upgrade doc-build tools
Update the documentation for how to build ACRN documents
(tutorial/docbuild.rst) and the scripts/requirements.txt that lists the
tested configuration of python tools being used.

Previous merged commits have already been made to handle doc builds with
the previous (2.3 documented configuration and the new v2.4
configuration.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-31 14:56:17 -08:00
Geoffroy Van Cutsem 070be0aa99 doc: specify the version of 'sphinx-tabs' to install
Specify the version of 'sphinx-tabs' to be installed in order
to be able to build the documentation. Without this, the latest
is installed but is incompatible with 'sphinx==1.7.7' as specified
in our doc/scripts/requirements' file.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-12-21 09:35:18 -08:00
David B. Kinder f6e978c795 doc: add copyright/license header to doc scripts
Tracked-On: #5113

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-07-29 19:08:02 -07:00
David B. Kinder 426c214733 doc: add sphinx-tabs extension
The sphinx-tabs extension let's us create a document that can
dynamically display alternate material based on clicking a tab, as used
in the Zephyr getting started guide:
https://docs.zephyrproject.org/latest/getting_started/index.html

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-21 12:14:00 -07:00
David B. Kinder a29ef9178e doc: remove /404.html redirect
Using a root-level /404.html as a redirect to the /latest/404.html
causes the URL shown in the browser to change so you can't see what the
error-causing URL was.  Instead of a redirect, copy the /latest/404.html
generated by Sphinx to /404.html and edited with a <base> tag that
specifies a base URL for all relative URLs on a page.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-09 14:21:46 -07:00
David B. Kinder 88a5212396 doc: update robots.txt exclusion list
Developers using google search can accidentally find older versions of
documents and lead to confusion.  While we do maintain previous release
documentation on the site, we should have a preference for the latest
documentation when using external search engines.  (Note the on-site
search always returns version-specific results.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-08 18:22:48 -07:00
David B. Kinder b67d88cab3 doc: fix 404 processing
Some additional tweaks to the publish script, image, and root-level
redirect to fix a redirect recursion problem.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-08 14:37:04 -07:00
David B. Kinder f2098ee186 doc: add copyright/license header to doc scripts
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-08 15:29:23 -08:00
David B. Kinder 52304348d6 doc: doc build errors not being reported
PR #3665 moved all the doc build artifacts into the _build folder and
updated scripts and Makefile to account for this, except missed a fix in
the script that checks for known issues. This patch fixes that but shows
we've got a bunch of issues that have not been being reported so we'll
need to fix those problems to resolve failing doc builds.

Also fixed process of the VERSION file in conf.py since the path to that
file was changed by PR #3665 as well and was raising an exeception that
was being masked.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 17:28:26 -07:00
Geoffroy Van Cutsem 1794d994b6 doc: update doc generation tooling to only work within the $BUILDDIR
Modify the documentation Makefile (doc/Makefile) and scripts to only modify and
create content inside the $BUILDDIR folder.

The folders that were created inside 'doc/' previously are now all created
inside '$BUILDDIR/rst'. The '.gitignore' file has also been updated accordingly.

Tracked-On: #3686
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-10-14 17:26:48 -04:00
David B. Kinder df465cc1df doc: update robots.txt to exclude old docs
Exclude older documentation from search engines (< 1.0)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-25 14:24:16 -07:00
lirui34 ffa7f80544 doc: Add tutorial to learn to sign binaries of a Clear Linux image.
This tutorial will describe steps to sign binaries of
a Clear Linux image that allows user to launch VM
throught the secure boot enabled OVMF.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-07-19 12:10:23 -07:00
David B. Kinder be44e138fd doc: update WaaG doc
Update batch script documentation and add reference to source of
material.  Also some grammar cleanup in a few places.

Include an updated install_by_vga_gsg.tar.gz with an updated script with
copyright/licensing added.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-07-19 12:09:08 -07:00
ruix.li 7990f52f59 doc: Add introduction of using Windows Guest OS
Add introduction of using Windows Guest OS

Tracked-On: #3341
Signed-off-by: ruix.li <ruix.li@intel.com>
2019-07-17 09:10:10 -07:00
David B. Kinder e30cd45261 doc: tweak home page redirect to latest
Try to reduce the page flash when redirecting to latest/index.html

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-10 16:26:08 -07:00
David B. Kinder c09046abbf doc: add robots.txt
use a robots.txt file to prevent search engines from indexing old
content.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-04 15:51:27 -07:00
Geoffroy Van Cutsem 7d4ba5d7f7 Documentation build tools: update min version for kconfiglib
Versions of kconfiglib lower than 10.2 cannot build the documentation
correctly. The minimum version required is >=10.2. This patch updates
the 'requirements.txt' accordingly.

Tracked-On: #2429
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-01-28 16:53:24 -08:00
Geoffroy Van Cutsem d3d474cf1e Documentation generation: update kernel-doc script to latest
Update the 'kernel-doc' script to the latest version available from
https://github.com/projectacrn/acrn-kernel.

This solves the following error when generating the ACRN documentation:
"Unescaped left brace in regex is deprecated here (and will be fatal in Perl
5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE .*})/ at
scripts/kernel-doc line 2176."

Tracked-On: #1926
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-11-28 12:01:25 -08:00
David B. Kinder 6dffef12d9 doc: filter error exit status incorrect
When the doc log is scanned for potential "new" errors, if any are found
it wasn't returning a non-zero error code.

Tracked-on: #1514

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-10-25 13:38:11 -07:00
David B. Kinder 8e21d5ee99 doc: update genrest script for latest kconfiglib
The genrest.py script (used to generate config documentation from the
Kconfig files) broke when upgrading to the latest kconfiglib (10.9.1).
Copied the latest genrest.py script from the Zephyr project (where this
script and processing was developed) and things work again.

Update Makefile's call to genrest.py (toplevel Kconfig path is now found
relative to the srctree.

Update requirements.txt to match the kconfiglib version family
verified to work.

fixes: #1387

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>

Documentation scripts: enhance 'show-versions.py'

Modify the doc/scripts/show-versions.py script by making it
gather the list of Python modules to check the version for from
the "requirements.txt" file. It should help keep this in sync
if/when our requirements evolve.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-10-04 14:25:00 -07:00
David B. Kinder 1c0a05705f doc: update genrest script for latest kconfiglib
The genrest.py script (used to generate config documentation from the
Kconfig files) broke when upgrading to the latest kconfiglib (10.9.1).
Copied the latest genrest.py script from the Zephyr project (where this
script and processing was developed) and things work again.

Also update requirements.txt to match the kconfiglib version verified to
work.

tracked-on: #1387

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-10-04 14:25:00 -07:00
David B. Kinder 68ce114b43 doc: add tool for verifying installed doc tools
Added a python script that displays versions of doc building tools
(e.g., doxygen, breathe, sphinx) to help verify doc building environment
is properly set up (can help doc building problem diagnostic, as shown
in issue #1333

Update doc build documentation to reference this script.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-26 13:34:25 -07:00