Skip to content

Refactor rock4 series #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
cbc1c42
refactor: delete the original architecture
nascs Mar 5, 2025
2ce674b
refactor: add images needed for the new architecture
nascs Mar 5, 2025
f5bceb3
fix: add pic
nascs Mar 5, 2025
e706168
refactor: port radxa-os to rock4a/b/se
nascs Mar 5, 2025
8cf2d32
refactor: add other-os for rock4 a/b/se
nascs Mar 5, 2025
189eef8
refactor: port low-level-dev to rock4 a/b/se
nascs Mar 5, 2025
ac340ad
refactor: add hardware info for rock4 a/b/se
nascs Mar 5, 2025
9c1eb4f
refactor: port getting-started to rock4 a/b/se
nascs Mar 5, 2025
014fb95
refactor: port app-dev to rock4 a/b/se
nascs Mar 5, 2025
0c1a3f5
refactor: add download page for rock4 a/b/se
nascs Mar 5, 2025
57ebced
fix: add a blank new line for navbar checked by pre-commit
nascs Mar 5, 2025
53fbe5c
fix: fix rock 4a/b/se home page link
nascs Mar 27, 2025
884f872
fix: rename android 11 low dev
nascs Mar 27, 2025
70884fa
feat: add android 10 low dev
nascs Mar 27, 2025
d2b5689
feat: add rockchip-bsp common docs
nascs Mar 28, 2025
a902767
fix: delete the duplicated cpu info
nascs Mar 28, 2025
ed224e8
fix: align the introduction table at center
nascs Mar 28, 2025
3e674f8
fix: rename the host port
nascs Mar 28, 2025
cfa24f7
fix: fix the audiio info
nascs Mar 28, 2025
ecc8eb9
feat: add faq page for rock 4a/4b/4a+4b+/4se
nascs Mar 28, 2025
ecda40c
feat: add app-dev for rock4 android
nascs Apr 1, 2025
73826db
fix: add android low-dev for rock 4a/4b/4a+4b+/4se
nascs Apr 1, 2025
536be6f
fix: fix the rock 4se router
nascs Apr 1, 2025
b823a0a
feat: add android getting-started for rock4a/4b/4a+/ab+/4se
nascs Apr 1, 2025
d518d96
feat: add android download page for rock 4a/4b/4a+/4b+/4se
nascs Apr 1, 2025
44eed3e
fix: rock4: add 4A+/4B+ to the title
nascs May 20, 2025
4e75a04
fix: rock4: fix the main feature
nascs May 20, 2025
8bb7cc7
fix: rock4: fix the model sort
nascs May 20, 2025
b00182a
fix: rock4: fix cooling option
nascs May 20, 2025
ab032ef
fix: rock4: download: add 4a/4a+/4b/4b+ linux 5.10 image
nascs May 20, 2025
d413b29
fix: rock4: install-os: fix the emmc module picture missing issue
nascs May 20, 2025
0ab187f
fix: rock4: install-os: add tip for nvme boot
nascs May 20, 2025
d7fdcac
fix: rock4: install-os: add tip for erasing spi flash
nascs May 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ sidebar_custom_props:
{
products_name: "ROCK 4A",
products_photo_url: "/home/product-pictures/rock4a.webp",
products_link: "/rock4/rock4ab",
products_link: "/rock4/rock4ab-se",
docs:
[
{
docs_link: "/rock4/rock4ab",
docs_link: "/rock4/rock4ab-se",
docs_photo_type: "Overview",
docs_name_en: "Overview",
docs_name_zh: "ROCK 4A 概览",
Expand All @@ -135,11 +135,11 @@ sidebar_custom_props:
{
products_name: "ROCK 4B",
products_photo_url: "/home/product-pictures/rock4b.webp",
products_link: "/rock4/rock4ab",
products_link: "/rock4/rock4ab-se",
docs:
[
{
docs_link: "/rock4/rock4ab",
docs_link: "/rock4/rock4ab-se",
docs_photo_type: "Overview",
docs_name_en: "Overview",
docs_name_zh: "ROCK 4B 概览",
Expand Down Expand Up @@ -167,7 +167,7 @@ sidebar_custom_props:
{
products_name: "ROCK 4SE",
products_photo_url: "/home/product-pictures/rock4se.webp",
products_link: "/rock4/rock4se",
products_link: "/rock4/rock4ab-se",
docs:
[
{
Expand Down
72 changes: 72 additions & 0 deletions docs/common/accessories/_ethernet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{props.product} 有 {props.eth_num} 个以太网口, 下面我们来简单测试一下 {props.product} 的以太网接口

- 硬件连接

<img
src={props.eth_connect_img}
alt="ethernet connection"
style={{ width: "80%" }}
/>

- 检查连接状态

系统启动后,打开终端, 运行以下命令检查以太网是否正常连接,若连接正常,则 {props.product} 会自动获取到 ip 地址

```bash

ip a

```

<img src={props.ip_show_img} alt="ip show" style={{ width: "80%" }} />

如图所示,以太网自动获取到了 ip 地址, 说明以太网连接正常。

- 测试连通性

```bash

ping -c 4 google.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping bing.com吧,还有国内用户呢


```

如果有响应,说明连接正常。

如果无响应,请检查网络配置。

- 测试速度

- 主机端和 {props.product} 上,需要先安装 iperf3

```bash

sudo apt-get install iperf3

```

- 主机端作 server

```bash

iperf3 -s
-----------------------------------------------------------
Server listening on 5201 (test #1)
-----------------------------------------------------------

```

- 测试上传速度

```bash

iperf3 -c 192.168.xx.xx # server_ip

```

- 测试下载速度

```bash

iperf3 -c -R 192.168.xx.xx # server_ip

```
42 changes: 42 additions & 0 deletions docs/common/accessories/_headphone-jack-output.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
本篇文章介绍如何使用开发板的耳机接口

## 测试音频播放

- 硬件连接

<img
src={props.headphoneJack_img}
alt="headphone jack"
style={{ width: "80%" }}
/>

- 下载音频文件

下载 wav 格式的音频文件,并将其重命名为 test.wav

- 查看可用的音频设备

```bash

$ aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: rockchipes8316 [rockchip-es8316], device 0: dailink-multicodecs es8316.1-0011-0 [dailink-multicodecs es8316.1-0011-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

```

- 播放音频文件

```bash

$ aplay -D hw:0,0 test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

```

这里的 hw:0,0 表示使用 card 0 的 device 0, 执行该命令后能从耳机插孔听到声音,说明耳机插孔正常工作
61 changes: 61 additions & 0 deletions docs/common/accessories/_poe-hat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## 材料清单

- 如图

<div>
{props.poe_type === "Radxa 23W PoE HAT" ? (
<div>
<img src="/img/accessories/poe-hat/25w-poe-pkg.webp" alt="Radxa 23W PoE HAT" style={{ width: "80%" }} />
</div>
) : null}

{props.poe_type === "Radxa 25W PoE HAT" ? (
<div>
<img src="/img/accessories/poe-hat/accessories/poe-hat/23w-poe.webp" alt="Radxa 23W PoE HAT" style={{ width: "80%" }} />
</div>
) : null}

</div>

## 安装流程

<div>
{props.poe_type === "Radxa 23W PoE HAT" ? (
<div>
请参考 <a href="/accessories/radxa-23w-poe" alt="" > 瑞莎 23W 供电模块 </a>
</div>
) : null}

{props.poe_type === "Radxa 25W PoE HAT" ? (
<div>
请参考 <a href="/accessories/radxa-25w-poe" alt="" > 瑞莎 25W 供电模块 </a>
</div>
) : null}

</div>

## 风扇调速

### 启用 PoE Overlay

如需要启用温控风扇以及温度传感器,则需要开启对应 Overlay。

请参照[设备树配置](../../radxa-os/rsetup#overlays),启用名为 "Enable Radxa {props.pwr_rate}W PoE HAT "的 Overlay。

<pre style={{ whiteSpace: "nowrap" }}>
[*] Enable Radxa {props.pwr_rate}W PoE HAT
</pre>

最后,重启设备以加载 Overlay。

:::info
如果您无法在 `rsetup` 中找到对应的 Overlay,请参考 [System Update Guide](../../radxa-os/rsetup#system-update) 首先进行系统更新,然后再执行以上操作。
:::

### 检查温度传感器读数

执行以下命令后,第二行输出`t=XXYYY`即为当前温度(XX.YYY摄氏度):

```bash
cat /sys/bus/w1/devices/28-*/w1_slave
```
103 changes: 103 additions & 0 deletions docs/common/android/_low-dev.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import { PreView } from "@site/src/utils/docs";

本篇文章主要介绍如何编译 Android 系统, 其中包括 uboot, kernel, aosp 编译打包等内容

## 环境配置

### 系统环境

```bash

apt-get update -y && apt-get install -y openjdk-8-jdk python git-core gnupg flex bison gperf build-essential \
zip curl liblz4-tool zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip mtools u-boot-tools \
htop iotop sysstat iftop pigz bc device-tree-compiler lunzip \
dosfstools vim-common parted udev libssl-dev python3 python-pip lzop swig

```

### Repo下载

Repo 是 Android 开发中用于管理多个 Git 仓库的工具,它是一个Python脚本,方便开发者对多个 Git 库进行版本控制和管理。 Repo 的下载可以使用以下命令

```bash

wget https://storage.googleapis.com/git-repo-downloads/repo -P ~/bin/
or
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

```

## 源码下载

<PreView
params={{
manifest_branch: props.manifest_branch,
manifest_name: props.manifest_name,
}}
>
{`
$ repo init -u https://github.com/radxa/manifests.git -b #manifest_branch# -m #manifest_name#
$ repo sync -d --no-tags -j4
`}
</PreView>

## 镜像编译

镜像编译可以使用两种方法

### 方法一 (**推荐**)

使用 SDK 编译脚本方式编译

<PreView params={{ build_variant: props.build_variant }}>
{`
$ source build/envsetup.sh
$ lunch #build_variant#
$ ./build.sh -UACKu
`}
</PreView>

等待编译完成就可以在 IMAGE 目录找到镜像

### 方法二

可以根据这个方法一步一步编译镜像

- 设置编译项目的环境

<PreView params={{ build_variant: props.build_variant }}>
{`
$ source build/envsetup.sh
$ lunch #build_variant#
`}
</PreView>

- 编译 U-boot

```bash
$ ./build.sh -U
```

- 编译内核

```bash
$ ./build.sh -CK
```

- 编译AOSP

```bash
$ ./build.sh -A
```

- 制作 Images

```bash
$ ./build.sh -u
```

## 常见问题

- Android 11 推荐在 Ubuntu 16.04 的环境下编译,其他版本的 Ubuntu 可能会出现编译错误。
36 changes: 36 additions & 0 deletions docs/common/armbian/_armbian-build.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
本篇文章主要介绍如何编译构建 Armbian 系统

- 环境准备

- x86_64 / aarch64 / riscv64 机器
- 至少 4GB 内存和 ~50GB 磁盘空间,用于虚拟机、容器或裸机安装
- Armbian / Ubuntu Jammy 22.04.x 用于本地构建,或任何支持 Docker 的 Linux 用于容器化
- 运行 Armbian / Ubuntu Jammy 22.04.x 的 Windows 10/11,带 WSL2 子系统
- 超级用户权限(已配置 sudo 或 root 访问权限)。
- 确保您的系统是最新的!例如,过时的 Docker 二进制文件会造成问题

- 下载源码

```bash

git clone --depth=1 --branch=main https://github.com/armbian/build

cd build

```

- 进入图形界面配置

<img
src={props.build_product}
alt="Build Armbian for Radxa Product"
style={{ width: "80%" }}
/>

配置好之后会开始编译,编译生成的产物在 output 目录下,其中最终生成的镜像在 output/images/ 目录下

- 参考文档

- [Github](https://github.com/armbian/build)

- [Armbian Document](https://docs.armbian.com/Developer-Guide_Build-Preparation/)
2 changes: 1 addition & 1 deletion docs/common/dev/_erase-spi-emmc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
3. 刷入 Loader

<pre>
sudo rkdeveloptool db <a href={props.loader}> rk3588_spl_loader_v1.15.113.bin </a>
sudo rkdeveloptool db <a href={props.loader}> {props.loader_name} </a>
</pre>

4. 清空 SPI Flash
Expand Down
Loading
Loading