1# QEMU x86_64 Virt for Standard System Tutorial 2 3## 1. Overview 4 5The `x86_64_virt/linux` directory contains code that has been verified on the QEMU x86_64 Virt platform for adapting to Linux kernel. The code includes the driver and board configurations. 6 7The x86_64 Virt platform is a `qemu-system-x86_64` target device that simulates a general-purpose board running on the x86_64 architecture. 8The board whose **machine** is **microvm** in QEMU is configurable. For example, you can select the core type and quantity, memory size, and security extensions when configuring the board. 9 10The system memory is hardcoded to 1024 MB. 11 12## 2. Setting Up the Environment 13 14For details, see [Environment Setup](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/Readme-EN.md) 15 16## 3. Obtaining the Source Code 17 18For details, see [Source Code Acquisition](https://gitee.com/openharmony/docs/blob/HEAD/en/device-dev/get-code/sourcecode-acquire.md). 19 20## 4. Building the Source Code 21 22In the root directory of the obtained source code, run the following command: 23 24``` 25./build.sh --product-name qemu-x86_64-linux-min 26``` 27 28After this command is executed, the image files for standard system are generated in out/qemu-x86_64-linux/packages/phone/images/ directory. 29qemu-x86_64-linux-min means product with minimum set of components. 30qemu-x86_64-linux-headless add application framework related components based on qemu-x86_64-linux-min. 31 32## 5. Running an Image in QEMU 33 34a) If `qemu-system-x86_64` has not been installed, install it. For details, see [Qemu Installation](https://gitee.com/openharmony/device_qemu/blob/HEAD/README.md). 35 36Note: The introduced functions have been tested on the target machine of microvim, but are not available for all QEMU versions. Therefore, you must ensure that the qemu-system-x86_64 version is 5.1 or later. 37 38 39b) Run the images. 40 41After the source code is built, run the `./vendor/ohemu/qemu_x86_64_linux_min/qemu_run.sh` command, the images built in step 4 will be started. 42 43c) Exit QEMU. 44 45Press `Ctrl-A + x` to exit the QEMU virtual environment. 46 47