mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
autocore-arm: add support for big.LITTLE arch
This commit is contained in:
parent
2fb6ef3dd2
commit
ac003a674f
@ -9,13 +9,15 @@ if grep -q "bcm53xx" "/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"
|
||||
else
|
||||
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
|
||||
little_cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
|
||||
big_cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq) / 1000)MHz"
|
||||
[ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq} "
|
||||
fi
|
||||
|
||||
if grep -q "ipq40xx" "/etc/openwrt_release"; then
|
||||
sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')"
|
||||
else
|
||||
sys_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
|
||||
|
||||
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})"
|
||||
echo -n "${cpu_arch} x ${cpu_cores} (${big_cpu_freq}${little_cpu_freq}, ${cpu_temp})"
|
||||
|
Loading…
x
Reference in New Issue
Block a user