2021-11-29 23:13:27 +08:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
2019-11-08 22:57:22 +08:00
|
|
|
#
|
2021-01-30 19:06:57 +08:00
|
|
|
# Copyright (C) 2020 Lean <coolsnowwolf@gmail.com>
|
2021-11-29 23:13:27 +08:00
|
|
|
# Copyright (C) 2021 ImmortalWrt.org
|
2019-11-08 22:57:22 +08:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=autocore
|
2022-04-15 02:28:31 +08:00
|
|
|
PKG_FLAGS:=nonshared
|
2021-06-28 23:01:54 +08:00
|
|
|
PKG_RELEASE:=$(COMMITCOUNT)
|
2019-11-08 22:57:22 +08:00
|
|
|
|
2021-11-29 23:13:27 +08:00
|
|
|
PKG_CONFIG_DEPENDS:= \
|
|
|
|
CONFIG_TARGET_bcm27xx \
|
|
|
|
CONFIG_TARGET_bcm53xx
|
|
|
|
|
2019-11-08 22:57:22 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2022-03-26 20:01:30 +08:00
|
|
|
include $(INCLUDE_DIR)/target.mk
|
2019-11-08 22:57:22 +08:00
|
|
|
|
2020-07-19 21:51:04 +08:00
|
|
|
define Package/autocore-arm
|
|
|
|
TITLE:=ARM auto core script.
|
|
|
|
MAINTAINER:=CN_SZTL
|
2021-06-28 23:01:54 +08:00
|
|
|
DEPENDS:=@(arm||aarch64) \
|
2020-12-25 14:32:13 +08:00
|
|
|
+TARGET_bcm27xx:bcm27xx-userland \
|
2021-06-22 12:57:40 +08:00
|
|
|
+TARGET_bcm53xx:nvram
|
2020-07-19 21:51:04 +08:00
|
|
|
VARIANT:=arm
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/autocore-x86
|
2019-11-08 22:57:22 +08:00
|
|
|
TITLE:=x86/x64 auto core loadbalance script.
|
2020-07-19 21:51:04 +08:00
|
|
|
MAINTAINER:=Lean / CN_SZTL
|
2022-03-25 23:22:20 +08:00
|
|
|
DEPENDS:=@TARGET_x86 +lm-sensors +ethtool
|
2020-07-19 21:51:04 +08:00
|
|
|
VARIANT:=x86
|
|
|
|
endef
|
|
|
|
|
2019-11-08 22:57:22 +08:00
|
|
|
define Build/Compile
|
|
|
|
endef
|
|
|
|
|
2022-03-25 23:22:20 +08:00
|
|
|
define Package/autocore/install/Default
|
2022-03-26 05:36:38 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc
|
2022-03-26 19:01:32 +08:00
|
|
|
$(CP) ./files/generic/10_system.js $(1)/etc/rpcd_10_system.js
|
|
|
|
$(CP) ./files/generic/luci $(1)/etc/rpcd_luci
|
2021-01-30 19:06:57 +08:00
|
|
|
|
2020-07-19 21:51:04 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2022-03-26 05:36:38 +08:00
|
|
|
$(INSTALL_BIN) ./files/generic/090-cover-index_files $(1)/etc/uci-defaults/
|
2021-01-30 19:06:57 +08:00
|
|
|
|
2020-07-19 21:51:04 +08:00
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
2022-03-26 05:36:38 +08:00
|
|
|
$(INSTALL_BIN) ./files/generic/cpuinfo $(1)/sbin/
|
|
|
|
$(INSTALL_BIN) ./files/generic/ethinfo $(1)/sbin/
|
2022-03-26 19:01:32 +08:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
|
|
|
$(CP) ./files/generic/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
|
|
|
|
|
|
|
$(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/
|
2022-03-25 23:22:20 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/autocore-arm/install
|
|
|
|
$(call Package/autocore/install/Default,$(1))
|
2022-03-26 20:01:30 +08:00
|
|
|
|
|
|
|
ifneq ($(filter ipq% %mt7622, $(TARGETID)),)
|
2022-03-28 05:36:50 +08:00
|
|
|
$(INSTALL_BIN) ./files/arm/tempinfo $(1)/sbin/
|
2022-03-26 20:01:30 +08:00
|
|
|
endif
|
2020-07-19 22:08:47 +08:00
|
|
|
endef
|
2020-07-19 21:51:04 +08:00
|
|
|
|
|
|
|
define Package/autocore-x86/install
|
2022-03-26 19:01:32 +08:00
|
|
|
$(call Package/autocore/install/Default,$(1))
|
2021-01-30 19:06:57 +08:00
|
|
|
|
2019-11-08 22:57:22 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
2022-03-25 23:22:20 +08:00
|
|
|
$(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/
|
2019-11-08 22:57:22 +08:00
|
|
|
endef
|
|
|
|
|
2020-07-19 21:51:04 +08:00
|
|
|
$(eval $(call BuildPackage,autocore-arm))
|
|
|
|
$(eval $(call BuildPackage,autocore-x86))
|