• Home
Name Date Size #Lines LOC

..--

chipset/12-May-2024-113102

images/12-May-2024-6251

rootfs/12-May-2024-140131

BUILD.gnD12-May-20241.8 KiB3735

README.mdD12-May-20242.1 KiB4624

README_zh.mdD12-May-20241.7 KiB4725

ohos.buildD12-May-2024184 1110

README.md

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

README_zh.md

1# Qemu ARM Virt 标准系统教程
2
3## 1. 简介
4
5`arm_virt/linux` 子目录包含部分Qemu ARM虚拟化平台验证的Linux kernel的适配代码,含驱动配置、板端配置等。
6
7ARM 虚拟化平台是一个 `qemu-system-arm` 的目标设备,通过它来模拟一个通用的、基于ARM架构的单板。
8Qemu中machine为 **virt** 的单板就是这种可配置的,例如:选择核的类型、核的个数、内存的大小和安全特性等,单板设备的配置。
9
10这次模拟的配置是:Cortex-A7架构,1个CPU,带安全扩展,GICv2,1G内存。
11提示: 系统内存硬编码为1024MB。
12
13## 2. 环境搭建
14
15参考链接: [环境搭建](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/device-dev/quick-start/quickstart-standard.md)
16
17## 3. 获取源码
18
19参考链接: [代码获取](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/device-dev/get-code/sourcecode-acquire.md)
20
21## 4. 源码构建
22
23在已经获取的源码根目录,请输入:
24
25```
26./build.sh --product-name qemu-arm-linux-min --ccache --jobs 4
27```
28
29在构建完成之后,对应的镜像文件在out/qemu-arm-linux/packages/phone/images/目录下。
30
31
32## 5. 在Qemu中运行镜像
33
34a) 如果没有安装 `qemu-system-arm` ,安装请参考链接 [Qemu installation](https://gitee.com/openharmony/device_qemu/blob/HEAD/README_zh.md)
35
36提示:当前引入的功能在virt-5.1的目标machine已经完成测试,不保证所有的Qemu版本都能够运行成功,因此需要保证你的qemu-system-arm
37版本尽可能在5.1及以上。
38
39b) 运行镜像
40
41执行`./vendor/ohemu/qemu_arm_linux_min/qemu_run.sh`即可运行步骤4生成的镜像。
42
43c) 退出qemu环境
44
45按下`Ctrl-A + x`可退出qemu虚拟环境。
46
47