From 9f9bc95d6b1ed310a40d7494f875fdd35da2bada Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Fri, 25 Dec 2020 14:32:13 +0800 Subject: [PATCH] autocore: avoid resource busy issue on rpi4 (#6095) --- package/lean/autocore/Makefile | 8 ++++---- package/lean/autocore/files/arm/sbin/cpuinfo | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index 1c0bb7428..03e4fb66e 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -9,16 +9,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autocore PKG_VERSION:=1 -PKG_RELEASE:=35 +PKG_RELEASE:=36 include $(INCLUDE_DIR)/package.mk define Package/autocore-arm TITLE:=Arm auto core loadbalance script. MAINTAINER:=CN_SZTL - DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_mvebu||TARGET_ipq40xx||TARGET_ipq806x||TARGET_rockchip) \ - +TARGET_bcm53xx:nvram \ - +TARGET_ipq40xx:lm-sensors + DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_ipq40xx||TARGET_ipq806x||TARGET_mvebu||TARGET_rockchip) \ + +TARGET_bcm27xx:bcm27xx-userland +TARGET_bcm53xx:nvram \ + +(TARGET_ipq40xx||TARGET_ipq806x):lm-sensors VARIANT:=arm endef diff --git a/package/lean/autocore/files/arm/sbin/cpuinfo b/package/lean/autocore/files/arm/sbin/cpuinfo index 5a525a58c..d1b697eb0 100755 --- a/package/lean/autocore/files/arm/sbin/cpuinfo +++ b/package/lean/autocore/files/arm/sbin/cpuinfo @@ -4,7 +4,9 @@ cpu_arch="$(cat "/proc/cpuinfo" | grep "model name" | sed -n "1p" | awk -F ': ' [ -z "${cpu_arch}" ] && cpu_arch="ARMv8 Processor" cpu_cores="$(cat "/proc/cpuinfo" | grep "processor" | wc -l)" -if grep -q "bcm53xx" "/etc/openwrt_release"; then +if grep -q "bcm27xx" "/etc/openwrt_release"; then + cpu_freq="$(vcgencmd get_config arm_freq | awk -F '=' '{print $2}')Mhz" +elif grep -q "bcm53xx" "/etc/openwrt_release"; then cpu_freq="$(nvram get clkfreq | awk -F ',' '{print $1}')MHz" elif grep -q "mvebu" "/etc/openwrt_release"; then cpu_freq="$(cat "/proc/cpuinfo" | grep "BogoMIPS" | sed -n "1p" | awk -F ': ' '{print $2}')MHz"