feat(tools): fw_info/fw_pack 镜像解析重打包(CRC32验证+字节级往返),112 测试全绿

This commit is contained in:
agent committed 2026-07-24 11:09:44 +00:00
1 parent 0e2a6a351f
commit 7079053dde
10 files changed
+987 -1

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env python3
"""fw_info: 打印 DA14585 镜像头信息(JSON)。"""
import json, sys
from pathlib import Path
from fw import parse_image
if __name__ == "__main__":
data = Path(sys.argv[1]).read_bytes()
info = parse_image(data)
print(json.dumps({k: (hex(v) if isinstance(v, int) else v) for k, v in info.items()}, indent=2))