Skip to content

Commit 3d6aaea

Browse files
authored
Merge pull request #853 from EESN-W/rock4d
Add rock4d other OS tutorial
2 parents 405bc16 + 9be687b commit 3d6aaea

File tree

9 files changed

+353
-37
lines changed

9 files changed

+353
-37
lines changed

docs/common/general/_sddisktool.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,37 @@
4040

4141
- 输入以下命令并按回车:
4242

43-
```
44-
diskpart
45-
```
43+
<NewCodeBlock tip="Host-Windows$" type="host">
44+
``` diskpart ```
45+
</NewCodeBlock>
4646

4747
- 然后,输入以下命令来列出所有磁盘:
4848

49-
```
50-
list disk
51-
```
49+
<NewCodeBlock tip="Host-Windows$" type="host">
50+
``` list disk ```
51+
</NewCodeBlock>
5252

5353
- 找到你的 SD 卡(假设它是磁盘 3),输入:
5454

55-
```
56-
select disk 1
57-
```
55+
<NewCodeBlock tip="Host-Windows$" type="host">
56+
``` select disk 3 ```
57+
</NewCodeBlock>
5858

5959
- (如果你的 SD 卡是其他磁盘号,请相应修改 3 为正确的数字。)
6060

6161
- 清除磁盘上的所有分区:
6262

63-
```
64-
clean
65-
```
63+
<NewCodeBlock tip="Host-Windows$" type="host">
64+
``` clean ```
65+
</NewCodeBlock>
6666

6767
- (这将删除 SD 卡上的所有分区和数据。)
6868

6969
- 转换磁盘为 GPT 格式:
7070

71-
```
72-
convert gpt
73-
```
71+
<NewCodeBlock tip="Host-Windows$" type="host">
72+
``` convert gpt ```
73+
</NewCodeBlock>
7474

7575
- 输入 exit 退出 diskpart 工具。
7676

@@ -82,9 +82,9 @@
8282

8383
- 找到你的 SD 卡(假设它是 /dev/sdb ),输入:
8484

85-
```
86-
sudo fdisk /dev/sdb
87-
```
85+
<NewCodeBlock tip="Host-Linux$" type="host">
86+
``` sudo fdisk /dev/sdb ```
87+
</NewCodeBlock>
8888

8989
- 输入 `p` ,会显示当前磁盘的标签格式及分区
9090

docs/rock4/rock4d/other-os/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
sidebar_position: 10
3+
---
4+
5+
# 其他系统
6+
7+
介绍非 Radxa OS 的其他操作系统
8+
9+
#### [Buildroot 构建](/rock4/rock4d/other-os/buildroot)
10+
11+
介绍如何使用 Buildroot 构建系统。
12+
13+
#### [Yocto 构建](/rock4/rock4d/other-os/yocto)
14+
15+
介绍如何使用 Yocto 构建系统。
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
sidebar_position: 10
3+
description: "Buildroot 构建"
4+
---
5+
6+
import SSDISKTOOL from "../../../common/general/\_sddisktool.mdx"
7+
8+
# Buildroot 构建
9+
10+
## 环境准备
11+
12+
需要准备一台 Ubuntu 20.04/22.04 x86_64 主机。
13+
14+
也可以使用虚拟主机
15+
16+
- ubuntu-22.04.5-live-server-amd64 虚拟主机,硬盘可用容量不低于 120G。
17+
18+
## 安装编译依赖包
19+
20+
<NewCodeBlock tip="Host-Linux$" type="host">
21+
```
22+
sudo apt update
23+
sudo apt install python2 git rsync gcc g++ make device-tree-compiler bc flex bison lz4 libssl-dev libgmp-dev libmpc-dev expect expect-dev file unzip bzip2 fakeroot bsdmainutils
24+
sudo ln -s /bin/python2 /bin/python
25+
```
26+
</NewCodeBlock>
27+
28+
## 获取 Rockchip 原始 SDK
29+
30+
- [百度网盘](https://pan.baidu.com/s/1G8xA7AsLqQMqrsurMKBGyA?pwd=u7ac)
31+
32+
## 解压 SDK
33+
34+
在 Ubuntu PC 上,使用如下命令解压 SDK。
35+
36+
<NewCodeBlock tip="Host-Linux$" type="host">
37+
```
38+
tar xvf rk3576_linux6.1_rkr4_sdk.repo.tar
39+
.repo/repo/repo sync -l
40+
```
41+
</NewCodeBlock>
42+
43+
## 添加板子 ROCK 4D 支持
44+
45+
使用 Radxa 维护的 rockchip 仓库。
46+
47+
<NewCodeBlock tip="Host-Linux$" type="host">
48+
```
49+
cd device/rockchip
50+
git remote add radxa https://github.com/radxa/device-rockchip.git
51+
git fetch radxa
52+
git checkout -b rk3576-linux-6.1 remotes/radxa/rk3576-linux-6.1
53+
```
54+
</NewCodeBlock>
55+
56+
使用 Radxa 维护的 kernel 仓库。
57+
58+
<NewCodeBlock tip="Host-Linux$" type="host">
59+
```
60+
cd kernel
61+
git remote add radxa https://github.com/radxa/kernel.git
62+
git fetch radxa
63+
git checkout -b linux-6.1-stan-rkr4.1-buildroot remotes/radxa/linux-6.1-stan-rkr4.1-buildroot
64+
```
65+
</NewCodeBlock>
66+
67+
使用 Radxa 维护的 rkwifibt 仓库。
68+
69+
<NewCodeBlock tip="Host-Linux$" type="host">
70+
```
71+
cd external/rkwifibt
72+
git remote add radxa https://github.com/radxa/rkwifibt.git
73+
git fetch radxa
74+
git checkout -b develop remotes/radxa/develop
75+
```
76+
</NewCodeBlock>
77+
78+
使用 Radxa 维护的 buildroot 仓库。
79+
80+
<NewCodeBlock tip="Host-Linux$" type="host">
81+
```
82+
cd buildroot
83+
git remote add radxa https://github.com/radxa/buildroot.git
84+
git fetch radxa
85+
git checkout -b rockchip/2024.02 remotes/radxa/rockchip/2024.02
86+
```
87+
</NewCodeBlock>
88+
89+
## 构建 SDK
90+
91+
在 SDK 的顶层目录,执行命令:
92+
93+
<NewCodeBlock tip="Host-Linux$" type="host">
94+
```
95+
./build.sh
96+
```
97+
</NewCodeBlock>
98+
99+
然后选中配置文件 `rockchip_rk3576_rock_4d_defconfig`
100+
101+
构建完成后,将会在 `rockdev/` 目录下生成镜像。系统镜像文件是 `update.img`
102+
103+
## 烧录镜像
104+
105+
### 烧录镜像到 UFS / EMMC 中
106+
107+
在 Linux/Mac OS 主机上,使用 [upgrade_tool](https://dl.radxa.com/tools/linux/Linux_Upgrade_Tool_V2.1.zip) 工具,通过 Type-A 烧录口,将系统镜像 `update.img` 烧写到 UFS / EMMC 中。
108+
109+
<NewCodeBlock tip="Host-PC$" type="host">
110+
```
111+
upgrade_tool uf update.img
112+
```
113+
</NewCodeBlock>
114+
115+
在 Windows 主机上,使用 `RKDevTool` 工具,通过 Type-A 烧录口,将系统镜像 `update.img` 烧写到 UFS / EMMC 中。
116+
117+
- ① : 让设备进入 Maskrom 模式
118+
119+
- ② : 选择 `Upgrade Firmware` 选项
120+
121+
- ③ : 点击 `Firmware` 选项,选择您编译出来的 `update.img`
122+
123+
- ④ : 点击 `Upgrade` 按钮,开始烧录系统镜像
124+
125+
<div style={{textAlign: 'center'}}>
126+
<img src="/img/rock4/4d/other-os-burn-img.webp" style={{width: '100%', maxWidth: '1200px'}} />
127+
</div>
128+
129+
### 烧录镜像到 MicroSD Card 中
130+
131+
使用 SDDiskTool 将生成的镜像烧录到 MicroSD Card 中。
132+
133+
<SSDISKTOOL />

docs/rock4/rock4d/other-os/yocto.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
sidebar_position: 10
3+
description: "Yocto 构建"
4+
---
5+
6+
# Yocto 构建
7+
8+
import RKYocto from '../../../common/yocto/\_yocto-rockchip.mdx';
9+
10+
<RKYocto />

i18n/en/docusaurus-plugin-content-docs/current/common/general/_sddisktool.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
- Select the SD card to flash from the removable disk devices, choose **SD Boot** as the function mode, ensure that the firmware upgrade is a complete image in RK format, and finally click **Create** to flash the image.
2222

2323
<img
24-
src="/img/common/sddisktool-en.webp"
24+
src="/en/img/common/sddisktool-en.webp"
2525
alt="ssdisk tool"
2626
style={{ width: "80" }}
2727
/>
@@ -40,37 +40,37 @@
4040

4141
- Enter the following command and press Enter:
4242

43-
```
44-
diskpart
45-
```
43+
<NewCodeBlock tip="Host-Windows$" type="host">
44+
``` diskpart ```
45+
</NewCodeBlock>
4646

4747
- Then, enter the following command to list all disks:
4848

49-
```
50-
list disk
51-
```
49+
<NewCodeBlock tip="Host-Windows$" type="host">
50+
``` list disk ```
51+
</NewCodeBlock>
5252

5353
- Locate your SD card (assuming it is disk 3) and enter:
5454

55-
```
56-
select disk 1
57-
```
55+
<NewCodeBlock tip="Host-Windows$" type="host">
56+
``` select disk 3 ```
57+
</NewCodeBlock>
5858

5959
- (If your SD card has a different disk number, change 3 to the correct number accordingly.)
6060

6161
- Clear all partitions on the disk:
6262

63-
```
64-
clean
65-
```
63+
<NewCodeBlock tip="Host-Windows$" type="host">
64+
``` clean ```
65+
</NewCodeBlock>
6666

6767
- (This deletes all partitions and data on the SD card.)
6868

6969
- Converts a disk to GPT format:
7070

71-
```
72-
convert gpt
73-
```
71+
<NewCodeBlock tip="Host-Windows$" type="host">
72+
``` convert gpt ```
73+
</NewCodeBlock>
7474

7575
- Type `exit` to exit the diskpart utility.
7676

@@ -82,9 +82,9 @@
8282

8383
- Find your SD card (assuming it's /dev/sdb) and enter:
8484

85-
```
86-
sudo fdisk /dev/sdb
87-
```
85+
<NewCodeBlock tip="Host-Linux$" type="host">
86+
``` sudo fdisk /dev/sdb ```
87+
</NewCodeBlock>
8888

8989
- Type `p` and the label format and partition of the current disk will be displayed.
9090

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
sidebar_position: 10
3+
---
4+
5+
# Other Operating Systems
6+
7+
Introduction to operating systems other than Radxa OS
8+
9+
#### [Buildroot Build](/rock4/rock4d/other-os/buildroot)
10+
11+
Learn how to build a system using Buildroot.
12+
13+
#### [Yocto Build](/rock4/rock4d/other-os/yocto)
14+
15+
Learn how to build a system using Yocto.

0 commit comments

Comments
 (0)