Skip to content

Commit 224c2fb

Browse files
committed
添加 rk3566 文档
1 parent d7266b9 commit 224c2fb

File tree

5 files changed

+344
-36
lines changed

5 files changed

+344
-36
lines changed

bsp/rockchip/rk3500/README.md

Lines changed: 153 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,189 @@
44

55
# RK3568 BSP Introduction
66

7-
[中文页]() | English
7+
[中文页](./README_ZH.md) | English
88

99
## 1. Introduction
1010

11-
RK3568 is a general-purpose SOC, quad-core 64-bit Cortex-A55 processor, with 22nm lithography process, has frequency up to 2.0GHz and Mali G52 GPU, support 4K decoding and 1080P encoding. Support mangy interfaces such as SATA/PCIE/USB3.0, an 0.8T NPU for lightweight AI applications. Support dual Gigabit Ethernet ports, LPDDR4 memory, etc.
12-
13-
This project ported RT-Thread on RK3568, you can use the RADXA ROCK 3A version of the RK3568 in low-priced, which can even replace the Raspberry Pi 4B.
11+
### Core Architecture
12+
- **CPU**: Quad-core 64-bit ARM Cortex-A55
13+
- **Process Node**: 22nm FinFET
14+
- **Clock Speed**: Up to 1.8GHz (boost)
15+
16+
### Graphics Subsystem
17+
- **GPU**: ARM Mali-G52 MP2
18+
- Graphics APIs:
19+
- OpenGL ES 3.2/2.0/1.1
20+
- Vulkan 1.1
21+
- Display Outputs:
22+
- HDMI 2.0b
23+
- eDP 1.3
24+
- MIPI-DSI (4 lanes)
25+
- **Video Processing**:
26+
- Decoding: 4K@60fps (H.265/H.264/VP9)
27+
- Encoding: 1080P@60fps (H.264/H.265)
28+
29+
### Memory & Storage
30+
- **RAM Support**:
31+
- Dual-channel LPDDR4/LPDDR4X
32+
- Max Capacity: 8GB
33+
- **Storage Options**:
34+
- eMMC 5.1 HS400
35+
- SD 3.0 UHS-I
36+
- Optional SATA III (6Gbps)
37+
- **High-Speed Interfaces**:
38+
- USB 3.0 Type-A/C
39+
- PCIe 2.1 (x1 lane)
40+
41+
### AI Acceleration
42+
- **NPU**: 0.8 TOPS INT8
43+
- Framework Support:
44+
- TensorFlow Lite
45+
- MXNet
46+
- PyTorch Mobile
47+
48+
### Connectivity
49+
- **Wired**:
50+
- Dual Gigabit Ethernet (RGMII)
51+
- **Wireless**:
52+
- Expansion via:
53+
- PCIe-based WiFi6
54+
- USB Bluetooth 5.0
55+
56+
### Multimedia I/O
57+
- **Camera Input**:
58+
- Dual 4-lane MIPI-CSI
59+
- Supports up to 13MP sensors
1460

1561
## 2. Compiling
1662

17-
Usage ARM Developer GNU ToolChain, it support Linux and Windows:
63+
Use the RT-Thread Smart dedicated toolchain to compile:
1864

1965
```plaintext
20-
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/
66+
wget https://github.com/RT-Thread/rt-thread/releases/download/v5.2.0/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_242520-979be38cba.tar.bz2
67+
68+
sudo tar -xf aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_242520-979be38cba.tar.bz2 -C /opt
2169
```
2270

71+
After downloading, extract the toolchain to the /opt directory.Then configure your environment variables:
72+
```plaintext
73+
export RTT_CC="gcc"
74+
export RTT_EXEC_PATH="/opt/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/"
75+
export RTT_CC_PREFIX="aarch64-linux-musleabi-"
76+
export PATH="$RTT_EXEC_PATH:$PATH"
77+
```
2378

79+
Navigate to the rt-thread/bsp/rockchip/rk3500 directory and enter:
80+
```shell
81+
scons --menuconfig
82+
```
2483

