autocore-arm: add mediatek/mt7622 support
This commit is contained in:
parent
659519f45e
commit
0c21781af3
@ -14,6 +14,7 @@ PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_TARGET_bcm53xx
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
define Package/autocore-arm
|
||||
TITLE:=Arm auto core loadbalance script
|
||||
@ -50,7 +51,7 @@ endef
|
||||
define Package/autocore-arm/install
|
||||
$(call Package/autocore/install/Default,$(1))
|
||||
|
||||
ifneq (, $(findstring $(BOARD), ipq40xx ipq806x))
|
||||
ifneq ($(filter ipq% %mt7622, $(TARGETID)),)
|
||||
$(INSTALL_BIN) ./files/arm/tempinfo $(1)/sbin/
|
||||
endif
|
||||
endef
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
mt76_path="/sys/kernel/debug/ieee80211/phy0/mt76/temperature"
|
||||
mt76_path="/sys/class/ieee80211/phy0/hwmon0/temp1_input"
|
||||
if [ -e "${mt76_path}" ]; then
|
||||
mt76_temp=" $(awk -F ': ' '{print $2}' "${mt76_path}")°C"
|
||||
fi
|
||||
|
||||
wifi_temp="$(awk '{printf("%.1f°C ", $0 / 1000)}' /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input | awk '$1=$1')"
|
||||
if grep -q "mt7622" "/etc/openwrt_release"; then
|
||||
wifi_temp="$(awk '{printf("%.1f°C ", $0 / 1000)}' /sys/class/ieee80211/phy*/hwmon*/temp1_input | awk '$1=$1')"
|
||||
else
|
||||
wifi_temp="$(awk '{printf("%.1f°C ", $0 / 1000)}' /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input | awk '$1=$1')"
|
||||
fi
|
||||
|
||||
if grep -q "ipq40xx" "/etc/openwrt_release"; then
|
||||
echo -n "WiFi:${mt76_temp} ${wifi_temp}"
|
||||
|
||||
@ -37,7 +37,7 @@ fi
|
||||
|
||||
if [ -z "${cpu_freq}" ] && [ -z "${cpu_temp}" ]; then
|
||||
echo -n "${cpu_arch} x ${cpu_cores}"
|
||||
elif [ -z "${cpu_temp}" ] || grep -q "ipq" "/etc/openwrt_release"; then
|
||||
elif [ -z "${cpu_temp}" ] || grep -Eq "ipq|mt7622" "/etc/openwrt_release"; then
|
||||
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq})"
|
||||
elif [ -z "${cpu_freq}" ]; then
|
||||
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_temp})"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user