luci-app-cpufreq: add QNAP 321/322 support

This commit is contained in:
coolsnowwolf 2024-06-09 18:33:47 +08:00
parent 8db02ef46f
commit 457ba6c3bd
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@ LUCI_TITLE:=LuCI for CPU Freq Setting
LUCI_DEPENDS:=@(arm||aarch64)
PKG_NAME:=luci-app-cpufreq
PKG_VERSION:=9
PKG_VERSION:=10
PKG_RELEASE:=$(COMMITCOUNT)
include ../../luci.mk

View File

@ -14,6 +14,8 @@ CPU_FREQS=$(cat "$CPUFREQ_PATH"/policy0/scaling_available_frequencies)
CPU_POLICYS=$(find "$CPUFREQ_PATH"/policy* -maxdepth 0 | grep -Eo '[0-9]+')
[ ! -d "$CPUFREQ_PATH/policy0" ] || \
CPU_MAX_FREQ=$(cat "$CPUFREQ_PATH"/policy0/scaling_max_freq)
[ ! -d "$CPUFREQ_PATH/policy2" ] || \
CPU2_MAX_FREQ=$(cat "$CPUFREQ_PATH"/policy2/scaling_max_freq)
[ ! -d "$CPUFREQ_PATH/policy4" ] || \
CPU4_MAX_FREQ=$(cat "$CPUFREQ_PATH"/policy4/scaling_max_freq)
[ ! -d "$CPUFREQ_PATH/policy6" ] || \
@ -51,6 +53,10 @@ case "$DISTRIB_TARGET" in
"meson/meson8b")
uci_write_config 0 schedutil 816000 $CPU_MAX_FREQ
;;
"mvebu/cortexa72")
uci_write_config 0 ondemand 550000 $CPU_MAX_FREQ 10 50
uci_write_config 2 ondemand 550000 $CPU2_MAX_FREQ 10 50
;;
"rockchip/rk35xx"|\
"rockchip/armv8")
uci_write_config 0 schedutil 600000 $CPU_MAX_FREQ