Compare commits

..
2 Commits
Author SHA1 Message Date
boweiandClaude Opus 5 42edf13936 sync: Shanghai-U9 2026-09-03 硬编码审计清掉 0819/0826 挂了两轮的文档类遗留
smod_atsc_dev(SKILL.md / references/imx6.md / references/fpga.md)、
fpga_update(SKILL.md / references/protocol.md)、fpga-imx6-flow(SKILL.md)
正文表格与 shell 示例里的 E:\Xilinx_design\smod\SMOD_ATSC\... 和 192.168.1.143
改成引用 skills_env.md 的 SMOD_REPO_ROOT / SMOD_BOARD_IP;shell 块统一用 $BOARD
并在块内注明取值出处。13 处锚点全部唯一命中,无行为改动。

刻意未改:各 skill 的 YAML description 里的同名字面量(那是触发关键词,不是
脚本取值,改了降低匹配率);脚本里 _env_lookup(KEY, 字面量) 形式的回落默认值;
fpga_flash/SKILL.md 的 SMOD_DTMB_CG 命令示例(属另一个工程,无对应 env 键)。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018FykpdV2Y4RUWXU5PtoLqh
2026-09-03 02:52:05 +08:00
boweiandClaude Opus 5 ecc913c4f1 sync: Shanghai-U9 2026-09-03 MCP 排除清单补 Codex 桌面自带的 cua_repl(WindowsApps 路径原先认不出)
Test-CodexManaged 原来只按名字认 node_repl、按路径认 .codex\runtimes 与
.codex\plugins\cache。Codex 更新后新增的 cua_repl 的 command 在
C:\Program Files\WindowsApps\OpenAI.Codex_...\app\ChatGPT.exe,两条都不命中,
于是被当成"Codex 独有的可移植 MCP"报进差集,险些复制到 Claude 侧。
名字集合加 cua_repl,路径再认 WindowsApps\OpenAI.Codex 与 OpenAI\Codex\。
原有的 .codex 路径正则一字未动。tests PASS;重跑审计 exit 0,四项 Matched。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018FykpdV2Y4RUWXU5PtoLqh
2026-09-03 02:52:05 +08:00
7 changed files with 21 additions and 15 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ Here is the working recipe for the `modify_imx6` interrupt (cross-compile HEAD's
push it to the imx6). All of this is **network-based and fast** — no slow serial file push. push it to the imx6). All of this is **network-based and fast** — no slow serial file push.
**Hosts / creds** **Hosts / creds**
- **imx6 mgmt: `192.168.1.143`** (Windows host is on `192.168.1.125`, same subnet — `ping` works). - **imx6 mgmt: `SMOD_BOARD_IP` in `~\skills_env.md`** (the Windows host is on the same subnet — `ping` works).
The old memory "imx6 not reachable over the network" is **outdated**; the mgmt port is reachable. The old memory "imx6 not reachable over the network" is **outdated**; the mgmt port is reachable.
Login: **`root`**, password = `SMOD_SSH_PASS` in `~\skills_env.md`. (The serial console still works too but its login auto-logs-out and Login: **`root`**, password = `SMOD_SSH_PASS` in `~\skills_env.md`. (The serial console still works too but its login auto-logs-out and
is flaky; prefer network SSH for imx6 shell/log reads.) is flaky; prefer network SSH for imx6 shell/log reads.)
+5 -3
View File
@@ -48,8 +48,9 @@ DPD 的 sample&load 和升级数据流共用同一条 SPI1,而 FPGA 在升级
这条路径没被验证过(三次连续升级成功那次 `adpc=0`),所以稳妥起见先关掉: 这条路径没被验证过(三次连续升级成功那次 `adpc=0`),所以稳妥起见先关掉:
```bash ```bash
# BOARD = ~\skills_env.md 的 SMOD_BOARD_IP
# 登录后读 sys_cfg,第 3 个字段就是 adpc(0=OFF) # 登录后读 sys_cfg,第 3 个字段就是 adpc(0=OFF)
curl -s -b "session=$SESS" "http://192.168.1.143/atsc_status_cfg.cgi?sys_cfg=&" curl -s -b "session=$SESS" "http://$BOARD/atsc_status_cfg.cgi?sys_cfg=&"
``` ```
网页账号见 `~\skills_env.md` 的 `SMOD_WEB_USER` / `SMOD_WEB_PASS`(不是 `root`;SSH 凭据是 `SMOD_SSH_USER` / `SMOD_SSH_PASS`)。 网页账号见 `~\skills_env.md` 的 `SMOD_WEB_USER` / `SMOD_WEB_PASS`(不是 `root`;SSH 凭据是 `SMOD_SSH_USER` / `SMOD_SSH_PASS`)。
@@ -84,7 +85,8 @@ python scripts/fpga_ru.py --mcs ... --dry-run # 只校验文件,不碰硬
别信进度条,直接读设备日志: 别信进度条,直接读设备日志:
```bash ```bash
ssh -o HostKeyAlgorithms=+ssh-rsa root@192.168.1.143 \ # BOARD = ~\skills_env.md 的 SMOD_BOARD_IP
ssh -o HostKeyAlgorithms=+ssh-rsa root@$BOARD \
"grep 'ing|end' /var/module_log/imx_atsc_app.log | tail -3" "grep 'ing|end' /var/module_log/imx_atsc_app.log | tail -3"
``` ```
@@ -94,7 +96,7 @@ python scripts/fpga_ru.py --mcs ... --dry-run # 只校验文件,不碰硬
- **`ABORT_ERROR` 出现在第一帧** → mcs 格式不对,先跑 `--dry-run`。 - **`ABORT_ERROR` 出现在第一帧** → mcs 格式不对,先跑 `--dry-run`。
- **`ABORT_ERROR` 出现在数据流中后段** → 怀疑 SPI1 上有别人(DPD)在写,把 ADPC 关掉重试。 - **`ABORT_ERROR` 出现在数据流中后段** → 怀疑 SPI1 上有别人(DPD)在写,把 ADPC 关掉重试。
- **没有应答 / 超时** → app 的 `sys_ready` 还是 0,或者 app 没在跑。 - **没有应答 / 超时** → app 的 `sys_ready` 还是 0,或者 app 没在跑。
`ssh root@192.168.1.143 'ps | grep atsc'`(SSH 密码见 `~\skills_env.md` 的 `SMOD_SSH_PASS`,dropbear 老得很, `ssh root@$BOARD 'ps | grep atsc'`(`$BOARD` = `SMOD_BOARD_IP`、SSH 密码见 `~\skills_env.md` 的 `SMOD_SSH_PASS`,dropbear 老得很,
命令行 ssh 要加 `-o HostKeyAlgorithms=+ssh-rsa`)。 命令行 ssh 要加 `-o HostKeyAlgorithms=+ssh-rsa`)。
> 别用 `python ssh.py "tail -f ..."` 之类一次性读到 EOF 的封装去跟日志 —— 它永远不返回, > 别用 `python ssh.py "tail -f ..."` 之类一次性读到 EOF 的封装去跟日志 —— 它永远不返回,
+2 -1
View File
@@ -113,7 +113,8 @@ else ret_data = ERASER_ING; // ERROR 位
**这个 bug 还在。** 排查时不要信客户端的"erasing...",直接读设备日志: **这个 bug 还在。** 排查时不要信客户端的"erasing...",直接读设备日志:
```bash ```bash
ssh -o HostKeyAlgorithms=+ssh-rsa root@192.168.1.143 \ # BOARD = ~\skills_env.md 的 SMOD_BOARD_IP
ssh -o HostKeyAlgorithms=+ssh-rsa root@$BOARD \
"grep 'ing|end' /var/module_log/imx_atsc_app.log | tail -3" "grep 'ing|end' /var/module_log/imx_atsc_app.log | tail -3"
``` ```
+4 -4
View File
@@ -26,12 +26,12 @@ FPGA 做 8VSB 调制 / DPD / AGC / TS 前处理,imx6 跑 `atsc_app`(配置 A
| 项 | 值 | | 项 | 值 |
|---|---| |---|---|
| 激励器 Vivado 工程 | `E:\Xilinx_design\smod\SMOD_ATSC\my_exciter\my_exciter.xpr`(top = `smod_top`,也是 **git 仓库根**;脚本取 `~\skills_env.md` 的 `SMOD_REPO_ROOT`) | | 激励器 Vivado 工程 | `<SMOD_REPO_ROOT>\my_exciter.xpr`(top = `smod_top`;`SMOD_REPO_ROOT` 见 `~\skills_env.md`,它同时是 **git 仓库根**) |
| 打底 golden 工程 | `E:\Xilinx_design\smod\SMOD_ATSC\RU_golden\RU_golden.xpr`(top = `RU_golden_top`) | | 打底 golden 工程 | `<SMOD_REPO_ROOT>\..\RU_golden\RU_golden.xpr`(top = `RU_golden_top`) |
| FPGA / Flash | `xc7a200tfbg676-2` / Winbond **w25q128bv**(128 Mbit = 16 MB,SPIx1) | | FPGA / Flash | `xc7a200tfbg676-2` / Winbond **w25q128bv**(128 Mbit = 16 MB,SPIx1) |
| Vivado | 见 `~\skills_env.md` 的 `VIVADO_ROOT`(其下 `bin\vivado.bat`)——路径因机器而异,不要写死盘符 | | Vivado | 见 `~\skills_env.md` 的 `VIVADO_ROOT`(其下 `bin\vivado.bat`)——路径因机器而异,不要写死盘符 |
| imx6 源码 | `my_exciter\imx6\src\atsc_app`(Makefile 在该目录根) | | imx6 源码 | `my_exciter\imx6\src\atsc_app`(Makefile 在该目录根) |
| imx6 设备 | `192.168.1.143`,用户 `root`,密码见 `~\skills_env.md` 的 `SMOD_SSH_PASS`(网页 + SSH;Windows 主机 `192.168.1.125` 同网段) | | imx6 设备 | `SMOD_BOARD_IP`(见 `~\skills_env.md`),用户 `root`,密码见同文件的 `SMOD_SSH_PASS`(网页 + SSH;Windows 主机与它同网段) |
| 交叉编译 VM | 主机/用户/密码见 `~\skills_env.md` 的 `CROSS_VM_HOST` / `CROSS_VM_USER` / `CROSS_VM_PASS`(IP 会变,不要写死),构建目录 `~/atsc_head_build` | | 交叉编译 VM | 主机/用户/密码见 `~\skills_env.md` 的 `CROSS_VM_HOST` / `CROSS_VM_USER` / `CROSS_VM_PASS`(IP 会变,不要写死),构建目录 `~/atsc_head_build` |
| 工具链 | `/opt/fsl-imx-x11/4.1.15-2.0.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi` | | 工具链 | `/opt/fsl-imx-x11/4.1.15-2.0.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi` |
| app 部署路径 | `/aw/anywave/app/imx_atsc_app`(先写 `imx_atsc_app_head`,再 `cp -a` 覆盖 active) | | app 部署路径 | `/aw/anywave/app/imx_atsc_app`(先写 `imx_atsc_app_head`,再 `cp -a` 覆盖 active) |
@@ -62,7 +62,7 @@ FPGA 做 8VSB 调制 / DPD / AGC / TS 前处理,imx6 跑 `atsc_app`(配置 A
| 何时用 | 板子是砖 / 首次装机 / 要换 golden | 日常迭代,板子已有 golden 且网络能通 | | 何时用 | 板子是砖 / 首次装机 / 要换 golden | 日常迭代,板子已有 golden 且网络能通 |
| 烧什么 | `RU_golden\bitstream\golden_design_initial.mcs` | `my_exciter\bitstream\<tag>_update.mcs` | | 烧什么 | `RU_golden\bitstream\golden_design_initial.mcs` | `my_exciter\bitstream\<tag>_update.mcs` |
| 怎么做 | `/fpga_flash` skill(flash 型号 `w25q128bv`) | **`/fpga_update` skill** | | 怎么做 | `/fpga_flash` skill(flash 型号 `w25q128bv`) | **`/fpga_update` skill** |
| 需要 | USB-Blast + 上电时序 | 只要 `192.168.1.143` 能访问 | | 需要 | USB-Blast + 上电时序 | 只要 `SMOD_BOARD_IP` 能访问 |
| 风险 | 高(要动电源和 JTAG) | 低(写坏了 golden 会兜底) | | 风险 | 高(要动电源和 JTAG) | 低(写坏了 golden 会兜底) |
**调试期**还有第三种:`program_device` 直接把 `.bit` 下到 FPGA(掉电即失),配合 `.ltx` 抓 ILA。 **调试期**还有第三种:`program_device` 直接把 `.bit` 下到 FPGA(掉电即失),配合 `.ltx` 抓 ILA。
+1 -1
View File
@@ -4,7 +4,7 @@
| | my_exciter | RU_golden | | | my_exciter | RU_golden |
|---|---|---| |---|---|---|
| xpr | `E:\Xilinx_design\smod\SMOD_ATSC\my_exciter\my_exciter.xpr` | `...\RU_golden\RU_golden.xpr` | | xpr | `<SMOD_REPO_ROOT>\my_exciter.xpr`(见 `~\skills_env.md`) | `...\RU_golden\RU_golden.xpr` |
| top | `smod_top`(`my_exciter.srcs/sources_1/top/smod_top.v`,~2300 行) | `RU_golden_top` | | top | `smod_top`(`my_exciter.srcs/sources_1/top/smod_top.v`,~2300 行) | `RU_golden_top` |
| 作用 | ATSC 激励器全功能 | 打底镜像:网口 + quickboot 自烧,用来兜底和支撑远程升级 | | 作用 | ATSC 激励器全功能 | 打底镜像:网口 + quickboot 自烧,用来兜底和支撑远程升级 |
| 器件 | xc7a200tfbg676-2 | 同左 | | 器件 | xc7a200tfbg676-2 | 同左 |
+3 -3
View File
@@ -2,7 +2,7 @@
## 源码 ## 源码
`E:\Xilinx_design\smod\SMOD_ATSC\my_exciter\imx6\src\atsc_app`(Makefile 在这一层): `<SMOD_REPO_ROOT>\imx6\src\atsc_app`(Makefile 在这一层;`SMOD_REPO_ROOT` 见 `~\skills_env.md`):
| 目录 | 内容 | | 目录 | 内容 |
|---|---| |---|---|
@@ -37,7 +37,7 @@ VM 的 sshd 是现代版本,paramiko 5 / OpenSSH 都能连。若报
## 部署到设备 ## 部署到设备
设备 `192.168.1.143`,用户 `root`(密码见 `~\skills_env.md` 的 `SMOD_SSH_PASS`)。**它的 SSH 是老 dropbear**,有两个坑: 设备 `SMOD_BOARD_IP`(见 `~\skills_env.md`),用户 `root`(密码见同文件的 `SMOD_SSH_PASS`)。**它的 SSH 是老 dropbear**,有两个坑:
1. **算法太老**:paramiko 5 会报 `unknown cipher` / `no acceptable host key`。 1. **算法太老**:paramiko 5 会报 `unknown cipher` / `no acceptable host key`。
要用 **paramiko 2.12**(有 TripleDES / aes-cbc / ssh-rsa): 要用 **paramiko 2.12**(有 TripleDES / aes-cbc / ssh-rsa):
@@ -73,7 +73,7 @@ cp -a imx_atsc_app_head imx_atsc_app # 覆盖 active
`fpga[0xBB]=0x03`(sync=1 / tvalid=1)。`imx6_app.py log` 直接拉。 `fpga[0xBB]=0x03`(sync=1 / tvalid=1)。`imx6_app.py log` 直接拉。
- 配置:`/aw/anywave/cfg/exc_cfg.conf`,`[BLK_SYS_PARA] reg50` 选输入源 - 配置:`/aw/anywave/cfg/exc_cfg.conf`,`[BLK_SYS_PARA] reg50` 选输入源
—— `0`=Tuner,`1`=TS,`2`=EAS,`3`=TSoIP。 —— `0`=Tuner,`1`=TS,`2`=EAS,`3`=TSoIP。
- 网页:`http://192.168.1.143`(`sys_rf.html`、`sys_ts.html`、`sys_set.html`、 - 网页:`http://<SMOD_BOARD_IP>`(`sys_rf.html`、`sys_ts.html`、`sys_set.html`、
`status_info.html`、`log_output.html`、以及远程升级的 `upload.cgi`)。 `status_info.html`、`log_output.html`、以及远程升级的 `upload.cgi`)。
- 串口控制台(COM 号见 `~/fpga_imx6_flow.json` 的 `ports.imx6`,逐机而异、不入库)能用,但会自动登出、比较飘。**优先走网络 SSH**读日志和跑命令。 - 串口控制台(COM 号见 `~/fpga_imx6_flow.json` 的 `ports.imx6`,逐机而异、不入库)能用,但会自动登出、比较飘。**优先走网络 SSH**读日志和跑命令。
- 直接读 FPGA 寄存器可以 `i2cget`,但它会和 app 抢总线;带调试 ILA 的 bit 下更不可靠。 - 直接读 FPGA 寄存器可以 `i2cget`,但它会和 app 抢总线;带调试 ILA 的 bit 下更不可靠。
@@ -100,9 +100,12 @@ print(json.dumps(data.get("mcp_servers", {}), ensure_ascii=False))
} }
function Test-CodexManaged($Mcp) { function Test-CodexManaged($Mcp) {
if ($Mcp.name -eq "node_repl") { return $true } if ($Mcp.name -in @("node_repl", "cua_repl")) { return $true }
$command = [string]$Mcp.command $command = [string]$Mcp.command
return ($command -match '(?i)[\\/]\.codex[\\/](runtimes|plugins[\\/]cache)[\\/]') if ($command -match '(?i)[\\/]\.codex[\\/](runtimes|plugins[\\/]cache)[\\/]') { return $true }
# The Codex desktop app also bundles MCPs from its own install dir (MSIX
# WindowsApps, or AppData\Local\OpenAI\Codex). Host-owned, not portable.
return ($command -match '(?i)[\\/](WindowsApps[\\/]OpenAI\.Codex|OpenAI[\\/]Codex[\\/])')
} }
function Get-PortableMcps($Map, [string]$Side) { function Get-PortableMcps($Map, [string]$Side) {