Skip to content
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

feat: add rock 5t docs #487

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,22 @@ sidebar_custom_props:
},
],
},
{
products_name: "ROCK 5T",
products_photo_url: "/home/product-pictures/rock5t.webp",
products_link: "/rock5/rock5t",
docs:
[
{
docs_link: "/rock5/rock5t",
docs_photo_type: "Overview",
docs_name_en: "Overview",
docs_name_zh: "ROCK 5T 概览",
docs_info_en: "Overview of the ROCK 5T",
docs_info_zh: "ROCK 5T 概览",
},
],
},
{
products_name: "ROCK 5 ITX",
products_photo_url: "/home/product-pictures/rock5itx.webp",
Expand Down
8 changes: 6 additions & 2 deletions docs/common/accessories/_fan.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@

<pre style={{ whiteSpace: "nowrap" }}>
<!-- prettier-ignore -->
radxa@{props.model}:~$ echo 0 | sudo tee /sys/class/thermal/cooling_device{props.pwm_fan_dev_id}/cur_state
echo 0 | sudo tee /sys/class/thermal/cooling_device{props.pwm_fan_dev_id}/cur_state
or
echo 0 | sudo tee /sys/devices/platform/pwm-fan/hwmon/hwmon*/pwm1
</pre>

4. 将风扇调至最高档

<pre style={{ whiteSpace: "nowrap" }}>
<!-- prettier-ignore -->
radxa@{props.model}:~$ sudo cp /sys/class/thermal/cooling_device{props.pwm_fan_dev_id}/max_state /sys/class/thermal/cooling_device{props.pwm_fan_dev_id}/cur_state
sudo cp /sys/class/thermal/cooling_device{props.pwm_fan_dev_id}/max_state /sys/class/thermal/cooling_device{props.pwm_fan_dev_id}/cur_state
or
echo 255 | sudo tee /sys/devices/platform/pwm-fan/hwmon/hwmon*/pwm1
</pre>

- step_wise
Expand Down
113 changes: 113 additions & 0 deletions docs/common/dev/_rsdk.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
## 使用 `rsdk`

[`rsdk`](https://github.com/RadxaOS-SDK/rsdk) 是目前 RadxaOS 的生成环境,其有以下几个特点:

1. 生成环境容器化,无需额外配置生成依赖
2. 模块化的生成代码,修改方便
3. 支持 x86、ARM64 平台上运行

### 这里简单介绍如何安装并使用 `rsdk`

1. 首先,请安装所需的依赖项:

```
sudo apt-get update
sudo apt-get install git qemu-user-static binfmt-support
sudo apt-get install npm docker.io
sudo usermod -a -G docker $USER
```

2. 使用以下命令克隆项目git并安装devcontainer

```
git clone --recurse-submodules https://github.com/RadxaOS-SDK/rsdk.git
cd rsdk
npm install @devcontainers/cli
export PATH="$PWD/src/bin:$PWD/node_modules/.bin:$PATH"
rsdk devcon up
rsdk devcon
```

当终端出现以下所示,表明现在处于 rsdk 的 dev 容器 shell 中

```
██████╗ ███████╗██████╗ ██╗ ██╗
██╔══██╗██╔════╝██╔══██╗██║ ██╔╝
██████╔╝███████╗██║ ██║█████╔╝
██╔══██╗╚════██║██║ ██║██╔═██╗
██║ ██║███████║██████╔╝██║ ██╗
╚═╝ ╚═╝╚══════╝╚═════╝ ╚═╝ ╚═╝
RadxaOS Software Development Kit

Please run `rsdk shell` to enter the full development shell.

direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +DETERMINISTIC_BUILD +DEVENV_DOTFILE +DEVENV_PROFILE +DEVENV_ROOT +DEVENV_RUNTIME
+DEVENV_STATE +DEVENV_TASKS +HOST_PATH +IN_NIX_SHELL +LD +LOCALE_ARCHIVE +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
+NIX_BUILD_CORES +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_LDFLAGS
+NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_STORE +NM +NODE_PATH +OBJCOPY +OBJDUMP +PKG_CONFIG +PKG_CONFIG_PATH +PYTHONHASHSEED +PYTHONNOUSERSITE
+PYTHONPATH +RANLIB +READELF +SIZE +SOURCE_DATE_EPOCH +STARSHIP_SESSION_KEY +STRINGS +STRIP +_PYTHON_HOST_PLATFORM +_PYTHON_SYSCONFIGDATA_NAME +__structuredAttrs +buildInputs
+buildPhase +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated
+depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +hardeningDisable +mesonFlags +name +nativeBuildInputs +out +outputs +patches
+phases +preferLocalBuild +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH ~XDG_DATA_DIRS

vscode ➜ /workspaces/rsdk (main) $
```

3.在终端中运行 rsdk 来启动 TUI 向导。

```
┌─────────────────┤ RSDK ├──────────────────┐
│ Please select a task: │
│ │
│ Build system image │
│ ========= │
│ About │
│ │
│ <Ok> <Cancel> │
│ │
└───────────────────────────────────────────┘
```

选择要构建的产品

```
┌─────────────────┤ RSDK ├──────────────────┐
│ Please select a product: │
│ │
│ ( ) rock-5a ▒ │
│ (*) rock-5b ▒ │
│ ( ) rock-5c ▒ │
│ │
│ <Ok> <Cancel> │
│ │
└───────────────────────────────────────────┘
```

选择`yes`开始构建, rsdk-tui 将运行相关的 CLI 命令来完成镜像编译

```
┌─────────────────┤ RSDK ├──────────────────┐
│ │
│ Are you sure to build for 'rock-5b'? │
│ │
│ │
│ <Yes> <No> │
│ │
└───────────────────────────────────────────┘
```

编译结束之后会生成一个 `out`目录, output.img 即最终生成的镜像

```
vscode ➜ /workspaces/rsdk (main) $ ls out/rock-5b_bookworm_kde/
build-image config.yaml debs manifest output.img rootfs.tar seed.tar.xz
```

仓库详细使用,请参考 [rsdk](https://radxaos-sdk.github.io/rsdk/) 页面。

如需要在 `rsdk` 基础上进行二次开发,则请继续阅读文档 [Build customization](https://radxaos-sdk.github.io/rsdk/tutorials/customize.html)。

### 常见问题

1. 开发容器设置暂停并提示:You might be rate limited by GitHub。您可能受到GitHub的速率限制。请按照输出中列出的说明进行操作。
2. 启动开发容器失败。请编辑 .devcontainer/devcontainer.json,并调整runArgs属性。
8 changes: 4 additions & 4 deletions docs/common/general/_power_board_from_40pin.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 如何通过 GPIO 给板子供电

大部分 radxa sbc 都可以从 40 PIN 上的 GPIO 接口来供电启动,少部分启动电压超过 5V 的除外. 5B/5B+ 5V可以启动,这里以 5B+ 为例来进行讲解。
大部分 radxa sbc 都可以从 40 PIN 上的 GPIO 接口来供电启动,少部分启动电压超过 5V 的除外. 这里以 5B+ 为例来进行讲解。

## 准备工作

- 5V 电源
- 杜邦线 4根
- ROCK 5B+ 一块
- ROCK 5B+

## 步骤

Expand All @@ -24,9 +24,9 @@

- 用杜邦线分别接电源的正负极, 2 根接正极, 2 根接负极.

- 调整电源电压为 5V,然后电源上电
- 电源的正极接到 40 PIN 的 5V 输入的 PIN 上,负极接到 40 PIN 的GND上,注意不要接反,否则短路烧坏板子

- 用一端接电源正极的杜邦线接 40 PIN 的 5V 输入的 PIN 上,负极的杜邦线接到 40 PIN 的GND上
- 调整电源电压为 5V,然后电源上电

<img
src="/img//rock5b/rock5bp_40pin_power_1.webp"
Expand Down
21 changes: 21 additions & 0 deletions docs/common/radxa-os/_autologin.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
您可以将系统配置为自动登录而无需输入密码。

<Tabs>
<TabItem value="Debian 11">
如图,点击系统设置界面,选择`Startup and Shutdown`.

![ROCK5A_Auto_Login](/img/rock5a/rock5a_auto_login_1.webp)

如图切换到`Advanced`,点击方框选择自动登录的用户,然后点击`Apply`,完成自动登录设置。 现在重新启动计算机将不再需要您输入登录密码。

![ROCK5A_Auto_Login](/img/rock5a/rock5a_auto_login_2.webp)

</TabItem>
<TabItem value="Debian 12">

如图,使用` Ctrl + Alt + T` 调出终端, 然后输入`rsetup`, 选择 `User Settings` 进行配置。

![ROCK5T_Auto_Login](/img/rock5t/rock5t-autologin-1.webp)

选择`Configure auto login`,

![ROCK5T_Auto_Login](/img/rock5t/rock5t-autologin-2.webp)

按空格选中 `gdm.service`, 然后选中`OK`完成自动登录设置。 现在重新启动计算机将不再需要您输入登录密码。

![ROCK5T_Auto_Login](/img/rock5t/rock5t-autologin-3.webp)

</TabItem>

</Tabs>
4 changes: 4 additions & 0 deletions docs/rock5/products.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ ROCK 5 系列是瑞莎基于 Rockchip 的 RK3588 及 RK3588-S 高端 SoC 解决
| :----------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------: |
| ![ROCK 5C](/img/rock5c/rock-5c-and-5c-lite-comic.webp) | Radxa ROCK 5C 是一款紧凑型单板计算机(SBC),拥有一系列领先的功能、特性和扩展选项。对于创客、物联网爱好者、业余爱好者、游戏玩家、PC用户以及所有追求卓越性能和可靠性的高规格平台的人来说,ROCK 5C 是理想的选择。ROCK 5C 提供两个版本:标准版(基于RK3588S2)和 Lite 版(基于RK3582)。这两个版本在大部分功能上相同,唯一的区别在于 SoC(片上系统)。在后续的文档中,除非特别说明,"ROCK 5C" 指的是 ROCK 5C 标准版和 5C Lite 版本。 | [ROCK 5C 概览](/rock5/rock5c/getting-started) |

| ROCK 5 Model T | 简介 | 产品详情 |
| :----------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------: |
| ![ROCK 5T](/img/rock5t/rock-5t-comic.webp) | Radxa ROCK 5T 是 Radxa ROCK 5B+ 的升级版,这款紧凑型单板计算机(SBC)在性能和功能上都有显著提升,接口更为丰富。它面向制造商、物联网爱好者、业余开发者、游戏玩家和 PC 用户,提供了一个强大的平台,适合需要高性能和高可靠性的应用场景。Radxa ROCK 5T 是一款理想的选择,无论是用于项目开发还是日常应用,都能提供出色的体验。 | [ROCK 5T 概览](/rock5/rock5t/getting-started) |

| ROCK 5 ITX | 简介 | 产品详情 |
| :----------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------: |
| ![ROCK 5 ITX](/img/rock5itx/rock5itx-comic.webp) | Radxa ROCK 5 ITX 是瑞莎团队全力打造的一款全面兼容 Mini-ITX 规范的单板计算机/主板。搭载高性能Rockchip RK3588 SoC,此款主板标志着开源单板机领域全面迈向 ARM PC 时代。 | [ROCK 5 ITX 概览](/rock5/rock5itx/getting-started) |
9 changes: 9 additions & 0 deletions docs/rock5/rock5t/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 1
---

# ROCK 5T

一台具有 8K + 4K 双显的优雅单板计算机(SBC)。

<DocCardList />
43 changes: 43 additions & 0 deletions docs/rock5/rock5t/_image.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React, { Fragment } from "react";

<ul>
<li style={{ display: `${props.loader ? "block" : "none"}` }}>
{" "}
<a href="https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rk3588_spl_loader_v1.15.113.bin">
{" "}
Loader: RK3588_SPL_Loader_v1.15.113.bin{" "}
</a>
</li>

{" "}

<li style={{ display: `${props.rock5t_system_img_61 ? "block" : "none"}` }}>
{" "}
<a href="https://github.com/radxa-build/rock-5t/releases/download/rsdk-b2/rock-5t_bookworm_kde_b2.output.img.xz">
{" "}
ROCK 5T 系统镜像 (6.1 内核) : rock-5t_bookworm_kde_b2{" "}
</a>
</li>

{" "}

<li style={{ display: `${props.spi_img ? "block" : "none"}` }}>
{" "}
<a
href="https://dl.radxa.com/rock5/sw/images/loader/rock-5t/release/rock-5t-spi-image-gd1cf491-20240523.img"
alt="spi image"
>
SPI Image: spi_image.img{" "}
</a>
</li>
<li style={{ display: `${props.miniloader ? "block" : "none"}` }}>
{" "}
<a
href="https://dl.radxa.com/rock5/5itx/images/MiniLoaderAll.bin"
alt="MiniLoader"
>
{" "}
MiniLoader.bin{" "}
</a>
</li>
</ul>
9 changes: 9 additions & 0 deletions docs/rock5/rock5t/app-development/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 4
---

# 应用开发

主要介绍上层应用开发,比如 QT, WiringX, Mraa 等

<DocCardList />
10 changes: 10 additions & 0 deletions docs/rock5/rock5t/app-development/gpiod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 2
description: "深入了解 GPIOD"
---

# GPIOD 使用

import GPIOD from '../../../common/dev/\_gpiod.mdx';

<GPIOD />
10 changes: 10 additions & 0 deletions docs/rock5/rock5t/app-development/hdmi-rx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 4
description: "探索 HDMI RX 功能,体验高清视频与音频的无缝接入与处理"
---

import HdmiRX from '../../../common/dev/\_hdmi-rx.mdx';

# HDMI RX Usage

<HdmiRX />
8 changes: 8 additions & 0 deletions docs/rock5/rock5t/app-development/mraa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
sidebar_position: 3
description: "探索适用于 Linux 的多功能 I/O 通信库 Eclipse Mraa"
---

# Mraa 使用(暂未支持)

import MRAA from '../../../common/dev/\_mraa.mdx';
10 changes: 10 additions & 0 deletions docs/rock5/rock5t/app-development/opencv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 5
description: "开启 OpenCV 计算机视觉的大门,让图像与现实世界无缝连接"
---

# OpenCV

import OPENCV from '../../../common/dev/\_opencv.mdx';

<OPENCV />
10 changes: 10 additions & 0 deletions docs/rock5/rock5t/app-development/panfork.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 6
description: "通过 Panfork GPU Driver,享受开源驱动带来的 Linux 图形生态与性能的和谐融合"
---

import Panfork from '../../../common/dev/\_panfork.mdx';

# Panfork GPU Driver

<Panfork />
10 changes: 10 additions & 0 deletions docs/rock5/rock5t/app-development/qt_cross_compile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 7
description: "通过 QT 交叉编译,享受在 ARM 平台上开发高效、人性化的应用程序的便捷与乐趣"
---

# QT 交叉编译

import QTCROSSCOMPILE from '../../../common/dev/\_qt-cross-compile.mdx';

<QTCROSSCOMPILE />
9 changes: 9 additions & 0 deletions docs/rock5/rock5t/app-development/rkllm_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 13
---

# RKLLM 安装

import Rkllminstall from '../../../common/dev/\_rkllm-install.mdx';

<Rkllminstall />
9 changes: 9 additions & 0 deletions docs/rock5/rock5t/app-development/rkllm_usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 14
---

# RKLLM 使用与大语言模型部署

import Rkllmusage from '../../../common/dev/\_rkllm-usage.mdx';

<Rkllmusage />
10 changes: 10 additions & 0 deletions docs/rock5/rock5t/app-development/rknn_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 9
description: "通过 RKNN 安装,开启 AI 模型在 Rockchip NPU 上的高效推理之旅,感受科技与人文的完美融合"
---

# RKNN 安装

import RKNNinstall from '../../../common/dev/\_rknn-install.mdx';

<RKNNinstall />
9 changes: 9 additions & 0 deletions docs/rock5/rock5t/app-development/rknn_quick_start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 14
---

# RKNN 快速例子

import Rknntoolkit2 from '../../../common/dev/\_rknn-toolkit2.mdx';

<Rknntoolkit2 />
Loading
Loading