Update 00-prepare_base.sh

This commit is contained in:
2025-11-05 10:25:55 +08:00
committed by GitHub
parent f06e722c76
commit 21134f8551

View File

@@ -44,6 +44,33 @@ sed -i 's/+uhttpd +uhttpd-mod-ubus /+luci-nginx /g' feeds/packages/net/wg-instal
sed -i '/uhttpd-mod-ubus/d' feeds/luci/collections/luci-light/Makefile
sed -i 's/+luci-nginx \\$/+luci-nginx/' feeds/luci/collections/luci-light/Makefile
# Use specific optimizations
if [ "$platform" = "x86_64" ]; then
sed -i 's/O2/O2 -march=x86-64-v2/g' include/target.mk
sed -i 's,no-mips16 no-lto,no-mips16,g' feeds/packages/libs/libsodium/Makefile
echo '#!/bin/sh
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
if ! grep "Default string" /tmp/sysinfo/model > /dev/null; then
echo should be fine
else
echo "Generic PC" > /tmp/sysinfo/model
fi
status=$(cat /sys/devices/system/cpu/intel_pstate/status)
if [ "$status" = "passive" ]; then
echo "active" | tee /sys/devices/system/cpu/intel_pstate/status
fi
exit 0
'> ./package/base-files/files/etc/rc.local
elif [ "$platform" = "rockchip" ]; then
sed -i 's,-mcpu=generic,-march=armv8-a+crc+crypto,g' include/target.mk
sed -i 's,kmod-r8168,kmod-r8169,g' target/linux/rockchip/image/armv8.mk
fi
# Libubox
sed -i '/TARGET_CFLAGS/ s/$/ -Os/' package/libs/libubox/Makefile