Make up the ipq temperature (#8244)

* Make up the ipq temperature

* Update cpuinfo

* 给bcm27xx加个温度吧。
This commit is contained in:
i=菜鸡一批 2021-11-13 00:17:35 +08:00 committed by GitHub
parent 49f943873f
commit 2c139883e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,12 @@ else
[ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz " [ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz "
fi fi
if grep -q "ipq" "/etc/openwrt_release"; then if grep -q "ipq40xx" "/etc/openwrt_release"; then
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq})" sys_temp="$(awk '{ printf("%.1f°C ", $0 / 1000) }' /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input)"
else
sys_temp="$(awk '{ printf("%.1f°C ", $0 / 1000) }' /sys/class/thermal/thermal_zone0/temp)"
fi
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})"
else else
if grep -q "bcm27xx" "/etc/openwrt_release"; then if grep -q "bcm27xx" "/etc/openwrt_release"; then
cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C" cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C"