Files
MemRelay/projects/6f47523e-e22e-4cdd-bd18-76e5e474ee0c/curated/development/Ax9000WRTBuild – System Architecture Overview.md
T

77 lines
3.6 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Ax9000WRTBuild – System Architecture Overview
type: curated
permalink: main/projects/6f47523e-e22e-4cdd-bd18-76e5e474ee0c/curated/development/ax9000-wrtbuild-system-architecture-overview
stable_id: ac351f5e-5eb7-4752-8666-56550b5b2130
scope: project
project_id: 6f47523e-e22e-4cdd-bd18-76e5e474ee0c
workspace_type: development
usage_profile_id: null
preference_context: development
document_type: architecture
revision: 2
source_memory_ids: []
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: c62e79c3b986262321aa4242f0ece56c4629ae0e
source_git_commits:
- c62e79c3b986262321aa4242f0ece56c4629ae0e
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-120b
source_count: 81
source_revisions: {}
source_dispositions:
processed: 81
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids: []
job_cited_source_ids: []
conflicts: []
supersedes: []
preferences: []
source_cursor: 13
source_hash: a3dc8f049fcd5e54d4e2bc4b420c13cce749fadf5c3ca6178780171167541cf3
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: 0a761ef0-636c-4eff-8f8b-0e60626ecd35
created_at: '2026-08-12T18:38:12.167256+00:00'
updated_at: '2026-08-16T18:40:29.423396+00:00'
tags:
- architecture
- system
- docker
- fastapi
- vue
---
### 主机层
- **操作系统**:Windows 10/11 + WSL2(Docker Desktop 使用 Linux 容器),所有命令和路径需兼容 Windows(`ff34c6eb-6bba-41e5-9e43-ff80941fa823`、`6973450e-6ecc-48e3-8cdd-4d7d7707d843`)。
### 虚拟化层
- **Docker Engine**(Ubuntu 24.04)运行在 WSL2 中,容器名 `openwrt‑local‑builder:25.12`(`ac351f5e-5eb7-4752-8666-56550b5b2130`)。
- **持久化卷** `openwrt‑build‑work`(> 50 GB)缓存交叉编译工具链和中间产物(同上)。
### 容器内服务
- **FastAPI**(0.139)监听 `0.0.0.0:9001`(开发模式未认证),提供 RESTful API、构建状态、日志 SSE 等(`ff34c6eb-6bba-41e5-9e43-ff80941fa823`)。
- **Vue 3 + Vite** 前端在 `localhost:9000`,通过代理将 `/api/**`、`/artifacts/**` 转发至 FastAPI(同上)。
### 构建流水线(步骤 1‑10)
1. Docker 镜像构建(基础 Ubuntu + OpenWrt 依赖)。
2. 拉取 OpenWrt 源码(`https://github.com/qosmio/openwrt-ipq.git`,`25.12‑nss` 分支)。
3. 拉取外部包(`external‑packages.json`)。
4. 应用设备专属补丁 `patch_ax9000.py`(修改 DTS、分区布局、EMC2305 PWM)。
5. 生成配置(UCI 默认脚本、主题、Web 服务器)。
6. 验证 `defconfig` 并检查 NSS、IPv6、Proxy 兼容性。
7. 编译(`make -j$(nproc+1)`)。
8. 打包固件(`sysupgrade`, `factory.ubi`, `initramfs-*.itb`)。
9. 将产物复制至 `outputs/ax9000/` 并生成 ZIP,命名 `OpenWRT‑AX9000‑YYYY‑MM‑DD_HH‑mm‑ss.zip`。
10. 记录构建日志至 `outputs/ax9000/logs/`。
### 关键组件
- **`luci‑app‑ax900‑hardware`**:用户空间守护进程 `ax900‑hardware‑control`、`ax900‑led‑control` 与 LuCI 页面(`git:packages/luci-app-ax900-hardware/*`)。
- **EMC2305 驱动补丁**(`830‑01`‑`830‑05`)使 PWM 节点可通过 DT 配置(`git:profiles/ax9000/kernel-patches/*`)。
- **NSS 加速**:内核模块 `kmod‑qca‑nss‑*`、固件 `nss‑firmware‑ipq807x`(`4f3555d5-bffb-45c9-9c35-a04e7c41800f`)。
**来源**: `ac351f5e-5eb7-4752-8666-56550b5b2130`, `7b8945b7-d58e-4bbd-93d0-63b5569c98e4`, `ff34c6eb-6bba-41e5-9e43-ff80941fa823`, `6973450e-6ecc-48e3-8cdd-4d7d7707d843`, `4f3555d5-bffb-45c9-9c35-a04e7c41800f`, `git:profiles/ax9000/kernel-patches/*`, `git:packages/luci-app-ax900-hardware/*`。