Files
MeowOS-For-R3P2/patch_v2/meow_netmgrd/build_netmgrd.sh
T
AskaEth 884d4c4891 fix(fw): M43 系统组件接入 o32 time32(9 组件 + meow_audio CLI)
- 构建脚本链 ../sdk/meow_time32.c + -DMEOW_TIME32_LIBC_OVERRIDES:
  sysui/svcd/bootmenu/amsd/netmgrd/crash/svc_perf/powermgr/meowpanel,
  以及 musl-static 的 meow_audio CLI(monitor 取时/轮询)
- meow_audiod 守护例外:glibc-2.22 time_t 32 位,无 musl time64 ABI 错位,不链
- 重编 10 个产物:反汇编 4263=3 / 4403=0,__clock_gettime 按 16 字节布局写回
- test_time32_abi.sh 收紧为 addiu 系统调用号匹配,避免 .text+0x1133x 偏移误报
- fw_content.conf 同步全部新 md5(清单逐行校验通过)
2026-11-11 18:51:16 +08:00

37 lines
1.7 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_netmgrd.sh — meow_netmgrd 交叉编译(mipsel 静态)+ 宿主编译可选。
#
# 目标:R3 Pro II / MeowOS(mipsel-linux-muslsf,静态)。netmgrd 仅 POSIX + Linux 基接口
# (复用 meow_ipc.h 帧格式 + m_net_* 负载,无 launcher 依赖),单文件满足「固件内、不入卡」。
# 单一二进制双形态:/usr/bin/meow_netmgrd(svcd 空参=守护)+ /usr/bin/meow_net(CLI,同一份
# 文件两次安装,argv[0] basename 分形态;fw_content.conf 两行同 src)。
#
# 用法:
# ./build_netmgrd.sh # 交叉编译 → patch_v2/meow_netmgrd/meow_netmgrd(mipsel 静态)
# ./build_netmgrd.sh host # 宿主编译 → patch_v2/meow_netmgrd/meow_netmgrd_host
set -e
cd "$(dirname "$0")"
ROOT="$HOME/Project/R3ProII"
CC="$ROOT/.tools/zig-mipsel-cc"
I_HDR="$ROOT/patch_v2/meow_launcherd" # meow_ipc.h(帧/MSG_NET_*/m_net_*)
if [ "$1" = "host" ]; then
HOST_CC="${CC_HOST:-cc}"
# -Wno-format-truncation:宿主 glibc 对固定缓冲 snprintf 的「安全截断」误报(musl 交叉不报)。
"$HOST_CC" -Os -Wall -Wextra -U_FORTIFY_SOURCE -Wno-format-truncation -I"$I_HDR" \
meow_netmgrd.c -o meow_netmgrd_host
echo "== host build =="
ls -la meow_netmgrd_host
file meow_netmgrd_host
exit 0
fi
# meow_time32.c:独立 o32 time32 取时/睡眠(netmgrd 不链 meow_ui.a);修 DNS TTL 基准
# 与 nanosleep 退避。守护/CLI 同一二进制,一次构建两处安装。
"$CC" -Os -Wall -Wextra -static -I"$I_HDR" -DMEOW_TIME32_LIBC_OVERRIDES \
meow_netmgrd.c ../sdk/meow_time32.c -o meow_netmgrd
echo "== meow_netmgrd (mipsel static) =="
ls -la meow_netmgrd
md5sum meow_netmgrd
file meow_netmgrd