1# QEMU<a name="EN-US_TOPIC_0000001101286951"></a> 2 3- [Introduction](#section11660541593) 4- [Constraints](#section119744591305) 5- [QEMU Install](#section119744591307) 6- [Usage](#section169045116126) 7- [Contribution](#section169045116136) 8- [Repositories Involved](#section1371113476307) 9 10## Introduction<a name="section11660541593"></a> 11 12Quick Emulator \(QEMU\) can simulate the scenario where a kernel runs on different boards, so that the kernel no longer depends on physical development boards. 13 14## Constraints<a name="section119744591305"></a> 15 16QEMU applies only to the OpenHarmony kernel. 17 18## QEMU Install<a name="section119744591307"></a> 19 201. Install dependencies(Ubuntu 18+) 21 22 ``` 23 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 24 ``` 25 262. Acquiring Source Code 27 28 ``` 29 wget https://download.qemu.org/qemu-6.2.0.tar.xz 30 ``` 31 32 or 33 34 [Download from official website: qemu-6.2.0.tar.xz](https://download.qemu.org/qemu-6.2.0.tar.xz) 35 363. Compile and install 37 38 ``` 39 tar -xf qemu-6.2.0.tar.xz 40 cd qemu-6.2.0 41 mkdir build && cd build 42 ../configure --prefix=qemu_installation_path 43 make -j16 44 ``` 45 46 Wait for the compilation to finish and execute the installation command: 47 48 ``` 49 make install 50 ``` 51 52 Finally, add the installation path to the environment variable: 53 54 ``` 55 vim ~/.bashrc 56 ``` 57 58 Add the following command line to the last line of ~/.bashrc: 59 60 ``` 61 export PATH=$PATH:qemu_installation_path 62 ``` 63 64## Usage<a name="section169045116126"></a> 65 66For details about the ARM architectures: 67- [Qemu ARM Virt HOWTO - liteos_a](https://gitee.com/openharmony/device_qemu/blob/HEAD/arm_virt/liteos_a/README.md) 68- [Qemu ARM Virt HOWTO - linux](https://gitee.com/openharmony/device_qemu/blob/HEAD/arm_virt/linux/README.md) 69 70For 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). 71 72For 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). 73 74For details about the RISC-V architecture, see [Qemu RISC-V Virt HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/riscv32_virt/README.md). 75 76For details about the Xtensa architecture, see [Qemu Xtensa Virt HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/esp32/README.md). 77 78For details about the C-SKY architecture, see [Qemu C-SKY Virt HOWTO](https://gitee.com/openharmony/device_qemu/blob/HEAD/SmartL_E802/README.md). 79 80## Contribution<a name="section169045116136"></a> 81 82[How to involve](https://gitee.com/openharmony/docs/blob/master/en/contribute/how-to-contribute.md) 83 84[Commit message spec](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83?sort_id=4042860) 85 86## Repositories Involved<a name="section1371113476307"></a> 87 88[Kernel subsystem](https://gitee.com/openharmony/docs/blob/HEAD/en/readme/kernel.md) 89 90**device\_qemu** 91 92[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/HEAD/README.md) 93 94[kernel\_liteos\_m](https://gitee.com/openharmony/kernel_liteos_m/blob/HEAD/README.md) 95