From 2c139883e4291c0862a4322da897682fa0303d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?i=3D=E8=8F=9C=E9=B8=A1=E4=B8=80=E6=89=B9?= <84753324+LPDDR6-10000MHz@users.noreply.github.com> Date: Sat, 13 Nov 2021 00:17:35 +0800 Subject: [PATCH] Make up the ipq temperature (#8244) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Make up the ipq temperature * Update cpuinfo * 给bcm27xx加个温度吧。 --- package/lean/autocore/files/arm/sbin/cpuinfo | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package/lean/autocore/files/arm/sbin/cpuinfo b/package/lean/autocore/files/arm/sbin/cpuinfo index d64b95e6c..9df2e0fc7 100755 --- a/package/lean/autocore/files/arm/sbin/cpuinfo +++ b/package/lean/autocore/files/arm/sbin/cpuinfo @@ -16,8 +16,12 @@ else [ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz " fi -if grep -q "ipq" "/etc/openwrt_release"; then - echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq})" +if grep -q "ipq40xx" "/etc/openwrt_release"; then + 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 if grep -q "bcm27xx" "/etc/openwrt_release"; then cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C"