mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
d4fa2a926a
(cherry picked from commit efe69269efb0f4df5f402d178b93c6bf2ca58c86)
81 lines
2.4 KiB
Makefile
81 lines
2.4 KiB
Makefile
#
|
|
# Copyright (c) 2014 The Linux Foundation. All rights reserved.
|
|
# Permission to use, copy, modify, and/or distribute this software for
|
|
# any purpose with or without fee is hereby granted, provided that the
|
|
# above copyright notice and this permission notice appear in all copies.
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
PKG_NAME:=shortcut-fe
|
|
PKG_RELEASE:=3
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define KernelPackage/shortcut-fe
|
|
SECTION:=kernel
|
|
CATEGORY:=Kernel modules
|
|
SUBMENU:=Network Support
|
|
DEPENDS:=
|
|
TITLE:=Kernel driver for SFE
|
|
FILES:= \
|
|
$(PKG_BUILD_DIR)/shortcut-fe.ko \
|
|
$(PKG_BUILD_DIR)/shortcut-fe-ipv6.ko
|
|
KCONFIG:= \
|
|
CONFIG_NF_CONNTRACK_EVENTS=y \
|
|
CONFIG_NF_CONNTRACK_TIMEOUT=y \
|
|
CONFIG_SHORTCUT_FE=y \
|
|
CONFIG_XFRM=y
|
|
AUTOLOAD:=$(call AutoLoad,09,shortcut-fe shortcut-fe-ipv6)
|
|
endef
|
|
|
|
define KernelPackage/shortcut-fe/Description
|
|
Shortcut is an in-Linux-kernel IP packet forwarding engine.
|
|
endef
|
|
|
|
define KernelPackage/shortcut-fe-cm
|
|
SECTION:=kernel
|
|
CATEGORY:=Kernel modules
|
|
SUBMENU:=Network Support
|
|
DEPENDS:=+kmod-ipt-conntrack +kmod-shortcut-fe
|
|
TITLE:=Kernel driver for SFE
|
|
FILES:=$(PKG_BUILD_DIR)/shortcut-fe-cm.ko
|
|
KCONFIG:=CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y
|
|
endef
|
|
|
|
define KernelPackage/shortcut-fe-cm/Description
|
|
Simple connection manager for the Shortcut forwarding engine.
|
|
endef
|
|
|
|
EXTRA_CFLAGS+= -DSFE_SUPPORT_IPV6
|
|
|
|
define Build/Compile
|
|
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
|
$(KERNEL_MAKE_FLAGS) \
|
|
$(PKG_MAKE_FLAGS) \
|
|
M="$(PKG_BUILD_DIR)" \
|
|
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
|
SFE_SUPPORT_IPV6=1 \
|
|
modules
|
|
endef
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/include/shortcut-fe
|
|
$(CP) -rf $(PKG_BUILD_DIR)/*.h $(1)/usr/include/shortcut-fe
|
|
endef
|
|
|
|
define KernelPackage/shortcut-fe/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) ./files/usr/bin/sfe_dump $(1)/usr/bin
|
|
endef
|
|
|
|
$(eval $(call KernelPackage,shortcut-fe))
|
|
$(eval $(call KernelPackage,shortcut-fe-cm))
|