From 1f9d65ee09abba2d92f4e09a3960b974b3d34472 Mon Sep 17 00:00:00 2001 From: OPPEN321 Date: Tue, 23 Sep 2025 19:00:46 +0800 Subject: [PATCH] Create 05-x86_64_target_only.sh --- scripts/05-x86_64_target_only.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/05-x86_64_target_only.sh diff --git a/scripts/05-x86_64_target_only.sh b/scripts/05-x86_64_target_only.sh new file mode 100644 index 0000000..4b9719c --- /dev/null +++ b/scripts/05-x86_64_target_only.sh @@ -0,0 +1,25 @@ +#!/bin/bash -e + +sed -i 's/O2/O2 -march=x86-64-v2/g' include/target.mk + +# libsodium +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