Skip to content

发布 v0.5.0:修复 OTA 与 SD 卡 WebUI 升级#35

Merged
massif-01 merged 5 commits into
mainfrom
release/v0.5.0
Jun 10, 2026
Merged

发布 v0.5.0:修复 OTA 与 SD 卡 WebUI 升级#35
massif-01 merged 5 commits into
mainfrom
release/v0.5.0

Conversation

@massif-01

@massif-01 massif-01 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

变更

  • 将固件基础版本升级到 0.5.0,并 fresh build 生成新的 TianShanOS.bin / www.bin。
  • OTA Server 改为从实际固件镜像里的 ESP-IDF app desc 读取版本、IDF 版本和编译时间,修复 /version 显示 unknown。
  • OTA Server 同时支持 /www 和 /www.bin,兼容旧 WebUI 代理升级路径;新 WebUI 改为下载 /www.bin。
  • 修复浏览器代理 OTA:勾选包含 WebUI 时,WebUI 下载或上传失败会直接中止,不再跳过 WebUI 后重启旧 app。
  • 修复 recovery manifest 协议:下载模块写入 version 字段,并保留 firmware_version 兼容字段。
  • 修复 SD 卡 OTA 异步任务引用前端 JSON 字符串生命周期的问题。
  • SD 卡恢复升级改为完整包语义:默认要求 TianShanOS.bin 与 www.bin 同时存在;如需只刷 app,必须在 manifest 中显式设置 "www": ""。
  • WebUI 的 SD 卡升级输入支持目录、TianShanOS.bin 或 www.bin,并在勾选 WebUI 时提前校验 www.bin,避免只刷 app 后重启。
  • WebUI 静态资源移除 JS/CSS 长期 immutable 缓存,并给主要资源加版本参数,避免升级后浏览器继续使用旧 app.js。
  • 取消 .gitignore 对整个 build/ 目录的覆盖,改为只忽略中间产物,并跟踪 Release 相关的 bootloader、partition table、ota_data_initial 和 flasher_args.json。
  • 修复 GitHub Actions:set-target 前清理 checkout 中不完整的 build/ 目录;版本脚本忽略 build/ 生成产物变化,避免 CI 构建版本误带 dirty 标记。

根因说明

之前设备刷完仍显示 0.4.9 的直接原因是:旧 WebUI 代理模式请求 OTA Server 的 /www,但 OTA Server 只提供 /www.bin,导致 /sdcard/recovery 里只有 TianShanOS.bin 和 manifest,没有 www.bin。启动 recovery 因完整包校验拒绝刷 app,所以 ota_0/ota_1 都仍是 0.4.9。

验证

  • ./tools/build.sh --fresh
  • git diff --check
  • git diff --cached --check
  • node --check components/ts_webui/web/js/app.js
  • python3 -m py_compile OTA_Server/server.py tools/gen_version.py
  • tools/gen_version.py 在源码干净时输出 0.5.0+7a572d1... 且无 dirty 标记
  • OTA_Server 读取 build/TianShanOS.bin 得到版本 0.5.0+60d7b32.06110139、IDF v5.5.2
  • 设备 API 现场确认失败状态:ota_0/ota_1 都是 0.4.9,/sdcard/recovery 只有 0.5.0 TianShanOS.bin,缺少 www.bin
  • GitHub API 已实际访问 RMinte/TianshanOS

Release / Actions 链路

当前 workflow 监听 release.published 和 v* tag push。修复后会将 v0.5.0 tag 更新到最新提交,通过 tag push 重新触发 Actions,并将 build/*.bin、bootloader.bin、partition-table.bin 和 flasher_args.json 上传到 v0.5.0 Release。

@massif-01 massif-01 merged commit 06dad0a into main Jun 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant