• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..21-Aug-2025-

.vscode/21-Aug-2025-

applications/21-Aug-2025-

drivers/21-Aug-2025-

.config A D21-Aug-202549.8 KiB1,5291,417

Kconfig A D21-Aug-2025503 2619

README.md A D21-Aug-20252 KiB7358

README_zh.md A D21-Aug-20252.3 KiB7660

SConscript A D21-Aug-2025311 1511

SConstruct A D21-Aug-20251.3 KiB4535

qemu-debug.bat A D21-Aug-2025530 108

qemu-debug.sh A D21-Aug-2025554 98

qemu-graphic.bat A D21-Aug-2025759 1412

qemu-graphic.sh A D21-Aug-2025775 1312

qemu.bat A D21-Aug-2025524 108

qemu.sh A D21-Aug-2025548 98

rtconfig.h A D21-Aug-202511.6 KiB523181

rtconfig.py A D21-Aug-20251.6 KiB4840

README.md

1# QEMU/AArch64 VIRT BSP Introduction
2
3[中文页](README_zh.md) | English
4
5## 1. Introduction
6
7The AArch64 execution state was introduced with the ARMv8 ISA for machines executing A64 instructions. This project ported RT-Thread on QEMU AArch64 VIRT machine.
8
9## 2. Compiling
10
11Usage ARM Developer GNU ToolChain, it support Linux and Windows:
12```
13https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/
14```
15Download the `xxx-aarch64-none-elf` of x86_64 hosted platform,set the `RTT_EXEC_PATH` is system environment after decompress the binary.
16
17Enter directory `rt-thread/bsp/qemu-virt64-aarch64` and input:
18```
19scons
20```
21
22## 3. Execution
23
24The project execution tool is `qemu-system-aarch64`, the project can be configured to `Cortex-A53/A57/A72`, GIC supports `V2/V3` version, and `V2` of GIC can use 8 processors max.
25
26Download Windows platform from website:
27```
28https://www.qemu.org/download/
29```
30On Linux platform (Ubuntu, Deepin and so on), install QEMU by apt.
31```
32sudo apt update
33sudo apt install qemu-system-arm
34```
35
36Please fixup the exec scripts if modify the default configuration of the project. Run qemu.bat or qemu.sh in terminal:
37```
38heap: [0x40042aa0 - 0x40142aa0]
39
40 \ | /
41- RT -     Thread Operating System
42 / | \     4.0.4 build Aug  6 2021
43 2006 - 2021 Copyright by rt-thread team
44Hi, this is RT-Thread!!
45msh />
46```
47
48Use VirtIO-Console in new terminal by:
49````
50telnet 127.0.0.1 4321
51````
52
53If use tap net mode with tap0 card, modify qemu run script config
54```
55-netdev user,id=net0
56```
57to
58```
59-netdev tap,id=net0,ifname=tap0
60```
61
62## 4. Condition
63
64| Driver | Condition | Remark |
65| ------ | --------- | ------ |
66| UART   | Support   | UART0  |
67| RTC    | Support   | - |
68| GPIO   | Support   | - |
69| VIRTIO BLK | Support | - |
70| VIRTIO NET | Support | - |
71| VIRTIO Console | Support | - |
72| VIRTIO GPU | Support | 2D |
73| VIRTIO Input | Support | Keyboard, Mouse, Tablet |

README_zh.md

1# QEMU/AArch64 VIRT板级支持包说明
2
3中文页 | [English](README.md)
4
5## 1. 简介
6
7AArch64是一种采用ARMv8 ISA,用于执行A64指令的机器的64位执行模式。本工程是在QEMU的AArch64 VIRT版本上进行的一份移植。
8
9## 2. 编译说明
10
11建议使用ARM Developer GNU交叉编译工具链,目前支持Linux/Windows平台:
12```
13https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/
14```
15下载x86_64 Hosted平台下载对应的`xxx-aarch64-none-elf`二进制包,解压后设置`RTT_EXEC_PATH`环境变量为该编译器的bin目录下即可。
16
17进入到`rt-thread/bsp/qemu-virt64-aarch64`目录进行输入:
18```
19scons
20```
21可以看到正常生成`rtthread.elf`与`rtthread.bin`文件。
22
23或者通过 `scons --exec-path="GCC工具链路径"` 命令,在指定工具链位置的同时直接编译。
24
25## 3. 执行
26
27本工程执行环境为`qemu-system-aarch64`模拟器,工程可配置为使用`Cortex-A53/A57/A72`等芯片,GIC支持`V2/V3`版本,其中`V2`最多可配置8个处理器。
28
29Windows平台下,可以在此获取到QEMU:
30```
31https://www.qemu.org/download/
32```
33Linux平台下,以Ubuntu、Deepin系列发行版为例,可通过该命令安装QEMU:
34```
35sudo apt update
36sudo apt install qemu-system-arm
37```
38
39工程默认配置修改后请注意修改运行脚本。在终端执行qemu.batqemu.sh可以看到程序运行:
40```
41heap: [0x40042aa0 - 0x40142aa0]
42
43 \ | /
44- RT -     Thread Operating System
45 / | \     4.0.4 build Aug  6 2021
46 2006 - 2021 Copyright by rt-thread team
47Hi, this is RT-Thread!!
48msh />
49```
50
51如果需要使用VirtIO-Console,请在新终端使用以下命令连接控制台:
52```
53telnet 127.0.0.1 4321
54```
55
56如果使用tap网卡模式,以设备tap0为例,将qemu运行脚本
57```
58-netdev user,id=net0
59```
60修改为
61```
62-netdev tap,id=net0,ifname=tap0
63```
64
65## 4.支持情况
66
67| 驱动 | 支持情况  |  备注  |
68| ------ | ----  | :------:  |
69| UART | 支持 | UART0 |
70| RTC  | 支持 | - |
71| GPIO | 支持 | - |
72| VIRTIO BLK | 支持 | - |
73| VIRTIO NET | 支持 | - |
74| VIRTIO Console | 支持 | - |
75| VIRTIO GPU | 支持 | 2D |
76| VIRTIO Input | 支持 | Keyboard, Mouse, Tablet |