autocore-arm: remove the dependency on lm-sensors

(cherry picked from commit aeff8e17c86330a9888f939d50eb607c31dc0cb6)
This commit is contained in:
coolsnowwolf 2021-06-22 12:57:40 +08:00 committed by Tianling Shen
parent 46df28d708
commit 19cdd87fb1
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 2 additions and 3 deletions

View File

@ -21,8 +21,7 @@ define Package/autocore-arm
MAINTAINER:=CN_SZTL
DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_ipq40xx||TARGET_ipq806x||TARGET_mvebu||TARGET_sunxi||TARGET_rockchip) \
+TARGET_bcm27xx:bcm27xx-userland \
+TARGET_bcm53xx:nvram \
+TARGET_ipq40xx:lm-sensors
+TARGET_bcm53xx:nvram
VARIANT:=arm
endef

View File

@ -20,7 +20,7 @@ fi
if grep -q "bcm27xx" "/etc/openwrt_release"; then
cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C"
elif grep -q "ipq40xx" "/etc/openwrt_release"; then
cpu_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')"
cpu_temp="$(awk '{printf("%.1f°C ", $0 / 1000)}' /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input)"
else
[ -e "/sys/class/thermal/thermal_zone0/temp" ] && \
cpu_temp="$(awk '{printf("%.1f°C", $0 / 1000)}' /sys/class/thermal/thermal_zone0/temp)"