25-
Download the `xxx-aarch64-none-elf` of x86_64 hosted platform, set the `RTT_EXEC_PATH` is system environment after decompress the binary.
84+
Select and pull the zlib package in the menu:
85+
![zlib_pack](./figures/zlib_pack.png)
2686

27-
Enter directory `rt-thread/bsp/qemu-virt64-aarch64` and input:
87+
Then run the following commands to fetch packages and build the project:
88+
```
89+
source ~/.env/tools/scripts/pkgs --update
2890
29-
```plaintext
3091
scons
3192
```
32-
33-
34-
3593
## 3. Execution
3694

37-
RK3568 has different Kernel install methods according to different boardsit, recommend to install into the SD card: ([Official](https://wiki.t-firefly.com/en/ROC-RK3568-PC/hardware_doc.html)|[RADXA ROCK 3A](https://wiki.radxa.com/Rock3/install/microSD)).
95+
The RK3566 SoC uses different methods to install the kernel depending on the board.It is recommended to install and boot from an SD card.The following steps take the Orange Pi Compute Module 4 as an example:
3896

39-
After install Kernel, storage the `rtthread.bin` to EFI partition (the second partition), and add this line in the front of `boot.cmd` in this partition:
97+
Connect the serial port of the development board:
98+
![uart](./figures/uart.png)
99+
1. Open a serial terminal, select the correct serial port, and set the baud rate to 1500000.
40100

41-
```shell
42-
fatload mmc 1:1 0x208000 /rtthread.bin;dcache flush;go 0x208000
43-
```
101+
2. Copy the generated rtthread.bin file to the SD card.
102+
103+
3. Power up the development board and press Ctrl + C on the keyboard to enter U-Boot command line mode.
104+
![uboot_cmd](./figures/uboot_cmd.png)
44105

45106

107+
4. Enter the following command to load and boot the Smart system:
46108

47-
After modifying the script, build a binary script `boot.scr ` in this partition:
48109

49110
```shell
50-
# Install the uboot-mkimage package on Linux, or use MSYS2 to install the u-boot-tools package on Windows
51-
mkimage -C none -A arm -T script -d boot.cmd boot.scr
111+
fatload mmc 1:1 0x480000 rtthread.bin;booti 0x480000 - 0x8300000
52112
```
53113

54-
55-
56-
According to different boards, the serial port can support up to UART0~9, this project uses UART2 ([Official](https://wiki.t-firefly.com/en/ROC-RK3568-PC/debug.html)|[RADXA ROCK 3A](https://wiki.radxa.com/Rock3/dev/serial-console)) by default, the baud rate is 1500000, please make sure that the serial port used supports this baud rate.
57-
58114
```plaintext
59-
heap: [0x002663f0 - 0x042663f0]
115+
reading rtthread.bin
116+
1188080 bytes read in 102 ms (11.1 MiB/s)
117+
Fdt Ramdisk skip relocation
118+
## Flattened Device Tree blob at 0x08300000
119+
Booting using the fdt blob at 0x08300000
120+
'reserved-memory' linux,cma: addr=10000000 size=800000
121+
'reserved-memory' ramoops@110000: addr=110000 size=f0000
122+
Using Device Tree in place at 0000000008300000, end 000000000832048e
123+
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
124+
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
125+
Adding bank: 0x1f0000000 - 0x200000000 (size: 0x10000000)
126+
== DO RELOCATE == Kernel from 0x00280000 to 0x00480000
127+
Total: 107148.892 ms
128+
129+
Starting kernel ...
130+
131+
[I/rtdm.ofw] Booting RT-Thread on physical CPU 0x0
132+
[I/rtdm.ofw] Machine model: Rockchip RK3566 Orange Pi CM4 Board
133+
[I/rtdm.ofw] Earlycon: uart8250 at MMIO/PIO 0x00000000fe660000 (options '')
134+
[I/rtdm.ofw] Memory node(1) ranges: 0x0000000000200000 - 0x0000000008400000
135+
[I/rtdm.ofw] Memory node(1) ranges: 0x0000000009400000 - 0x00000000f0000000
136+
[I/rtdm.ofw] Memory node(1) ranges: 0x00000001f0000000 - 0x0000000200000000
137+
[I/mm.memblock] System memory:
138+
[I/mm.memblock] [0x0000000000200000, 0x0000000008400000]
139+
[I/mm.memblock] [0x0000000009400000, 0x00000000f0000000]
140+
[I/mm.memblock] [0x00000001f0000000, 0x0000000200000000]
141+
[I/mm.memblock] Reserved memory:
142+
[I/mm.memblock] [0x0000000000110000, 0x0000000000200000]
143+
[I/mm.memblock] [0x0000000000480000, 0x00000000006c7000]
144+
[I/mm.memblock] [0x00000000006c7000, 0x00000000046c7000]
145+
[I/mm.memblock] [0x00000000046c7000, 0x00000000048c7000]
146+
[I/mm.memblock] [0x00000000048c7000, 0x00000000048e5000]
147+
[I/mm.memblock] [0x0000000008300000, 0x000000000831e000]
148+
[I/mm.memblock] [0x0000000010000000, 0x0000000010800000]
149+
[I/mm.memblock] [0x00000000edf00000, 0x00000000ee367400]
150+
[I/mm.memblock] [0x00000000eff00000, 0x00000000eff08000]
151+
[I/mm.memblock] physical memory region [0x0000000000200000-0x0000000000480000] installed to system page
152+
[I/mm.memblock] physical memory region [0x00000000048e5000-0x0000000008300000] installed to system page
153+
[I/mm.memblock] physical memory region [0x000000000831e000-0x0000000008400000] installed to system page
154+
[I/mm.memblock] physical memory region [0x0000000009400000-0x0000000010000000] installed to system page
155+
[I/mm.memblock] physical memory region [0x0000000010800000-0x00000000edf00000] installed to system page
156+
[I/mm.memblock] physical memory region [0x00000000ee368000-0x00000000eff00000] installed to system page
157+
[I/mm.memblock] physical memory region [0x00000000eff08000-0x00000000f0000000] installed to system page
158+
[I/mm.memblock] physical memory region [0x00000001f0000000-0x0000000200000000] installed to system page
159+
[I/mm.memblock] 4191 MB memory installed to system page
160+
[I/osi.psci] Using PSCI v1.1 Function IDs
161+
[I/clk.rk3568] set cpu_freq to 1800000000
162+
[I/rtdm.ofw] Console: uart0 (fiq-debugger)
60163
61164
\ | /
62-
- RT - Thread Operating System
63-
/ | \ 4.1.0 build Mar 19 2022 17:17:29
64-
2006 - 2022 Copyright by RT-Thread team
165+
- RT - Thread Smart Operating System
166+
/ | \ 5.2.1 build Apr 28 2025 09:19:08
167+
2006 - 2024 Copyright by RT-Thread team
168+
lwIP-2.1.2 initialized!
169+
[I/sal.skt] Socket Abstraction Layer initialize success.
170+
[I/utest] utest is initialize success.
171+
[I/utest] total utest testcase num: (5)
172+
[I/drivers.serial] Using /dev/ttyS0 as default console
173+
Press any key to stop init process startup ... 3
174+
Press any key to stop init process startup ... 2
175+
Press any key to stop init process startup ... 1
176+
Starting init ...
177+
[I/rtdm.mnt] File system initialization done
65178
Hi, this is RT-Thread!!
66-
msh />
67-
```
68-
69-
179+
msh />I/TC: Secondary CPU 1 initializing
180+
I/TC: Secondary CPU 1 switching to normal world boot
181+
[I/cpu.aa64] Call cpu 1 on success
182+
I/TC: Secondary CPU 3 initializing
183+
I/TC: Secondary CPU 3 switching to normal world boot
184+
I/TC: Secondary CPU 2 initializing
185+
I/TC: Secondary CPU 2 switching to normal world boot
186+
[I/cpu.aa64] Call cpu 3 on success
187+
[I/cpu.aa64] Call cpu 2 on success
70188
71-
## 4. Condition
189+
msh />
190+
msh />
72191
73-
| Driver | Condition | Remark |
74-
| ------ | --------- | ------- |
75-
| UART | Support | UART0~9 |
192+
```

0 commit comments

Comments
 (0)