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