autocore-arm: add ipq40xx support
This commit is contained in:
parent
2f5b5b270c
commit
b285e6f5ac
@ -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_ipq806x)
|
||||
DEPENDS:=@(TARGET_bcm27xx||TARGET_ipq40xx||TARGET_ipq806x) +TARGET_ipq40xx:lm-sensors
|
||||
VARIANT:=arm
|
||||
endef
|
||||
|
||||
@ -44,7 +44,11 @@ define Package/autocore-arm/install
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/arm/090-cover-index_htm $(1)/etc/uci-defaults/090-cover-index_htm
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(CP) ./files/arm/sbin/* $(1)/sbin
|
||||
ifneq ($(BOARD),ipq40xx)
|
||||
$(CP) ./files/arm/sbin/cpuinfo $(1)/sbin/cpuinfo
|
||||
else
|
||||
$(CP) ./files/arm/sbin/cpuinfo-ipq40xx $(1)/sbin/cpuinfo
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/autocore-x86/install
|
||||
|
||||
9
package/lean/autocore/files/arm/sbin/cpuinfo-ipq40xx
Executable file
9
package/lean/autocore/files/arm/sbin/cpuinfo-ipq40xx
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
cpu_arch="$(cat "/proc/cpuinfo" | grep "model name" | sed -n "1p" | awk -F ': ' '{print $2}')"
|
||||
cpu_cores="$(cat "/proc/cpuinfo" | grep "processor" | wc -l)"
|
||||
|
||||
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
|
||||
sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')"
|
||||
|
||||
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})"
|
||||
@ -19,7 +19,7 @@ DEFAULT_PACKAGES += \
|
||||
kmod-leds-gpio kmod-gpio-button-hotplug swconfig \
|
||||
kmod-ath10k wpad-openssl \
|
||||
kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019 \
|
||||
automount autosamba luci-app-ipsec-vpnd v2ray shadowsocks-libev-ss-redir shadowsocksr-libev-server \
|
||||
autocore-arm automount autosamba luci-app-ipsec-vpnd v2ray shadowsocks-libev-ss-redir shadowsocksr-libev-server \
|
||||
luci-app-unblockmusic luci-app-cpufreq luci-app-zerotier ca-certificates \
|
||||
htop fdisk e2fsprogs ethtool
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user