chore(watchdog): 补 build_watchdog.sh(交叉+宿主测试), 对齐各组件 build_xxx.sh 惯例; 固件打包唯一入口仍是 scripts/build/build_fw_apps.sh
This commit is contained in:
1 parent
104bfe2d21
commit
c8cd6c3a54
1 file changed
+23
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
#!/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
|
||||||
Reference in new issue
Block a user