From 66de6c50508b6521b5c95179e7b301de18b50a65 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 21 Mar 2020 22:17:09 +0800 Subject: [PATCH] luci-app-cpufreq: drop untest target (#3915) Someone reports that it has bug in arm64 --- package/lean/luci-app-cpufreq/Makefile | 4 +-- .../luasrc/controller/cpufreq.lua | 3 +-- .../luci-app-cpufreq/root/etc/init.d/cpufreq | 12 ++++----- .../root/etc/uci-defaults/cpufreq | 2 +- .../base-files/etc/init.d/linksys_recovery | 27 +++++++++---------- 5 files changed, 21 insertions(+), 27 deletions(-) diff --git a/package/lean/luci-app-cpufreq/Makefile b/package/lean/luci-app-cpufreq/Makefile index 951a15fb4..ba5eeba8b 100644 --- a/package/lean/luci-app-cpufreq/Makefile +++ b/package/lean/luci-app-cpufreq/Makefile @@ -7,10 +7,10 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI for CPU Freq Setting -LUCI_DEPENDS:=@(arm||aarch64) +LUCI_DEPENDS:=@arm PKG_NAME:=luci-app-cpufreq PKG_VERSION:=1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-cpufreq/luasrc/controller/cpufreq.lua b/package/lean/luci-app-cpufreq/luasrc/controller/cpufreq.lua index 22b570163..1b13e01a2 100644 --- a/package/lean/luci-app-cpufreq/luasrc/controller/cpufreq.lua +++ b/package/lean/luci-app-cpufreq/luasrc/controller/cpufreq.lua @@ -5,7 +5,6 @@ function index() if not nixio.fs.access("/etc/config/cpufreq") then return end - + entry({"admin", "services", "cpufreq"}, cbi("cpufreq"), _("CPU Freq"), 900).dependent=false end - diff --git a/package/lean/luci-app-cpufreq/root/etc/init.d/cpufreq b/package/lean/luci-app-cpufreq/root/etc/init.d/cpufreq index df42f3c73..2a47466b9 100755 --- a/package/lean/luci-app-cpufreq/root/etc/init.d/cpufreq +++ b/package/lean/luci-app-cpufreq/root/etc/init.d/cpufreq @@ -16,14 +16,12 @@ start() local maxfreq=$(uci_get_by_type settings maxfreq 716000) local upthreshold=$(uci_get_by_type settings upthreshold 50) local factor=$(uci_get_by_type settings factor 10) - + echo $governor > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor - echo $minifreq > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - echo $maxfreq > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq + echo $minifreq > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq + echo $maxfreq > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq if [ "$governor" == "ondemand" ]; then - echo $upthreshold > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo $factor > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor + echo $upthreshold > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold + echo $factor > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor fi } - - diff --git a/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq b/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq index 2f198c445..8443be579 100755 --- a/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq +++ b/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq @@ -8,4 +8,4 @@ uci -q batch <<-EOF >/dev/null EOF rm -f /tmp/luci-indexcache -exit 0 \ No newline at end of file +exit 0 diff --git a/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery b/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery index 45e73a75d..44301c49f 100755 --- a/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery +++ b/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery @@ -3,21 +3,18 @@ START=97 boot() { -. /lib/functions.sh + . /lib/functions.sh -case $(board_name) in - linksys,ea8500) - # make sure auto_recovery in uboot is always on - AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`" - if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then - fw_setenv auto_recovery yes - fi - # reset the boot counter - mtd resetbc s_env - ;; -esac + case $(board_name) in + linksys,ea8500) + # make sure auto_recovery in uboot is always on + AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`" + if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then + fw_setenv auto_recovery yes + fi + # reset the boot counter + mtd resetbc s_env + ;; + esac -echo 35 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold -echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor } -