autocore-arm: add support for mvebu

This commit is contained in:
CN_SZTL 2020-11-13 19:46:58 +08:00
parent e0770fbef0
commit 633f8c6e59
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 5 additions and 2 deletions

View File

@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/autocore-arm
TITLE:=Arm auto core loadbalance script.
MAINTAINER:=CN_SZTL
DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_ipq40xx||TARGET_ipq806x) \
DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_mvebu||TARGET_ipq40xx||TARGET_ipq806x) \
+TARGET_bcm53xx:nvram +(TARGET_ipq40xx||TARGET_ipq806x):lm-sensors
VARIANT:=arm
endef

View File

@ -6,6 +6,8 @@ cpu_cores="$(cat "/proc/cpuinfo" | grep "processor" | wc -l)"
if 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"
else
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
fi

View File

@ -16,6 +16,7 @@ KERNEL_PATCHVER:=4.19
include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += uboot-envtools kmod-gpio-button-hotplug
DEFAULT_PACKAGES += uboot-envtools kmod-gpio-button-hotplug \
autocore-arm
$(eval $(call BuildTarget))