mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-14 10:31:59 +00:00
doc: Add initial documentation on ACRN RISC-V
This commit adds documentation on buildling and running ACRN hypervisor on top of QEMU RISC-V. Tracked-On: #8782 Signed-off-by: Yifan Liu <yifan1.liu@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -231,3 +231,17 @@ Example of how to use ``hvapplydiffconfig`` to apply
|
||||
Applying patch /path/to/acrn-hypervisor/config.patch:
|
||||
patching file scenarios/hybrid_rt/pci_dev.c
|
||||
...
|
||||
|
||||
Experimental (Multi-Arch Support)
|
||||
*********************************
|
||||
|
||||
(WIP, Unstable)
|
||||
|
||||
ACRN also supports running on multiple architectures. To build hypervisor for
|
||||
other architecture, add ``ARCH=<arch>``, and ``CROSS_COMPILE=<toolchainprefix>``.
|
||||
For example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
$ make hypervisor BOARD=qemu SCENARIO=shared ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-
|
||||
|
||||
|
||||
@@ -308,3 +308,35 @@ Bring Up User VM (L2 Guest)
|
||||
fi
|
||||
done
|
||||
launch_ubuntu 1
|
||||
|
||||
Experimental: Running ACRN on QEMU RISCV-64
|
||||
*******************************************
|
||||
|
||||
(WIP, Unstable)
|
||||
|
||||
The following documentation is tested under Ubuntu 24.04.
|
||||
|
||||
To compile and run ACRN on QEMU RISCV-64, we need to first install
|
||||
QEMU RV64 and crossbuild toolchains. The default packages provided by
|
||||
Ubuntu 24.04 will suffice:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt install crossbuild-essential-riscv64 qemu-system-misc u-boot-qemu opensbi
|
||||
|
||||
To run ACRN on QEMU RISCV-64, first compile ACRN towards QEMU:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make hypervisor BOARD=qemu SCENARIO=shared ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-
|
||||
|
||||
The ACRN ELF binary is generated under ``build/hypervisor/acrn.out``.
|
||||
|
||||
Then run QEMU with the following parameters:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
qemu-system-riscv64 -nographic -machine virt -cpu rv64 -m 8G -smp 4 \
|
||||
-kernel /path/to/acrn-root/build/hypervisor/acrn.out
|
||||
|
||||
ACRN currently only prints out "Hello World!".
|
||||
|
||||
Reference in New Issue
Block a user