Radxa Local Docs
Purpose
Combine the previous device-info, mdmaker-deploy, and radxa-doc capabilities into one publishable skill.
Use Bundled Resources
- - Run
scripts/detect_device.sh to detect the current device model with Device Tree, DMI, hostname, and /proc/cpuinfo fallbacks. - Read
references/device-series-map.md when a detected or user-provided model must be mapped to a Radxa product series.
Workflow
- 1. Detect the current board model first.
- If detection fails or the host is not a Radxa board, fall back to the user-provided model name instead of guessing.
- Map the board model to a Radxa series with
references/device-series-map.md. - Check whether the local documentation mirror already exists under
~/.openclaw/MDMaker/dist/zh/ or ~/.openclaw/MDMaker/dist/en/. - If the user asks to deploy or update docs, use the MDMaker workflow below.
- If the user asks a documentation question, locate the right language directory, product series, model directory, and topic-specific markdown file before answering.
MDMaker Workflow
Deploy
CODEBLOCK0
Raw Docs Source
Prefer the upstream GitHub source first. Only fall back to the domestic GitCode mirror if GitHub clone or pull fails.
Primary source:
CODEBLOCK1
Fallback source:
CODEBLOCK2
If ~/.openclaw/MDMaker/radxa-docs/ already exists and GitHub access fails, switch the existing repo to GitCode and retry:
CODEBLOCK3
Update
CODEBLOCK4
Expected Paths
- - Project root: INLINECODE10
- Source repo: INLINECODE11
- Primary upstream: INLINECODE12
- Domestic upstream mirror: INLINECODE13
- Chinese docs: INLINECODE14
- English docs: INLINECODE15
If the mirror is missing and the user did not ask to deploy it, report that the prerequisite is missing instead of fabricating documentation answers.
Offline Query Workflow
Directory Selection
- - Choose
zh/ or en/ first. - Then enter
dist/<lang>/<series>/<model>/. - Common sections include
getting-started, hardware-design, low-level-dev, os-config, radxa-os, other-os, app-development, and apps-deployment.
Search Strategy
Prefer targeted file discovery over broad scans:
CODEBLOCK5
Use hardware-design for pinouts, interfaces, power, and schematic-adjacent questions.
Use getting-started and os-config for installation, boot, networking, and system setup.
Use low-level-dev for bootloader, Device Tree, and low-level platform details.
Use app-development and apps-deployment for software stacks and deployment topics.
Relative Link Handling
When a document contains relative .md links with ../, normalize the link against the current document path, then open the resolved file under the same dist/<lang>/ tree.
Output Rules
- - Quote concrete file paths when citing local documentation.
- State clearly when the answer is confirmed from local docs versus inferred from model mapping.
- If multiple boards fit the same series, ask or infer only from explicit evidence such as detection output or the user’s board name.
Safety
- - Do not assume a board model without evidence.
- Do not perform flashing, partitioning, bootloader overwrite, or EEPROM changes as part of this skill.
- Keep commands low-risk unless the user explicitly asks for deployment or update actions.
Radxa 本地文档
目的
将之前的 device-info、mdmaker-deploy 和 radxa-doc 功能整合为一个可发布的技能。
使用捆绑资源
- - 运行 scripts/detect_device.sh,通过设备树、DMI、主机名和 /proc/cpuinfo 回退机制检测当前设备型号。
- 当检测到或用户提供的型号需要映射到 Radxa 产品系列时,查阅 references/device-series-map.md。
工作流程
- 1. 首先检测当前主板型号。
- 如果检测失败或主机不是 Radxa 主板,则回退到用户提供的型号名称,而非自行猜测。
- 使用 references/device-series-map.md 将主板型号映射到 Radxa 系列。
- 检查本地文档镜像是否已存在于 ~/.openclaw/MDMaker/dist/zh/ 或 ~/.openclaw/MDMaker/dist/en/ 目录下。
- 如果用户要求部署或更新文档,则使用下面的 MDMaker 工作流程。
- 如果用户提出文档相关问题,在回答前先定位正确的语言目录、产品系列、型号目录和特定主题的 Markdown 文件。
MDMaker 工作流程
部署
bash
cd ~/.openclaw
git clone -b agent https://github.com/ZIFENG278/MDMaker.git
cd ~/.openclaw/MDMaker
python3 -m venv venv
source venv/bin/activate
pip install requests tqdm
python buildmddocs.py
原始文档源
优先使用上游 GitHub 源。仅当 GitHub 克隆或拉取失败时,才回退到国内 GitCode 镜像。
主要源:
bash
git clone https://github.com/radxa-docs/docs.git ~/.openclaw/MDMaker/radxa-docs
回退源:
bash
git clone https://gitcode.com/radxa-docs/docs.git ~/.openclaw/MDMaker/radxa-docs
如果 ~/.openclaw/MDMaker/radxa-docs/ 已存在且 GitHub 访问失败,则将现有仓库切换到 GitCode 并重试:
bash
cd ~/.openclaw/MDMaker/radxa-docs
git remote set-url origin https://gitcode.com/radxa-docs/docs.git
git pull
更新
bash
cd ~/.openclaw/MDMaker
source venv/bin/activate
python updatemddocs.py
预期路径
- - 项目根目录:~/.openclaw/MDMaker/
- 源仓库:~/.openclaw/MDMaker/radxa-docs/
- 主要上游源:https://github.com/radxa-docs/docs.git
- 国内上游镜像:https://gitcode.com/radxa-docs/docs.git
- 中文文档:~/.openclaw/MDMaker/dist/zh/
- 英文文档:~/.openclaw/MDMaker/dist/en/
如果镜像缺失且用户未要求部署,则报告缺少必要前提条件,而非编造文档答案。
离线查询工作流程
目录选择
- - 首先选择 zh/ 或 en/。
- 然后进入 dist//// 目录。
- 常见章节包括 getting-started、hardware-design、low-level-dev、os-config、radxa-os、other-os、app-development 和 apps-deployment。
搜索策略
优先进行有针对性的文件查找,而非广泛扫描:
bash
find ~/.openclaw/MDMaker/dist/// -name .md
rg -n ~/.openclaw/MDMaker/dist///
对于引脚定义、接口、电源和原理图相关问题,使用 hardware-design。
对于安装、启动、网络和系统设置,使用 getting-started 和 os-config。
对于引导加载程序、设备树和底层平台细节,使用 low-level-dev。
对于软件栈和部署主题,使用 app-development 和 apps-deployment。
相对链接处理
当文档包含带有 ../ 的相对 .md 链接时,根据当前文档路径规范化链接,然后在同一 dist// 目录树中打开解析后的文件。
输出规则
- - 引用本地文档时,注明具体的文件路径。
- 明确说明答案是来自本地文档确认,还是基于型号映射推断。
- 如果多个主板属于同一系列,仅根据检测输出或用户提供的主板名称等明确证据进行询问或推断。
安全规范
- - 在没有证据的情况下,不要假设主板型号。
- 本技能不执行刷写、分区、引导加载程序覆盖或 EEPROM 更改操作。
- 除非用户明确要求部署或更新操作,否则保持命令低风险。