doc: update compile-time configuration HLD

Starting from v2.4, ACRN configuration uses solely XML files to store
configuration data and customized scripts to manipulate
configurations. This patch updates the HLD of compile-time configuration to
reflect this properly.

As the refinement to the configuration toolset itself is still ongoing,
this patch only adds brief introduction to the key generated files involved
in ACRN configuration. More details will be added after the refinement
completes.

Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Benjamin Fitch <benjamin.fitch@intel.com>
This commit is contained in:
Junjie Mao 2021-03-05 16:28:51 +08:00 committed by fitchbe
parent c94c6c633e
commit 5df65eeb19
2 changed files with 31 additions and 41 deletions

View File

@ -3,54 +3,44 @@
Compile-Time Configuration Compile-Time Configuration
########################## ##########################
.. note:: With ACRN release 2.4, ACRN configuration has changed As described in :ref:`acrn_configuration_tool`, ACRN hypervisor configurations
significantly and no longer uses Kconfig. The following information is are saved as XML files and used for compilation. At compile-time, configuration
obsolete and will be updated to reflect the new ACRN configuration data in the board and scenario XMLs are converted to C header and source files
architecture and tools. that define macros, variables, and data structures to which the hypervisor can
Refer to :ref:`scenario-config-options` for a complete list of configuration symbols. refer. This conversion has two main steps:
The hypervisor provides a kconfig-like way for manipulating compile-time 1. **Static allocation of resources**, which statically reserves resources for
configurations. Basically the hypervisor defines a set of configuration the VMs if only high-level requirements are given in the scenario
symbols and declare their default value. A configuration file is configurations. Examples include the runtime base address of the hypervisor
created, containing the values of each symbol, before building the image and PCI BDF addresses of ivshmem virtual devices.
sources.
Similar to Linux kconfig, there are three files involved: #. **Generation of C files**, which places the configuration data in the data
types and structures defined by the hypervisor.
- **.config** This files stores the values of all configuration Some key files, which can be found under the build directory of the hypervisor,
symbols. are as follows.
- **config.mk** This file is a conversion of .config in Makefile - **.board.xml** and **.scenario.xml** These files contain the configuration
syntax, and can be included in makefiles so that the build data used by that build.
process can rely on the configurations.
- **config.h** This file is a conversion of .config in C syntax, and is - **configs/allocation.xml** contains the results of the static allocation.
automatically included in every source file so that the values of
the configuration symbols are available in the sources.
.. figure:: images/config-image103.png - **configs/config.mk** This file is a conversion of the hypervisor feature
:align: center configurations (specified in the scenario XML) in Makefile syntax, and can be
:name: config-build-workflow included in makefiles so that the build process can rely on the
configurations.
Hypervisor configuration and build workflow - **include/config.h** This file is a conversion of the hypervisor feature
configurations in C header syntax, and is automatically included in every
source file so that the values of the configuration symbols are available in
the sources.
:numref:`config-build-workflow` shows the workflow of building the - **configs/boards** and **configs/scenarios** contain all the other generated C
hypervisor: headers and sources that encode the configuration data in the XML files.
1. Three targets are introduced for manipulating the configurations. Whenever ``.board.xml`` or ``.scenario.xml`` is modified, the hypervisor will be
rebuilt upon the next invocation of ``make``.
a. **defconfig** creates a .config based on a predefined
configuration file.
b. **oldconfig** updates an existing .config after creating one if it
does not exist.
c. **menuconfig** presents a terminal UI to navigate and modify the
configurations in an interactive manner.
2. The target oldconfig is also used to create a .config if a .config
file does not exist when building the source directly.
3. The other two files for makefiles and C sources are regenerated after
.config changes.
For the concept and usage of the configuration toolset, refer to
:ref:`acrn_configuration_tool`. For a complete list of configuration symbols,
refer to :ref:`scenario-config-options`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB