Skip to content

Commit a0b98e5

Browse files
committed
doc: update README
1 parent 309c65f commit a0b98e5

File tree

2 files changed

+96
-324
lines changed

2 files changed

+96
-324
lines changed

README.md

Lines changed: 44 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
55
</div> -->
66

7-
<h2 align="center">AxVisor</h1>
7+
<h1 align="center">AxVisor</h1>
88

9-
<p align="center">A unified modular hypervisor based on ArceOS.</p>
9+
<p align="center">A unified modular Type I hypervisor</p>
1010

1111
<div align="center">
1212

@@ -16,170 +16,96 @@
1616

1717
</div>
1818

19-
English | [中文](README_CN.md)
19+
[English](README.md) | [中文](README_CN.md)
2020

2121
# Introduction
2222

23-
AxVisor is a Hypervisor implemented based on the ArceOS unikernel framework. Its goal is to leverage the basic operating system functionalities provided by ArceOS as a foundation to build a unified and componentized Hypervisor.
23+
AxVisor is a Hypervisor implemented based on the ArceOS kernel. Its goal is to leverage the basic operating system functionalities provided by ArceOS as a foundation to implement a lightweight unified modular Hypervisor.
2424

25-
**Unified** means using the same codebase to support three architectures—x86_64, Arm (aarch64), and RISC-V—maximizing the reuse of architecture-agnostic code and simplifying development and maintenance efforts.
25+
- **Unified** means using the same codebase to support three architectures—x86_64, Arm (aarch64), and RISC-V—maximizing the reuse of architecture-agnostic code and simplifying development and maintenance costs.
2626

27-
**Componentized** means that the Hypervisor's functionalities are decomposed into multiple independently usable components. Each component implements a specific function, and components communicate through standardized interfaces to achieve decoupling and reusability.
27+
- **Modular** means that the Hypervisor's functionalities are decomposed into multiple independently usable components. Each component implements a specific function, and components communicate through standardized interfaces to achieve decoupling and reusability.
2828

2929
## Architecture
3030

