-
Notifications
You must be signed in to change notification settings - Fork 111
docs: add Radxa SBC Device Tree Overlay guide #1621
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,284 @@ | ||||||
| --- | ||||||
| title: Radxa SBC 添加 Device Tree Overlay | ||||||
| --- | ||||||
|
Comment on lines
+1
to
+3
|
||||||
|
|
||||||
| # Radxa SBC 添加 Device Tree Overlay | ||||||
|
|
||||||
| 本文介绍如何在 Radxa SBC(如 ROCK 3A、ROCK 3B、E23、E25、CM3 等)上添加自定义 Device Tree Overlay(设备树overlay),而不需要直接修改内核的 DTS 文件。 | ||||||
|
|
||||||
| ## 概念说明 | ||||||
|
|
||||||
| - **DTS**(Device Tree Source):设备树源码,文本格式 | ||||||
| - **DTO**(Device Tree Overlay):设备树overlay,在已有设备树基础上做增量修改 | ||||||
| - **DTC**(Device Tree Compiler):设备树编译器,将 DTS 编译为 DTB | ||||||
| - **`rsetup`**:Radxa 提供的外壳配置工具,用于管理 overlay | ||||||
|
|
||||||
| ## 操作流程 | ||||||
|
|
||||||
| ### 第一步:克隆仓库并准备构建环境 | ||||||
|
|
||||||
| ```bash | ||||||
| git clone https://github.com/radxa-pkg/radxa-overlays | ||||||
| cd radxa-overlays | ||||||
|
|
||||||
| # 安装构建依赖 | ||||||
| sudo apt build-dep . -y | ||||||
| ``` | ||||||
|
|
||||||
| ### 第二步:找到对应 SoC 的目录 | ||||||
|
|
||||||
| Overlay 文件按 SoC 平台分类存放: | ||||||
|
|
||||||
| ``` | ||||||
|
||||||
| ``` | |
| ```text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复:将该代码块标注为 ```text
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该表格的表头行以 || 开头(双竖线),会导致 Markdown 渲染/格式化不一致。建议按常规表格语法使用单个 | 开头(例如 | 字段 | 说明 |)。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
经检查,当前表格的表头已使用标准单竖线语法 `| 字段 | 说明 |`,未发现双竖线问题。如果在渲染后发现异常,请告知具体 URL 以便进一步排查。
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的代码块使用了未标注语言的围栏(```),会触发 agent-doc-lint 的 “unlabeled code fence” 校验失败。请为该代码块补充语言标注(例如 `text`/`console`)。
| ``` | |
| ```text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复:将该输出块标注为 ```text
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的代码块使用了未标注语言的围栏(```),会触发 agent-doc-lint 的 “unlabeled code fence” 校验失败。请为该代码块补充语言标注(例如 `text`/`console`)。
| ``` | |
| ```text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复:将该代码块标注为 ```text
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的代码块使用了未标注语言的围栏(```),会触发 agent-doc-lint 的 “unlabeled code fence” 校验失败。请为该代码块补充语言标注(例如 `text`/`console`)。
| ``` | |
| ```text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复:将该代码块标注为 ```text
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里说明“选择你刚编译的 overlay(路径为 .../*.dts)”,但上一步实际编译产物是 .dtbo(且第三方 overlay 一般也是安装/选择 .dtbo)。建议将此处的文件后缀与示例路径改为 .dtbo,避免读者按 .dts 选择导致失败。
| 然后选择你刚编译的 overlay(路径为 `arch/arm64/boot/dts/rockchip/overlays/*.dts`),确认后退出并重启。 | |
| 然后选择你刚编译的 overlay(路径为 `arch/arm64/boot/dts/rockchip/overlays/*.dtbo`),确认后退出并重启。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复:已将路径和文件后缀改为 *.dtbo(编译产物为 .dtbo 文件)
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/sys/kernel/debug/device-tree/overlay/ 通常是目录(包含多个 overlay 节点),对目录执行 cat 会报错(Is a directory)。建议改为 ls/find 等方式列出内容,或指向具体的文件节点。
| cat /sys/kernel/debug/device-tree/overlay/ 2>/dev/null | |
| find /sys/kernel/debug/device-tree/overlay/ -mindepth 1 -maxdepth 1 2>/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复:改为使用 find 命令列出目录内容,避免对目录执行 cat 报错
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该文档的 front matter 缺少
sidebar_position,会被scripts/agent-doc-lint.sh判定为失败(要求每个非_*.mdx/wrapper 文档必须包含sidebar_position)。建议在 front matter 中补充sidebar_position(并可选补充slug/description)。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复:在 front matter 中添加了 sidebar_position: 1