Skip to content

Commit a9a8518

Browse files
Merge pull request #3 from Awesome-Embedded-Learning-Studio/docs/vitepress-site
docs: VitePress 文档站点 + GitHub Pages 自动部署
2 parents 2edc3b0 + a23a1f4 commit a9a8518

88 files changed

Lines changed: 6016 additions & 105 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy VitePress
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '22'
26+
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: 10
31+
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Build
36+
run: pnpm build
37+
38+
- name: Deploy to GitHub Pages
39+
uses: peaceiris/actions-gh-pages@v4
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./site/.vitepress/dist

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,11 @@ compile_commands.json
7575
!**/.gitkeep
7676

7777
*.bin
78-
*.img
78+
*.img
79+
80+
# --- VitePress 文档站点 ---
81+
node_modules/
82+
site/.vitepress/dist/
83+
site/.vitepress/cache/
84+
site/.vitepress/.temp/
85+
*.tgz

document/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rk-forge 的文档分四层,各司其职。原始过程素材(raw 笔记 + 板
99
| 教程 | [tutorial/](tutorial/) | 面向外部读者:结论性 how-to(成功路径)。每章"成功长这样"配真实 UART 抓取。 |
1010
| 踩坑日记 | [pitfalls/](pitfalls/) |**故障域分篇**(4 篇),还原真实时间线 + 弯路 + 被推翻的结论 + 每步板上 log 佐证,覆盖 12 条坑。 |
1111
| 过程笔记 | [notes/](notes/) | raw dated bringup 日记(含失败、噪音、半成品),honesty substrate,是踩坑日记的取证源。 |
12-
| 归档 | [archive/](archive/) | 被证伪/取代的旧结论文档,带 superseded banner + canonical 指针,保留"走过的错路"但不误导。 |
12+
| 归档 | `archive/` | 被证伪/取代的旧结论文档,带 superseded banner + canonical 指针,保留"走过的错路"但不误导。 |
1313
| 参考 | [sdk-diff.md](sdk-diff.md) | vendor SDK vs 主线移植的逐外设差距对照(活文档)。 |
1414

1515
## 板上日志(取证素材)

document/index.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: home
3+
4+
hero:
5+
name: "RK-Forge"
6+
text: "RK3506 主线优先开发工作空间"
7+
tagline: 面向 Rockchip RK3506,从工具链到 rootfs、外设、SD 启动的完整主线学习路径——别人卖成品镜像,我们卖菜谱 + 灶 + 带你做饭的书
8+
image:
9+
src: /Awesome-Embedded.png
10+
alt: RK-Forge Logo
11+
actions:
12+
- theme: brand
13+
text: 快速开始
14+
link: /tutorial/boot/
15+
- theme: alt
16+
text: 教程目录
17+
link: /tutorial/
18+
- theme: alt
19+
text: GitHub
20+
link: https://github.com/Awesome-Embedded-Learning-Studio/rk-forge
21+
22+
features:
23+
- icon: 🚀
24+
title: 主线优先
25+
details: 主线 Linux 7.1 + U-Boot 2026.07-rc4,紧跟上游;RK-SDK 整个坍缩成 rkbin + 一块板级设备树
26+
link: /tutorial/boot/
27+
- icon: 🧩
28+
title: 有序补丁库
29+
details: quilt 风格 series,git am 落真实 commit、可 bisect、失败原子回滚——修掉"只打最后一个补丁"的老毛病
30+
link: /tutorial/boot/
31+
- icon: 📋
32+
title: 诚实的差距报告
33+
details: 逐子系统告诉你 vendor BSP 有什么 / 主线有什么 / 差什么 / 还能不能 boot,绝不藏着
34+
link: /sdk-diff
35+
- icon: 📖
36+
title: 0→1 教程
37+
details: 从空机器到 RK3506 主线启动到 UART 登录的可复现路径,每章配真实板上抓取,绝不合成
38+
link: /tutorial/
39+
- icon: 🛠️
40+
title: forge 编排器
41+
details: 把 kernel / uboot / rootfs 一长串命令收成一个 setup→build→pack→assemble 编排器,DAG + 增量跳过
42+
link: /tutorial/forge/
43+
- icon: 💾
44+
title: 双启动路径
45+
details: SPI-NAND(UBIFS)+ SD 卡(RKFW)两条启动路都板上验证通过,含 loader 弱写 saga 的根治解
46+
link: /tutorial/sd-boot/
47+
---

document/logs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# document/logs/ — 板上取证日志
22

3-
这里 47 个文件,全是 RK3506B 真板上电实跑的原始 UART 抓取加构建日志,没有一个是合成的。它们是 [pitfalls/](../pitfalls/)[notes/](../notes/) 里那些"成功长这样""失败长那样"的底气——每个结论背后都能翻出一行对应的串口原文。
3+
这里近百个文件,全是 RK3506B 真板上电实跑的原始 UART 抓取加构建日志,没有一个是合成的。它们是 [pitfalls/](../pitfalls/)[notes/](../notes/) 里那些"成功长这样""失败长那样"的底气——每个结论背后都能翻出一行对应的串口原文。
44

55
## 命名约定
66

document/logs/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: 板上日志
3+
---
4+
5+
<PageHeader icon="📟" title="板上日志" description="真实 UART 抓取 + 构建日志——笔记与踩坑日记「绝不合成」承诺的底气" />
6+
7+
这里(`document/logs/`)是近百个真实的板上 UART 抓取 + 构建日志,是笔记和踩坑日记"绝不合成"承诺的底气。每个里程碑 log 对应佐证哪个坑,完整索引见 [logs/README](./README)
8+
9+
> 这些 `.txt` 是原始串口 / 构建输出,站点上点开会在 GitHub 上查看(原样保留,不渲染)。
10+
11+
### 里程碑 log(近 → 远)
12+
13+
- [boot-sdl-202606211028.txt](boot-sdl-202606211028.txt) — SD 卡纯 ext4 启动收官(kernel + rootfs 都从 SD 起,无 ubi/panic)
14+
- [boot-sdl-202606201050.txt](boot-sdl-202606201050.txt) — WiFi RTL8733BU 板上全链验证
15+
- [boot-sdl-2026-06211109.txt](boot-sdl-2026-06211109.txt) — 全链主线启动到 `rk3506 login:`
16+
- [boot-sdl-202606182049.txt](boot-sdl-202606182049.txt) — buildroot 最小 rootfs 首启到 login

document/notes/02-2026-06-14-mainline-bringup-handoff.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ boot 链:SPL → 装 optee(0x1000)+uboot(0x200000)+fdt → 跳 optee(安全世
9494

9595
**地址坑(关键)**:主线 `CONFIG_TEXT_BASE=0x00800000`,vendor FIT 里 uboot@0x00200000,差 6MB。我们代码按 0x800000 链接,装到 0x200000 会崩(绝对寻址错)。**解法:ITS 里 uboot `load=0x00800000`**(匹配我们编译),optee(0x1000)/tee 不动。SPL 装我们 uboot 到 0x800000,optee NS 跳转地址由 SPL 按 loadable 的 load 设置 → 自洽。
9696

97-
**产物**:`third_party/bringup/fit/rk3506-mainline.its`(手写,复刻 vendor 结构)+ `rk3506-mainline.itb`(547KB,vendor 2017.09 mkimage `-E` 打包)。dumpimage 对照:optee hash 值与 vendor **逐字节相同**(同一颗 tee.bin),结构/conf 全对。Windows 副本:`D:\DownloadFromInternet\rk3506-uboot-mainline-vendor-fit.itb`
97+
**产物**:`board/aes/fit/rk3506-mainline.its`(手写,复刻 vendor 结构)+ `rk3506-mainline.itb`(547KB,vendor 2017.09 mkimage `-E` 打包)。dumpimage 对照:optee hash 值与 vendor **逐字节相同**(同一颗 tee.bin),结构/conf 全对。Windows 副本:`D:\DownloadFromInternet\rk3506-uboot-mainline-vendor-fit.itb`
9898

9999
**烧板(待用户操作,RKDevTool "下载镜像"模式)**:
100100
1. Loader = `rk3506-vendor-loader.bin`(vendor 原装,恢复 vendor SPL 到 boot 区 + 进下载模式)
@@ -119,7 +119,7 @@ boot 链:SPL → 装 optee(0x1000)+uboot(0x200000)+fdt → 跳 optee(安全世
119119
方案 B(借 vendor SPL/DDR/usbplug,主线 U-Boot proper 走 vendor 格式 FIT)已**完整跑通**。boot 链:`bootrom → vendor idblock(vendor DDR v1.06 + vendor SPL 2017) → 读 NAND uboot 分区(我们 FIT) → 装 optee(0x1000)+uboot(0x800000)+fdt → OP-TEE → NS 跳 0x800000 → 主线 U-Boot 2026.07-rc4 提示符`
120120

121121
**关键产出(可复用)**:
122-
- `third_party/bringup/fit/rk3506-mainline.its` + `rk3506-mainline.itb`(vendor 格式 FIT 模板,uboot load=0x800000)
122+
- `board/aes/fit/rk3506-mainline.its` + `rk3506-mainline.itb`(vendor 格式 FIT 模板,uboot load=0x800000)
123123
- `arch/arm/dts/rk3506.dtsi` 加 OTP 节点(ff4f0000)
124124
- Windows:`D:\DownloadFromInternet\rk3506-uboot-mainline-vendor-fit.itb` + `rk3506-vendor-loader.bin`
125125

document/notes/04-2026-06-14-mainline-uboot-via-vendor-spl.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ vendor 的 `tee.bin` 是 rkbin 预编译 blob,源码不在手,**无法事先确
9797
- `fdt` 节点:`data` 指向我们的 `u-boot.dtb`(rk3506-evb)。
9898
- `optee` 节点:`data` 指向 vendor `tee.bin`,`load/entry = <0x00001000>` 不动。
9999

100-
放新目录 `third_party/bringup/fit/`,三个 blob 汇聚进去(uboot-nodtb.bin / u-boot.dtb / tee.bin),ITS 用相对文件名自包含。
100+
放新目录 `board/aes/fit/`,三个 blob 汇聚进去(uboot-nodtb.bin / u-boot.dtb / tee.bin),ITS 用相对文件名自包含。
101101

102102
### mkimage 选型
103103
**vendor 的 `tools/mkimage`(2017.09)** 打包,而不是主线的。理由:与 vendor SPL 字节级兼容(同源工具),`-E` external data 模式是 RK SPL 的读取约定。
@@ -272,9 +272,9 @@ Scanning for bootflows in all bootdevs
272272
### 新产出物
273273
| 路径 | 内容 |
274274
|---|---|
275-
| `third_party/bringup/fit/rk3506-mainline.its` | 手写的 vendor 格式 FIT 源(可复用模板) |
276-
| `third_party/bringup/fit/rk3506-mainline.itb` | 打包好的 vendor 格式 FIT(547 KB) |
277-
| `third_party/bringup/fit/{uboot-nodtb.bin,u-boot.dtb,tee.bin}` | 三方汇聚的 blob |
275+
| `board/aes/fit/rk3506-mainline.its` | 手写的 vendor 格式 FIT 源(可复用模板) |
276+
| `board/aes/fit/rk3506-mainline.itb` | 打包好的 vendor 格式 FIT(547 KB) |
277+
| `board/aes/fit/{uboot-nodtb.bin,u-boot.dtb,tee.bin}` | 三方汇聚的 blob |
278278

279279
### Windows 侧(给 RKDevTool 烧板用,`D:\DownloadFromInternet\`)
280280
| 文件 | 角色 |

document/notes/05-2026-06-15-nand-boot-bbm-ecc-debug.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ RK=third_party/explore/rkbin/bin/rk35
7474
make ARCH=arm CROSS_COMPILE=$TC -j$(nproc) ROCKCHIP_TPL=$RK/rk3506b_ddr_750MHz_v1.06.bin TEE=$RK/rk3506_tee_v2.40.bin
7575

7676
# 打包方案 B FIT:
77-
cp u-boot-nodtb.bin u-boot.dtb third_party/bringup/fit/
78-
(cd third_party/bringup/fit && ../../vendor-sdk/u-boot/tools/mkimage -f rk3506-mainline.its -E rk3506-mainline.itb)
77+
cp u-boot-nodtb.bin u-boot.dtb board/aes/fit/
78+
(cd board/aes/fit && ../../vendor-sdk/u-boot/tools/mkimage -f rk3506-mainline.its -E rk3506-mainline.itb)
7979

8080
# 拷 Windows:
81-
cp third_party/bringup/fit/rk3506-mainline.itb /mnt/d/DownloadFromInternet/rk3506-uboot-mainline-vendor-fit.itb
81+
cp board/aes/fit/rk3506-mainline.itb /mnt/d/DownloadFromInternet/rk3506-uboot-mainline-vendor-fit.itb
8282
```
8383

8484
## 当前状态(2026-06-15)
@@ -92,6 +92,6 @@ cp third_party/bringup/fit/rk3506-mainline.itb /mnt/d/DownloadFromInternet/rk350
9292

9393
- U-Boot spinand driver: `third_party/explore/uboot/drivers/mtd/nand/spi/core.c`
9494
- W25N04KV 配置: `third_party/explore/uboot/drivers/mtd/nand/spi/winbond.c:483`
95-
- 内核 FIT: `third_party/bringup/fit/rk3506-kernel.itb`(+ `.its`)
96-
- U-Boot FIT(方案 B): `third_party/bringup/fit/rk3506-mainline.itb`
95+
- 内核 FIT: `board/aes/fit/rk3506-kernel.itb`(+ `.its`)
96+
- U-Boot FIT(方案 B): `board/aes/fit/rk3506-mainline.itb`
9797
- 上板日志: `document/logs/boot-sdl-202606150723.txt`(mtd read corrupt)、`uboot-debug.txt`(dump)

document/notes/06-2026-06-15-nand-recovery-vendor-sfc-bbt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ w: LBA=cd00 PBA=cd00 is bad block skip0 ← vendor 判
6060

6161
- corrupt 问题完整现状: [nand-ecc-debug-handoff.md](nand-ecc-debug-handoff.md)
6262
- U-Boot spinand driver: `third_party/explore/uboot/drivers/mtd/nand/spi/core.c`
63-
- 当前稳定版 U-Boot FIT: `third_party/bringup/fit/rk3506-mainline.itb`(md5 5520bc46)
64-
- 内核 FIT: `third_party/bringup/fit/rk3506-kernel.itb`
63+
- 当前稳定版 U-Boot FIT: `board/aes/fit/rk3506-mainline.itb`(md5 5520bc46)
64+
- 内核 FIT: `board/aes/fit/rk3506-kernel.itb`
6565
- 上板日志(恢复后): 本篇上面的输出(含 vendor SFC bad block 扫描)

0 commit comments

Comments
 (0)