31-
The software architecture of AxVisor is divided into five layers as shown in the diagram below. Each box represents an independent module, and the modules communicate with each other through standard interfaces.
31+
The software architecture of AxVisor is divided into five layers as shown in the diagram below. Each box represents an independent component, and components communicate with each other through standard interfaces. The complete architecture description can be found in the [documentation](https://arceos-hypervisor.github.io/axvisorbook/docs/overview).
3232

3333
![Architecture](https://arceos-hypervisor.github.io/doc/assets/arceos-hypervisor-architecture.png)
3434

35-
The complete architecture description can be found in the [documentation](https://arceos-hypervisor.github.io/doc/arch_cn.html).
35+
## Hardware Platforms
3636

37-
## Hardwares
37+
AxVisor has been verified on multiple hardware platforms, covering extensive support from virtualization environments to actual physical devices. To facilitate rapid user deployment, we provide one-click build scripts for each platform in the [axvisor-guest](https://github.com/arceos-hypervisor/axvisor-guest) repository, which can automatically generate corresponding image files.
3838

39-
Currently, AxVisor has been verified on the following platforms:
39+
| Platform Name | Architecture Support | Key Features |
40+
|---------------|---------------------|--------------|
41+
| QEMU | ARM64, x86_64 | Virtualization platform, supports multiple architectures, for development and testing |
42+
| Orange Pi 5 Plus | ARM64 | Development board based on Rockchip RK3588, high-performance ARM platform |
43+
| Phytium Pi | ARM64 | Development board based on Phytium E2000Q processor, domestic ARM platform |
44+
| ROC-RK3568-PC | ARM64 | Development board based on Rockchip RK3568, suitable for industrial applications |
45+
| EVM3588 | ARM64 | Evaluation board based on Rockchip RK3588, enterprise-level applications |
4046

41-
- [x] QEMU ARM64 virt (qemu-max)
42-
- [x] Rockchip RK3568 / RK3588
43-
- [x] PhytiumPi
47+
## Guest Systems
4448

45-
## Guest VMs
49+
AxVisor supports multiple operating systems as guests, with good compatibility from lightweight microkernels to mature macrokernel systems. To simplify the user deployment process, we provide one-click build scripts for different guest systems in the [axvisor-guest](https://github.com/arceos-hypervisor/axvisor-guest) repository, which can quickly generate adapted guest images.
4650

47-
Currently, AxVisor has been verified in scenarios with the following systems as guests:
51+
| Guest System | System Type | Architecture Support | Feature Description |
52+
|--------------|-------------|---------------------|-------------------|
53+
| [ArceOS](https://github.com/arceos-org/arceos) | Unikernel | ARM64, x86_64, RISC-V | Rust-based componentized operating system, lightweight and high-performance |
54+
| [Starry-OS](https://github.com/Starry-OS) | Macrokernel OS | ARM64, x86_64 | Real-time operating system for embedded scenarios |
55+
| [NimbOS](https://github.com/equation314/nimbos) | RTOS System | ARM64, x86_64, RISC-V | Concise Unix-like system, supports POSIX interface |
56+
| Linux | Macrokernel OS | ARM64, x86_64, RISC-V | Mature and stable general-purpose operating system, rich software ecosystem |
4857

49-
- [ArceOS](https://github.com/arceos-org/arceos)
50-
- [Starry-OS](https://github.com/Starry-OS)
51-
- [NimbOS](https://github.com/equation314/nimbos)
52-
- Linux
58+
# Build
5359

54-
## Shell Management
55-
56-
AxVisor provides an interactive shell interface for managing virtual machines and file operations.
57-
58-
For detailed information about shell features, commands, and usage, see: [Shell模块介绍.md](doc/Shell模块介绍.md)
59-
60-
# Build and Run
61-
62-
After AxVisor starts, it loads and starts the guest based on the information in the guest configuration file. Currently, AxVisor supports loading guest images from a FAT32 file system and also supports binding guest images to the hypervisor image through static compilation (using include_bytes).
60+
AxVisor is built based on the Rust ecosystem, providing complete project build, configuration management, and debugging support through the extended xtask toolchain, offering developers a unified and efficient development experience.
6361

6462
## Build Environment
6563

66-
AxVisor is written in the Rust programming language, so you need to install the Rust development environment following the instructions on the official Rust website. Additionally, you need to install cargo-binutils to use tools like rust-objcopy and rust-objdump.
64+
First, in a Linux environment, you need to install basic development tool packages such as `libssl-dev libssl-dev gcc libudev-dev pkg-config`.
6765

68-
```console
69-
cargo install cargo-binutils
70-
```
66+
Second, AxVisor is written in the Rust programming language, so you need to install the Rust development environment according to the official Rust website instructions, and use the `cargo install cargo-binutils` command to install [cargo-binutils](https://github.com/rust-embedded/cargo-binutils) to use tools like `rust-objcopy` and `rust-objdump`.
7167

72-
If necessary, you may also need to install [musl-gcc](http://musl.cc/x86_64-linux-musl-cross.tgz) to build guest applications.
68+
> If necessary, you may also need to install [musl-gcc](http://musl.cc/x86_64-linux-musl-cross.tgz) to build guest applications.
7369
7470
## Configuration Files
7571

76-
Since guest configuration is a complex process, AxVisor chooses to use toml files to manage guest configurations, which include the virtual machine ID, virtual machine name, virtual machine type, number of CPU cores, memory size, virtual devices, and passthrough devices.
77-
78-
- In the source code's `./config/vms` directory, there are some example templates for guest configurations. The configuration files are named in the format `<os>-<arch>-board_or_cpu-smpx`, where:
79-
- `<os>` is the guest operating system name
80-
- `<arch>` is the architecture
81-
- `board_or_cpu` is the name of the hardware development board or CPU (different strings are concatenated with `_`)
82-
- `smpx` refers to the number of CPUs allocated to the guest, where `x` is the specific value
83-
- The different components are concatenated with `-` to form the whole name
84-
85-
- Additionally, you can also use the [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) tool to generate a custom configuration file. For detailed information, please refer to [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html).
86-
87-
## Load and run from file system
88-
89-
Loading from the filesystem refers to the method where the AxVisor image, Linux guest image, and its device tree are independently deployed in the filesystem on the storage. After AxVisor starts, it loads the guest image and its device tree from the filesystem to boot the guest.
90-
91-
### NimbOS as guest
92-
93-
1. Execute script to download and prepare NimbOS image.
94-
95-
```shell
96-
./scripts/nimbos.sh --arch aarch64
97-
```
98-
99-
2. Execute `./axvisor.sh run --plat aarch64-generic --features fs,ept-level-4 --arceos-args BUS=mmio,BLK=y,DISK_IMG=tmp/nimbos-aarch64.img,LOG=info --vmconfigs configs/vms/nimbos-aarch64-qemu-smp1.toml` to build AxVisor and start it in QEMU.
72+
AxVisor uses a layered configuration system, including hardware platform configuration and guest configuration, both in TOML format.
10073

101-
3. After that, you can directly run `./axvisor.sh run` to start it, and modify `.hvconfig.toml` to change the startup parameters.
74+
### Hardware Platform Configuration
10275

103-
### More guest
76+
Hardware platform configuration files are located in the `configs/board/` directory, with each configuration file corresponding to a development board (or QEMU platform architecture) that we have verified. They specify the target architecture, feature sets, driver support, log levels, and build options.
10477

105-
TODO
78+
> The guest configuration item `vm_configs` is not specified by default and needs to be specified in actual use!
10679
107-
## Load and run from memory
80+
### Guest Configuration
10881

109-
Loading from memory refers to a method where the AxVisor image, guest image, and its device tree are already packaged together during the build phase. Only AxVisor itself needs to be deployed in the file system on the storage device. After AxVisor starts, it loads the guest image and its device tree from memory to boot the guest.
82+
Guest configuration files are located in the `configs/vms/` directory, defining the runtime parameters of guests, including basic information, kernel configuration, memory regions, and device configuration details.
11083

111-
### linux as guest
84+
The configuration file naming format is `<os>-<arch>-board_or_cpu-smpx`, where `<os>` is the guest system name (such as `arceos`, `linux`, `nimbos`), `<arch>` is the architecture (such as `aarch64`, `x86_64`, `riscv64`), `board_or_cpu` is the hardware development board or CPU name, and `smpx` is the number of CPUs allocated to the guest.
11285

113-
1. Prepare working directory
114-
```console
115-
mkdir -p tmp
116-
cp configs/vms/linux-aarch64-qemu-smp1.toml tmp/
117-
cp configs/vms/linux-aarch64-qemu-smp1.dts tmp/
118-
```
86+
## Compilation
11987

120-
2. [See Linux build help](https://github.com/arceos-hypervisor/guest-test-linux) to get the guest Image and rootfs.img, then copy them to the `tmp` directory.
88+
AxVisor uses the xtask tool for build management, supporting multiple hardware platforms and configuration options. For a quick build and run of AxVisor, please refer to the [Quick Start](https://arceos-hypervisor.github.io/axvisorbook/docs/category/quickstart) chapter in the configuration documentation.
12189

122-
3. Execute `dtc -O dtb -I dts -o tmp/linux-aarch64-qemu-smp1.dtb tmp/linux-aarch64-qemu-smp1.dts` to build the guest device tree file
90+
1. **Generate Configuration**: Use `cargo xtask defconfig <board_name>` to select the target hardware platform configuration from the `configs/board/` directory. This command copies the corresponding board-level configuration to `.build.toml` as the build configuration.
12391

124-
4. Execute `./axvisor.sh defconfig`, then edit the `.hvconfig.toml` file, set the `vmconfigs` item to your guest machine configuration file path, with the following content:
92+
2. **Modify Configuration**: Use `cargo xtask menuconfig` to launch the interactive configuration interface, where you can adjust the target architecture, feature sets, log levels, and other parameters.
12593

126-
```toml
127-
arceos_args = [
128-
"BUS=mmio",
129-
"BLK=y",
130-
"MEM=8g",
131-
"LOG=debug",
132-
"QEMU_ARGS=\"-machine gic-version=3 -cpu cortex-a72 \"",
133-
"DISK_IMG=\"tmp/rootfs.img\"",
134-
]
135-
vmconfigs = [ "tmp/linux-aarch64-qemu-smp1.toml"]
136-
```
137-
138-
4. Execute `./axvisor.sh run` to build AxVisor and start it in QEMU.
139-
140-
### More guest
141-
142-
TODO
94+
3. **Execute Build**: Use `cargo xtask build` to compile the project according to the `.build.toml` configuration file, generating the target platform binary file.
14395

14496
# Contributing
14597

146-
Feel free to fork this repository and submit a pull request.
147-
148-
You can refer to these [discussions]((https://github.com/arceos-hypervisor/axvisor/discussions)) to gain deeper insights into the project's ideas and future development direction.
149-
150-
## Development
151-
152-
To contribute to AxVisor, you can follow these steps:
153-
154-
1. Fork the repository on GitHub.
155-
2. Clone your forked repository to your local machine.
156-
3. Create a new branch for your feature or bug fix.
157-
4. Make your changes and commit them with clear messages.
158-
5. Push your changes to your forked repository.
159-
6. Open a pull request against the main branch of the original repository.
160-
161-
To develop crates used by AxVisor, you can use the following command to build and run the project:
162-
163-
```bash
164-
cargo install cargo-lpatch
165-
cargo lpatch -n deps_crate_name
166-
```
167-
168-
Then you can modify the code in the `crates/deps_crate_name` directory, and it will be automatically used by AxVisor.
169-
170-
## Contributors
171-
172-
This project exists thanks to all the people who contribute.
98+
Welcome to fork this repository and submit pull requests. The existence and development of this project thanks to the support of all contributors.
17399

174100
<a href="https://github.com/arceos-hypervisor/axvisor/graphs/contributors">
175101
<img src="https://contrib.rocks/image?repo=arceos-hypervisor/axvisor" />
176102
</a>
177103

178104
# License
179105

180-
AxVisor uses the following open-source license:
106+
AxVisor uses the following open-source licenses:
181107

182108
- Apache-2.0
183109
- MulanPubL-2.0
184110
- MulanPSL2
185-
- GPL-3.0-or-later
111+
- GPL-3.0-or-later

0 commit comments

Comments
 (0)