@@ -171,42 +171,80 @@ each with their own way to install development tools:
171
171
details.
172
172
173
173
174
- Build the hypervisor, device model and tools
175
- ********************************************
174
+ Get the ACRN hypervisor source code
175
+ ***********************************
176
176
177
177
The `acrn-hypervisor <https://github.com/projectacrn/acrn-hypervisor/ >`_
178
178
repository has four main components in it:
179
179
180
180
1. The ACRN hypervisor code located in the ``hypervisor `` directory
181
- #. The EFI stub code located in the ``efi-stub `` directory
181
+ #. The EFI stub code located in the ``misc/ efi-stub `` directory
182
182
#. The ACRN devicemodel code located in the ``devicemodel `` directory
183
- #. The ACRN tools source code located in the ``tools `` directory
183
+ #. The ACRN tools source code located in the ``misc/ tools `` directory
184
184
185
- You can build all these components in one go as follows :
185
+ Follow this step to get the acrn-hypervisor source code :
186
186
187
187
.. code-block :: none
188
188
189
189
$ git clone https://github.com/projectacrn/acrn-hypervisor
190
- $ cd acrn-hypervisor
191
- $ make
192
190
193
- The build results are found in the ``build `` directory.
194
191
195
- .. note ::
196
- if you wish to use a different target folder for the build
197
- artifacts, set the ``O `` (that is capital letter 'O') to the
198
- desired value. Example: ``make O=build-nuc BOARD=nuc6cayh ``.
192
+ Choose the ACRN scenario
193
+ ************************
194
+
195
+ .. note :: Documentation about the new ACRN use-case scenarios is a
196
+ work-in-progress on the master branch as we work towards the v1.2
197
+ release.
198
+
199
+ Currently ACRN hypervisor defines these typical usage scenarios:
200
+
201
+ SDC:
202
+ The SDC (Software Defined Cockpit) scenario defines a simple
203
+ automotive use-case where there is one pre-launched Service VM and one
204
+ post-launched User VM.
199
205
200
- Generating the documentation is described in details in the :ref: `acrn_doc `
201
- tutorial.
206
+ SDC2:
207
+ SDC2 (Software Defined Cockpit 2) is an extended scenario for an
208
+ automotive SDC system. SDC2 defined one pre-launched Service VM and up
209
+ to three post-launched VMs.
202
210
203
- Follow the same instructions to boot and test the images you created
204
- from your build.
211
+ LOGICAL_PARTITION:
212
+ This scenario defines two pre-launched VMs.
213
+
214
+ INDUSTRY:
215
+ This is a typical scenario for industrial usage with up to four VMs:
216
+ one pre-launched Service VM, one post-launched Standard VM for Human
217
+ interaction (HMI), and one or two post-launched RT VMs for real-time
218
+ control.
219
+
220
+ HYBRID:
221
+ This scenario defines a hybrid use-case with three VMs: one
222
+ pre-launched VM, one pre-launched Service VM, and one post-launched
223
+ Standard VM.
224
+
225
+ You can select a build scenario by changing the default Kconfig name in
226
+ the choice block of **ACRN Scenario ** in ``arch/x86/Kconfig ``. The
227
+ corresponding VM configuration files in the corresponding
228
+ ``scenarios/$SCENARIO_NAME/ `` folder.
229
+
230
+ .. code-block :: none
231
+ :emphasize-lines: 7
232
+
233
+ $ cd acrn-hypervisor/hypervisor
234
+ $ sudo vim arch/x86/Kconfig
235
+ # <Fill the scenario name into below and save>
236
+
237
+ choice
238
+ prompt "ACRN Scenario"
239
+ default SDC
240
+
241
+ See the :ref: `hardware ` document for information about the platform
242
+ needs for each scenario.
205
243
206
244
.. _getting-started-hypervisor-configuration :
207
245
208
- Configuring the hypervisor
209
- **************************
246
+ Modify the hypervisor configuration
247
+ ***********************************
210
248
211
249
The ACRN hypervisor leverages Kconfig to manage configurations, powered by
212
250
Kconfiglib. A default configuration is generated based on the board you have
@@ -220,43 +258,64 @@ based on the platform selected, assuming that you are under the top-level
220
258
directory of acrn-hypervisor. The configuration file, named ``.config ``, can be
221
259
found under the target folder of your build.
222
260
223
- .. code-block :: none
261
+ .. code-block :: none
224
262
225
- $ cd hypervisor
226
- $ make defconfig BOARD=nuc6cayh
263
+ $ make defconfig BOARD=nuc6cayh
227
264
228
265
The BOARD specified is used to select a defconfig under
229
266
``arch/x86/configs/ ``. The other command-line based options (e.g. ``RELEASE ``)
230
267
take no effects when generating a defconfig.
231
268
232
- Modify the hypervisor configurations
233
- ************************************
234
-
235
269
To modify the hypervisor configurations, you can either edit ``.config ``
236
270
manually, or invoke a TUI-based menuconfig, powered by kconfiglib, by executing
237
271
``make menuconfig ``. As an example, the following commands, assuming that you
238
272
are under the top-level directory of acrn-hypervisor, generate a default
239
273
configuration file for UEFI, allow you to modify some configurations and build
240
274
the hypervisor using the updated ``.config ``.
241
275
242
- .. code-block :: none
276
+ .. code-block :: none
243
277
244
- $ cd hypervisor
245
- $ make defconfig BOARD=nuc6cayh
246
- $ make menuconfig # Modify the configurations per your needs
247
- $ make # Build the hypervisor with the new .config
278
+ $ make menuconfig # Modify the configurations per your needs
248
279
249
- .. note ::
250
- Menuconfig is python3 only.
280
+ .. note ::
281
+ Menuconfig is python3 only.
251
282
252
283
Refer to the help on menuconfig for a detailed guide on the interface.
253
284
254
- .. code-block :: none
285
+ .. code-block :: none
255
286
256
- $ pydoc3 menuconfig
287
+ $ pydoc3 menuconfig
257
288
258
- Create a new default configuration
259
- **********************************
289
+ Build the hypervisor, device model and tools
290
+ ********************************************
291
+
292
+ Now you can build all these components in one go as follows:
293
+
294
+ .. code-block :: none
295
+
296
+ $ cd ../ # Enter top-level folder of acrn-hypervisor source
297
+ $ make FIRMWARE=uefi # Build the UEFI hypervisor with the new .config
298
+
299
+ The build results are found in the ``build `` directory. You can specify
300
+ use a different Output folder by setting the ``O `` make parameter,
301
+ for example: ``make O=build-nuc BOARD=nuc6cayh ``.
302
+
303
+ If you only need the hypervisor, then use this command:
304
+
305
+ .. code-block :: none
306
+
307
+ $ make clean # Remove files previously built
308
+ $ make FIRMWARE=uefi hypervisor # This will only build the hypervisor
309
+
310
+ You could also use ``FIRMWARE=sbl `` instead, to build the Intel SBL
311
+ (`Slim bootloader
312
+ <https://www.intel.com/content/www/us/en/design/products-and-solutions/technologies/slim-bootloader/overview.html> `_)
313
+ hypervisor.
314
+
315
+ Follow the same instructions to boot and test the images you created from your build.
316
+
317
+ Save as default configuration
318
+ *****************************
260
319
261
320
Currently the ACRN hypervisor looks for default configurations under
262
321
``hypervisor/arch/x86/configs/<BOARD>.config ``, where ``<BOARD> `` is the
@@ -277,4 +336,3 @@ example above) to 'BOARD=':
277
336
.. code-block :: none
278
337
279
338
$ make defconfig BOARD=xxx
280
-
0 commit comments