2021-08-06 18:35:58 +08:00
# QEMU/AArch64 VIRT BSP Introduction
2021-08-09 16:44:59 +08:00
[中文页 ](README_zh.md ) | English
2021-08-06 18:35:58 +08:00
## 1. Introduction
The AArch64 execution state was introduced with the ARMv8 ISA for machines executing A64 instructions. This project ported RT-Thread on QEMU AArch64 VIRT machine.
## 2. Compiling
Usage ARM Developer GNU ToolChain, it support Linux and Windows:
```
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/
```
Download the `xxx-aarch64-none-elf` of x86_64 hosted platform, set the `RTT_EXEC_PATH` is system environment after decompress the binary.
Enter directory `rt-thread/bsp/qemu-virt64-aarch64` and input:
```
scons
```
2022-03-29 11:08:25 +08:00
## 3. Execution
2021-08-06 18:35:58 +08:00
2022-03-29 11:08:25 +08:00
The 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.
2021-08-06 18:35:58 +08:00
Download Windows platform from website:
```
https://www.qemu.org/download/
```
On Linux platform (Ubuntu, Deepin and so on), install QEMU by apt.
```
sudo apt update
sudo apt install qemu-system-arm
```
2022-03-29 11:08:25 +08:00
Please fixup the exec scripts if modify the default configuration of the project. Run qemu.bat or qemu.sh in terminal:
2021-08-06 18:35:58 +08:00
```
heap: [0x40042aa0 - 0x40142aa0]
\ | /
- RT - Thread Operating System
/ | \ 4.0.4 build Aug 6 2021
2006 - 2021 Copyright by rt-thread team
Hi, this is RT-Thread!!
msh />
```
2022-07-08 02:11:19 +08:00
Use VirtIO-Console in new terminal by:
````
telnet 127.0.0.1 4321
````
2022-07-30 14:04:25 +08:00
If use tap net mode with tap0 card, modify qemu run script config
```
-netdev user,id=net0
```
to
```
-netdev tap,id=net0,ifname=tap0
```
2022-03-29 11:08:25 +08:00
## 4. Condition
2021-08-06 18:35:58 +08:00
| Driver | Condition | Remark |
| ------ | --------- | ------ |
2021-09-22 17:57:45 +08:00
| UART | Support | UART0 |
2022-01-07 13:49:06 +08:00
| RTC | Support | - |
2022-07-08 02:11:19 +08:00
| GPIO | Support | - |
2022-06-18 08:09:57 +08:00
| VIRTIO BLK | Support | - |
| VIRTIO NET | Support | - |
2022-07-08 02:11:19 +08:00
| VIRTIO Console | Support | - |
2022-06-18 08:09:57 +08:00
| VIRTIO GPU | Support | 2D |
| VIRTIO Input | Support | Keyboard, Mouse, Tablet |