From 20d8f45ff33135b730efef35722b06ad5837df71 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 8 Feb 2021 01:19:01 +0800 Subject: [PATCH] autocore: fix logic error of big core freq detection Signed-off-by: CN_SZTL --- package/lean/autocore/files/arm/cpuinfo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/lean/autocore/files/arm/cpuinfo b/package/lean/autocore/files/arm/cpuinfo index 39fae565d1..3b5c115e69 100755 --- a/package/lean/autocore/files/arm/cpuinfo +++ b/package/lean/autocore/files/arm/cpuinfo @@ -12,7 +12,8 @@ elif grep -q "mvebu" "/etc/openwrt_release"; then cpu_freq="$(cat "/proc/cpuinfo" | grep "BogoMIPS" | sed -n "1p" | awk -F ': ' '{print $2}')MHz" elif [ -e "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq" ]; then cpu_freq="$(expr $(cat "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq") / 1000)MHz" -elif [ -e "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq" ]; then +fi +if [ -e "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq" ]; then big_cpu_freq="$(expr $(cat "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq") / 1000)MHz " fi