Files
MeowOS-For-R3P2/patch_v2/meow_watchdog/build_watchdog.sh
T

24 lines
751 B
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=../..
CC="$ROOT/.tools/zig-mipsel-cc"
if [ "$1" = "host" ]; then
gcc -Wall -Wextra -Os -DWd_NO_MAIN -Wno-unused-function -Wno-unused-parameter \
test_wd_fw.c -o test_wd_fw -lm
./test_wd_fw
exit $?
fi
echo "== meow_watchdog (mipsel static) =="
"$CC" -Os -Wall -Wextra -static meow_watchdog.c -o meow_watchdog
ls -la meow_watchdog
md5sum meow_watchdog
file meow_watchdog