autocore-arm: fix read cpu freq

This commit is contained in:
CN_SZTL 2020-07-19 14:15:52 +08:00
parent 3f5ce2f0b3
commit 9f571180e4
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -1,6 +1,6 @@
#!/bin/sh
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) / 1000)Mhz"
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq) / 1000)Mhz"
sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
echo -n "(${cpu_freq}, ${sys_temp})"