feat(device): 0.1.1——shell_ver 编码兜底、all 目标补 linux/mips 软浮点

- shellInfo 拿到的版本号先过 toUTF8:utf8.Valid 为真(英文版 Windows 的
  纯 ASCII、本来就是 UTF-8 的系统)原样返回,只有不是合法 UTF-8 时才按
  GBK 解,解不出来保留原样。中文 Windows 的 `cmd /c ver` 是 GBK,之前
  hello 上报的 shell_ver 显示成「Microsoft Windows [�汾 10.0.19045.7807]」。
- build.sh 的 all 目标补 linux/mips,并固定 GOMIPS=softfloat(AR9331 这类
  OpenWrt 设备没有 FPU,硬浮点二进制一跑就是非法指令);docker 分支同步。
- version 0.1.0 → 0.1.1,两台设备版本号一致但代码不同的坑到此为止。
This commit is contained in:
2026-11-20 14:50:29 +08:00
parent c9dd5e48bd
commit 3df103cd45
6 changed files with 34 additions and 11 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ git clone <本仓库> && cd device
go build -trimpath -ldflags "-s -w" -o bin/agent-device ./cmd/agent
```
交叉编译(一次出五个平台):
交叉编译(一次出六个平台):
```sh
sh scripts/build.sh all
@@ -137,4 +137,4 @@ core 通过同一条连接搬文件,**设备不需要任何额外端口**:
| 起始 cwd 越界 | 拒绝 |
| 断线重连 | 1s→2s→4s 退避,恢复后自动注册 |
在 Linux / macOS / Windows 三平台编译验证(amd64 + arm64)。
在 Linux / macOS / Windows 三平台编译验证(amd64 + arm64);另出 `linux-mips` 软浮点版给 OpenWrt 设备。