# QEMU
- [Introduction](#section11660541593)
- [Constraints](#section119744591305)
- [QEMU Install](#section119744591307)
- [Usage](#section169045116126)
- [Contribution](#section169045116136)
- [Repositories Involved](#section1371113476307)
## Introduction
Quick Emulator \(QEMU\) can simulate the scenario where a kernel runs on different boards, so that the kernel no longer depends on physical development boards.
## Constraints
QEMU applies only to the OpenHarmony kernel.
## QEMU Install
1. Install dependencies(Ubuntu 18+)
```
sudo apt install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev virtualenv flex bison
```
2. Acquiring Source Code
```
wget https://download.qemu.org/qemu-6.2.0.tar.xz
```
or
[Download from official website: qemu-6.2.0.tar.xz](https://download.qemu.org/qemu-6.2.0.tar.xz)
3. Compile and install
```
tar -xf qemu-6.2.0.tar.xz
cd qemu-6.2.0
mkdir build && cd build
../configure --prefix=qemu_installation_path
make -j16
```
Wait for the compilation to finish and execute the installation command:
```
make install
```
Finally, add the installation path to the environment variable:
```
vim ~/.bashrc
```
Add the following command line to the last line of ~/.bashrc:
```
export PATH=$PATH:qemu_installation_path
```
## Usage
For details about the ARM architectures:
- [Qemu ARM Virt HOWTO - liteos_a](https://gitee.com/openharmony/device_qemu/blob/HEAD/arm_virt/liteos_a/README.md)
- [Qemu ARM Virt HOWTO - linux](https://gitee.com/openharmony/device_qemu/blob/HEAD/arm_virt/linux/README.md)
For details about the Cortex-m4 architecture, see [Qemu Cortex-m4 mps2-an386 HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/arm_mps2_an386/README.md).
For details about the Cortex-m55 architecture, see [Qemu Cortex-m55 mps3-an547 HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/arm_mps3_an547/README.md).
For details about the RISC-V architecture, see [Qemu RISC-V Virt HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/riscv32_virt/README.md).
For details about the Xtensa architecture, see [Qemu Xtensa Virt HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/esp32/README.md).
For details about the C-SKY architecture, see [Qemu C-SKY Virt HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/SmartL_E802/README.md).
## Contribution
[How to involve](https://gitee.com/openharmony/docs/blob/master/en/contribute/how-to-contribute.md)
[Commit message spec](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83?sort_id=4042860)
## Repositories Involved
[Kernel subsystem](https://gitee.com/openharmony/docs/blob/HEAD/en/readme/kernel.md)
**device\_qemu**
[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/HEAD/README.md)
[kernel\_liteos\_m](https://gitee.com/openharmony/kernel_liteos_m/blob/HEAD/README.md)