Files
MeowOS-For-R3P2/patch_v2/meow_watchdog/build_watchdog.sh
T
tower 28fbc6094a fix(build): M56 r1 评审三条 P2 + 一条观察(脚本权限/可复现口径注释/watchdog 参数去内联+入门禁/REPACK 显式失败)
- P2-1 repack_repro.sh 提交为 100755(scripts/build/ 下唯一非 755 的 .sh,而头注释就让人直接执行)
- P2-2 注释与事实对齐:写明 squashfs/分片/ota_update.in 可复现,但 .upt 仍有 93 字节
  Rock Ridge TF backup date 差异(genisoimage 无覆盖开关),验收口径仍是 体积+unpack 0 diff+进包 md5
- P2-3 watchdog 参数不再内联复制:build_watchdog.sh 认 ZIGCC(照 build_netmgrd.sh 口径),
  rebuild_binaries.sh 改成调它;meow_watchdog 加入 test_time32_abi.sh 的 BUILD_TARGETS(11 个)。
  改后重编仍逐字节 25f769509a43d0f66287efd456c64281 / 100116,与内联那版一致
- 观察1:REPACK 显式指定但不存在 -> exit 1(此前会静默回退到不可复现的旧 repack.sh)
2026-11-12 08:44:27 +08:00

31 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
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.
#!/bin/bash
# build_watchdog.sh — meow_watchdog 交叉编译(mipsel 静态)+ 宿主测试构建。
#
# 用法:
# ./build_watchdog.sh # 交叉编译 → meow_watchdog(mipsel 静态,fw_content.conf 的 /usr/bin/meow_watchdog)
# ./build_watchdog.sh host # 宿主编译 test_wd_fw 并跑宿主回归
set -e
cd "$(dirname "$0")"
ROOT=../..
# 交叉编译器:ZIGCC env 优先(与 build_netmgrd.sh 同口径;干净 worktree 里 <root>/.tools
# 这个符号链接通常不存在,重编驱动会直接传 ZIGCC 进来),其次 <root>/.tools/,最后 $HOME/.tools/
CC="${ZIGCC:-$ROOT/.tools/zig-mipsel-cc}"
[ -x "$CC" ] || CC="$HOME/.tools/zig-mipsel-cc"
INC="$ROOT/patch_v2/meow_launcherd" # meow_ipc.h(音量收编 v2:MSG_AUDIO_VOLUME/MSG_ACK)
if [ "$1" = "host" ]; then
gcc -Wall -Wextra -Os -I"$INC" -DWd_NO_MAIN -Wno-unused-function -Wno-unused-parameter \
-Wno-unused-variable test_wd_fw.c ../sdk/meow_time32.c -o test_wd_fw -lm
./test_wd_fw
exit $?
fi
echo "== meow_watchdog (mipsel static) =="
# meow_time32.c:独立 time32 取时/睡眠(watchdog 不链 meow_ui.a)。LIBC_OVERRIDES 让
# 未逐个改写的 libc 取时/睡眠入口也一并修正(静态链接,本对象强定义覆盖 libc 归档成员)。
"$CC" -Os -Wall -Wextra -static -I"$INC" -DMEOW_TIME32_LIBC_OVERRIDES \
meow_watchdog.c ../sdk/meow_time32.c -o meow_watchdog
ls -la meow_watchdog
md5sum meow_watchdog
file meow_watchdog