mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
autocore: add mediatek mt7988 cpufreq display
This commit is contained in:
parent
c2a01cf771
commit
4c5284498f
@ -10,12 +10,13 @@ elif grep -q "bcm53xx" "/etc/openwrt_release"; then
|
|||||||
cpu_freq="$(nvram get clkfreq | awk -F ',' '{print $1}')MHz"
|
cpu_freq="$(nvram get clkfreq | awk -F ',' '{print $1}')MHz"
|
||||||
elif grep -q "mvebu" "/etc/openwrt_release"; then
|
elif grep -q "mvebu" "/etc/openwrt_release"; then
|
||||||
cpu_freq="$(cat "/proc/cpuinfo" | grep "BogoMIPS" | sed -n "1p" | awk -F ': ' '{print $2}')MHz"
|
cpu_freq="$(cat "/proc/cpuinfo" | grep "BogoMIPS" | sed -n "1p" | awk -F ': ' '{print $2}')MHz"
|
||||||
elif ! grep -q "filogic" "/etc/openwrt_release"; then
|
elif grep -q "filogic" "/etc/openwrt_release"; then
|
||||||
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
|
[ -f "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq" ] && big_cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
|
||||||
if grep -q "rockchip" "/etc/openwrt_release"; then
|
elif grep -q "rockchip" "/etc/openwrt_release"; then
|
||||||
big_cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq 2>"/dev/null") / 1000 2>"/dev/null")"
|
big_cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq 2>"/dev/null") / 1000 2>"/dev/null")"
|
||||||
[ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz "
|
[ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz "
|
||||||
fi
|
else
|
||||||
|
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "ipq" "/etc/openwrt_release"; then
|
if grep -q "ipq" "/etc/openwrt_release"; then
|
||||||
@ -32,8 +33,12 @@ else
|
|||||||
cpu_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
|
cpu_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
|
||||||
fi
|
fi
|
||||||
if grep -q "filogic" "/etc/openwrt_release"; then
|
if grep -q "filogic" "/etc/openwrt_release"; then
|
||||||
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_temp})"
|
if [ -n "${big_cpu_freq}" ] ; then
|
||||||
else
|
echo -n "${cpu_arch} x ${cpu_cores} (${big_cpu_freq}, ${cpu_temp})"
|
||||||
echo -n "${cpu_arch} x ${cpu_cores} (${big_cpu_freq}${cpu_freq}, ${cpu_temp})"
|
else
|
||||||
|
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_temp})"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n "${cpu_arch} x ${cpu_cores} (${big_cpu_freq}${cpu_freq}, ${cpu_temp})"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user