Skip to content

Commit 5083aba

Browse files
committed
doc: review edits for config tool doc
Update material from PR #3559 with review and clarity edits. Added review comments. Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
1 parent ede5988 commit 5083aba

File tree

2 files changed

+99
-75
lines changed

2 files changed

+99
-75
lines changed

doc/develop.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ Develop using ACRN
77
Configuration Tools
88
*******************
99

10-
- Offline configuration Tool (under developmemnt)
10+
.. toctree::
11+
:maxdepth: 1
12+
13+
tutorials/acrn_configuration_tool
1114

1215
Configuration Tutorials
1316
***********************
@@ -23,7 +26,6 @@ Configuration Tutorials
2326
tutorials/using_partition_mode_on_up2
2427
tutorials/using_sdc2_mode_on_nuc
2528
tutorials/using_hybrid_mode_on_nuc
26-
tutorials/acrn_configuration_tool
2729

2830
User VM Tutorials
2931
*****************

doc/tutorials/acrn_configuration_tool.rst

Lines changed: 95 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,132 +3,154 @@
33
ACRN Configuration Tool
44
#######################
55

6+
.. note:: This document is under development and planned for the 1.3
7+
release.
8+
9+
610
ACRN Configurations Introduction
711
********************************
8-
There are three types of configurations in ACRN: Hypervisor configurations,
9-
Board configurations and VM configurations.
12+
There are three types of configurations in ACRN: Hypervisor,
13+
Board, and VM. We'll explore each of these in the following sections.
1014

11-
Hypervisor configurations
12-
=========================
13-
Hypervisor configurations is used to select working scenario and target board,
14-
configure features and capabilities, set up log and serial port etc. to build
15-
differential hypervisor image for different board.
15+
Hypervisor configuration
16+
========================
17+
Hypervisor configuration selects a working scenario and target
18+
board by configuring the hypervisor image features and capabilities such as
19+
setting up the log and the serial port.
1620

17-
Hypervisor configurations is configured by ``Kconfig`` mechanism.
18-
The configuration file is located at::
21+
Hypervisor configuration is done using the ``Kconfig`` ``make
22+
menuconfig`` mechanism. The configuration file is located at::
1923

2024
acrn-hypervisor/hypervisor/arch/x86/configs/Kconfig
2125

22-
A defconfig file which located at::
26+
A board-specific ``defconfig`` file, located at::
2327

2428
acrn-hypervisor/hypervisor/arch/x86/configs/$(BOARD)/$(BOARD).config
2529

26-
will be loaded first as the default ``Kconfig`` for the specified board.
30+
will be loaded first, as the default ``Kconfig`` for the specified board.
2731

28-
Board configurations
29-
====================
30-
Board configurations is used to store board related configurations that referenced
31-
by ACRN hypervisor, including scenario irrelevant information and scenario relevant
32-
information. Scenario irrelevant information is hardware specific, like ACPI/PCI
33-
BDF info/.etc. Scenario relevant information is board settings in each scenario
34-
like root device selection/kernel cmdline. The board configuration is organized
35-
as ``*.c/*.h`` file and located at::
32+
Board configuration
33+
===================
34+
The board configuration stores board-specific settings referenced by the
35+
ACRN hypervisor. This includes *scenario-relevant* information such as
36+
board settings, root device selection, and kernel cmdline, and
37+
*scenario-irrelevant** hardware-specific information such as ACPI/PCI
38+
and BDF information. The board configuration is organized as
39+
``*.c/*.h`` files located at::
3640

3741
acrn-hypervisor/hypervisor/arch/x86/$(BOARD)/
3842

39-
VM configurations
43+
VM configuration
4044
=================
41-
VM configurations includes scenario based VM configurations and launch script
42-
based VM configurations. The former one is used to describe characteristic/attributes
43-
of the VM on each user scenario, another is launch script parameters for device model
44-
to launch post-launched User VM. Scenario based VM configurations is organized
45-
as ``*.c/*.h`` file and located at::
45+
VM configuration includes *scenario-based* VM configuration
46+
information, used to describe the characteristics and attributes for VMs
47+
on each user scenario, and *launch script-based* VM configuration, where
48+
parameters are passed to the device model to launch post-launched User
49+
VMs.
50+
51+
Scenario based VM configurations are organized
52+
as ``*.c/*.h`` files located at::
4653

4754
acrn-hypervisor/hypervisor/scenarios/$(SCENARIO)/
4855

4956
User VM launch script samples are located at::
5057

5158
acrn-hypervisor/devicemodel/samples/
5259

53-
Configuration Tool Working Flow
54-
*******************************
60+
Configuration tool workflow
61+
***************************
5562

56-
Kconfig
57-
=======
58-
Hypervisor configurations is based on ``Kconfig`` ``make menuconfig`` mechanism,
59-
user could configure it in menuconfig GUI by using ``make menuconfig``
60-
command to generate the needed ``.config`` file for hypervisor build usage.
61-
Before running ``make menuconfig``, user need to create board specific ``defconfig``
62-
to setup default ``Kconfig`` value for the specified board.
63+
Hypervisor configuration workflow
64+
==================================
65+
Hypervisor configuration is based on the ``Kconfig`` ``make menuconfig``
66+
mechanism. You begin by creating a board specific ``defconfig`` file to
67+
set up the default ``Kconfig`` values for the specified board.
68+
Then you configure the hypervisor build options using the ``make
69+
menuconfig`` graphical interface. The resulting ``.config`` file is
70+
used by the ACRN build process to create a configured scenario- and
71+
board-specific hypervisor image.
6372

6473
.. figure:: images/sample_of_defconfig.png
6574
:align: center
6675

67-
Sample of defconfig file
76+
defconfig file sample
6877

6978
.. figure:: images/GUI_of_menuconfig.png
7079
:align: center
7180

72-
GUI of menuconfig
81+
menuconfig interface sample
7382

74-
Please refer to the :ref:`getting-started-hypervisor-configuration` for detailed steps.
83+
Please refer to the :ref:`getting-started-hypervisor-configuration` for
84+
detailed steps.
7585

76-
Offline configure tool
77-
======================
78-
For Board configurations and VM configurations, an offline configure tool is
79-
designed to configure them. The tool source folder is located at::
86+
Board and VM configuration workflow
87+
===================================
88+
Python offline tools are provided to configure Board and VM configurations.
89+
The tool source folder is located at::
8090

8191
acrn-hypervisor/misc/acrn-config/
8292

83-
Below is offline configure tool working flow:
93+
Here is the offline configuration tool workflow:
8494

8595
#. Get board info.
8696

87-
a. Setup native Linux environment on target board.
97+
a. Set up native Linux environment on target board.
8898
#. Copy ``target`` folder into target file system and then run
8999
``sudo python3 board_parser.py $(BOARD)`` command.
90-
#. A $(BOARD).xml which includes all needed hardware specific information
91-
will be generated at ``./out/`` folder. (Here $(BOARD) is the specified board name)
100+
#. A $(BOARD).xml that includes all needed hardware-specific information
101+
will be generated in the ``./out/`` folder. (Here ``$(BOARD)`` is the
102+
specified board name)
92103

93-
| **Native Linux requirement:**
94-
| **Release:** Ubuntu 18.04+ or ClearLinux 30210+
95-
| **Tools:** cpuid, rdmsr, lspci, dmidecode(optional)
96-
| **Kernel cmdline:** "idle=nomwait intel_idle.max_cstate=0 intel_pstate=disable"
104+
| **Native Linux requirement:**
105+
| **Release:** Ubuntu 18.04+ or Clear Linux 30210+
106+
| **Tools:** cpuid, rdmsr, lspci, dmidecode (optional)
107+
| **Kernel cmdline:** "idle=nomwait intel_idle.max_cstate=0 intel_pstate=disable"
97108
98109
#. Customize your needs.
99110

100111
.. note:: **[TO BE DEVELOPED]**
101-
The tool in this step is still under development, before its readiness user
102-
could input the setting by editing the target XML file manually.
103-
104-
a. Copy ``$(BOARD).xml`` to host develop machine;
105-
#. Run a UI based configure tool on host machine to input the expected scenario settings,
106-
the tool will do sanity check on the input based on ``$(BOARD).xml`` and then generate
107-
customized scenario based VM configurations in ``$(SCENARIO).xml``;
108-
#. In the UI of configure tool, continue to input launch script parameter for
109-
post-launched User VM. The tool will check the input based on both ``$(BOARD).xml``
110-
and ``$(SCENARIO).xml`` and then generate launch script based VM configurations in
111-
``$(LAUNCH_PARAM).xml``;
112+
The tool in this step is still under development. Until then,
113+
you can input settings by editing the target XML file manually.
114+
115+
a. Copy ``$(BOARD).xml`` to the host develop machine.
116+
#. Run a UI based configuration tool on the host machine to input the
117+
desired scenario settings. The tool will do a sanity check on the
118+
input based on ``$(BOARD).xml`` and then generate a customized
119+
scenario-based VM configurations in ``$(SCENARIO).xml``.
120+
#. In the configuration tool UI, input the launch script parameters for the
121+
post-launched User VM. The tool will sanity check the input based on
122+
both ``$(BOARD).xml`` and ``$(SCENARIO).xml`` and then generate a launch
123+
script-based VM configuration in ``$(LAUNCH_PARAM).xml``.
112124

113125
#. Auto generate code.
114-
There are three python tools will be used to generate configurations in patch format.
115-
The patches will be applied to ``acrn-hypervisor`` git tree automatically.
116126

117-
a. Run ``python3 board_cfg_gen.py --board $(BOARD).xml`` under ``misc/board_config``
118-
folder, it will generate patch for board related configurations;
119-
#. **[TO BE DEVELOPED]** Run ``python3 scenario_cfg_gen.py --board $(BOARD).xml --scenario
120-
$(SCENARIO).xml`` under ``misc/scenario_config`` folder, it will generate patch
121-
for scenario based VM configurations;
122-
#. **[TO BE DEVELOPED]** Run ``python3 launch_cfg_gen.py --board $(BOARD).xml
123-
--scenario $(SCENARIO).xml --launch $(LAUNCH_PARAM).xml$`` under ``misc/launch_config``
124-
folder, it will generate launch script for the specified post-launch User VM;
127+
Python tools are used to generate configurations in patch format.
128+
The patches will be applied to your local ``acrn-hypervisor`` git tree
129+
automatically.
130+
131+
a. Generate a patch for the board-related configuration with::
132+
133+
cd misc/board_config
134+
python3 board_cfg_gen.py --board $(BOARD).xml
135+
136+
#. **[TO BE DEVELOPED]** Generate a patch for scenario-based VM
137+
configuration with::
138+
139+
cd misc/scenario_config
140+
python3 scenario_cfg_gen.py --board $(BOARD).xml --scenario
141+
142+
#. **[TO BE DEVELOPED]** Generate the launch script for the specified
143+
post-launch User VM with::
144+
145+
cd misc/launch_config
146+
python3 launch_cfg_gen.py --board $(BOARD).xml --scenario $(SCENARIO).xml --launch $(LAUNCH_PARAM).xml$
125147

126-
#. Re-build ACRN hypervisor. Please refer to the :ref:`getting-started-building`
127-
to re-build ACRN hypervisor on host machine;
148+
#. Re-build the ACRN hypervisor. Please refer to the
149+
:ref:`getting-started-building` to re-build ACRN hypervisor on host machine.
128150

129151
#. Deploy VMs and run ACRN hypervisor on target board.
130152

131153
.. figure:: images/offline_tools_workflow.png
132154
:align: center
133155

134-
offline tool working flow
156+
offline tool workflow

0 commit comments

Comments
 (0)