mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
86dc811a7c
* autocore: remove ethinfo for mtk arm boards mediatek target uses legacy swconfig which is not supported by autocore. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * mediatek: add support for Livinet ZR-3020 Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> --------- Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
76 lines
1.9 KiB
Makefile
76 lines
1.9 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Copyright (C) 2020 Lean <coolsnowwolf@gmail.com>
|
|
# Copyright (C) 2021 ImmortalWrt.org
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=autocore
|
|
PKG_FLAGS:=nonshared
|
|
PKG_RELEASE:=$(COMMITCOUNT)
|
|
|
|
PKG_CONFIG_DEPENDS:= \
|
|
CONFIG_TARGET_bcm27xx \
|
|
CONFIG_TARGET_bcm53xx \
|
|
CONFIG_TARGET_mediatek \
|
|
CONFIG_TARGET_mvebu
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/target.mk
|
|
|
|
define Package/autocore-arm
|
|
TITLE:=ARM auto core script.
|
|
MAINTAINER:=CN_SZTL
|
|
DEPENDS:=@(arm||aarch64) \
|
|
+TARGET_bcm27xx:bcm27xx-userland \
|
|
+TARGET_bcm53xx:nvram \
|
|
+(TARGET_mediatek||TARGET_mvebu):mhz
|
|
VARIANT:=arm
|
|
endef
|
|
|
|
define Package/autocore-x86
|
|
TITLE:=x86/x64 auto core loadbalance script.
|
|
MAINTAINER:=Lean / CN_SZTL
|
|
DEPENDS:=@TARGET_x86 +lm-sensors +ethtool
|
|
VARIANT:=x86
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/autocore/install/Default
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
$(INSTALL_BIN) ./files/generic/60-autocore-reload-rpcd $(1)/etc/uci-defaults/
|
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
|
$(INSTALL_BIN) ./files/generic/cpuinfo $(1)/sbin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
|
$(CP) ./files/generic/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
|
|
|
ifeq ($(filter ipq% mediatek%, $(TARGETID)),)
|
|
$(INSTALL_BIN) ./files/generic/ethinfo $(1)/sbin/
|
|
|
|
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/status/include
|
|
$(INSTALL_DATA) ./files/generic/21_ethinfo.js $(1)/www/luci-static/resources/view/status/include/
|
|
endif
|
|
endef
|
|
|
|
define Package/autocore-arm/install
|
|
$(call Package/autocore/install/Default,$(1))
|
|
|
|
ifneq ($(filter ipq% mediatek%, $(TARGETID)),)
|
|
$(INSTALL_BIN) ./files/arm/tempinfo $(1)/sbin/
|
|
endif
|
|
endef
|
|
|
|
define Package/autocore-x86/install
|
|
$(call Package/autocore/install/Default,$(1))
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,autocore-arm))
|
|
$(eval $(call BuildPackage,autocore-x86))
|