2017-09-06 19:19:45 +08:00
|
|
|
#
|
|
|
|
|
# Copyright (C) 2006-2015 OpenWrt.org
|
|
|
|
|
#
|
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
|
|
PKG_NAME:=iproute2
|
2021-11-08 07:32:18 +08:00
|
|
|
PKG_VERSION:=5.15.0
|
2021-07-28 02:13:40 +08:00
|
|
|
PKG_RELEASE:=$(AUTORELEASE)
|
2017-09-06 19:19:45 +08:00
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
|
|
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
|
2021-11-08 07:32:18 +08:00
|
|
|
PKG_HASH:=38e3e4a5f9a7f5575c015027a10df097c149111eeb739993128e5b2b35b291ff
|
2017-09-06 19:19:45 +08:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2018-01-15 18:26:41 +08:00
|
|
|
PKG_BUILD_DEPENDS:=iptables
|
2017-09-06 19:19:45 +08:00
|
|
|
PKG_LICENSE:=GPL-2.0
|
2018-01-15 18:26:41 +08:00
|
|
|
PKG_CPE_ID:=cpe:/a:iproute2_project:iproute2
|
2017-09-06 19:19:45 +08:00
|
|
|
|
2018-01-15 18:26:41 +08:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2017-09-06 19:19:45 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2020-01-21 20:59:19 +08:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2017-09-06 19:19:45 +08:00
|
|
|
|
|
|
|
|
define Package/iproute2/Default
|
|
|
|
|
SECTION:=net
|
|
|
|
|
CATEGORY:=Network
|
|
|
|
|
URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
|
|
|
|
|
SUBMENU:=Routing and Redirection
|
|
|
|
|
MAINTAINER:=Russell Senior <russell@personaltelco.net>
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/ip-tiny
|
2018-01-15 18:26:41 +08:00
|
|
|
$(call Package/iproute2/Default)
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
TITLE:=Routing control utility (minimal)
|
|
|
|
|
VARIANT:=iptiny
|
|
|
|
|
DEFAULT_VARIANT:=1
|
|
|
|
|
PROVIDES:=ip
|
|
|
|
|
ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny
|
|
|
|
|
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
2018-01-15 18:26:41 +08:00
|
|
|
define Package/ip-full
|
|
|
|
|
$(call Package/iproute2/Default)
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
TITLE:=Routing control utility (full)
|
|
|
|
|
VARIANT:=ipfull
|
|
|
|
|
PROVIDES:=ip
|
|
|
|
|
ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full
|
|
|
|
|
DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
2018-01-15 18:26:41 +08:00
|
|
|
endef
|
2017-09-06 19:19:45 +08:00
|
|
|
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
define Package/tc-tiny
|
2017-09-06 19:19:45 +08:00
|
|
|
$(call Package/iproute2/Default)
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
TITLE:=Traffic control utility (minimal)
|
|
|
|
|
VARIANT:=tctiny
|
|
|
|
|
DEFAULT_VARIANT:=1
|
2020-01-21 20:59:19 +08:00
|
|
|
PROVIDES:=tc
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny
|
|
|
|
|
DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/tc-full
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=Traffic control utility (full)
|
|
|
|
|
VARIANT:=tcfull
|
|
|
|
|
PROVIDES:=tc
|
|
|
|
|
ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-full
|
|
|
|
|
DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/tc-mod-iptables
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=Traffic control module - iptables action
|
|
|
|
|
DEPENDS:=+libxtables
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/genl
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=General netlink utility frontend
|
2021-02-21 00:56:20 +08:00
|
|
|
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +PACKAGE_ip-full:libcap
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/ip-bridge
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=Bridge configuration utility from iproute2
|
2021-02-21 00:56:20 +08:00
|
|
|
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +PACKAGE_ip-full:libcap
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/ss
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=Socket statistics utility
|
2021-02-21 00:56:20 +08:00
|
|
|
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +PACKAGE_ip-full:libcap +kmod-netlink-diag
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/nstat
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=Network statistics utility
|
2021-02-21 00:56:20 +08:00
|
|
|
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +PACKAGE_ip-full:libcap
|
2018-01-15 18:26:41 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/devlink
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=Network devlink utility
|
2021-02-21 00:56:20 +08:00
|
|
|
DEPENDS:=+libmnl +PACKAGE_ip-full:libcap
|
2018-01-15 18:26:41 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/rdma
|
|
|
|
|
$(call Package/iproute2/Default)
|
|
|
|
|
TITLE:=Network rdma utility
|
2021-02-21 00:56:20 +08:00
|
|
|
DEPENDS:=+libmnl +PACKAGE_ip-full:libcap
|
2018-01-09 14:38:15 +08:00
|
|
|
endef
|
|
|
|
|
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
ifeq ($(BUILD_VARIANT),iptiny)
|
2017-09-06 19:19:45 +08:00
|
|
|
IP_CONFIG_TINY:=y
|
2021-02-21 00:56:20 +08:00
|
|
|
LIBBPF_FORCE:=off
|
2017-09-06 19:19:45 +08:00
|
|
|
endif
|
|
|
|
|
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
ifeq ($(BUILD_VARIANT),ipfull)
|
2020-01-21 20:59:19 +08:00
|
|
|
HAVE_ELF:=y
|
2021-02-21 00:56:20 +08:00
|
|
|
LIBBPF_FORCE:=on
|
2020-01-21 20:59:19 +08:00
|
|
|
endif
|
|
|
|
|
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
ifeq ($(BUILD_VARIANT),tctiny)
|
|
|
|
|
LIBBPF_FORCE:=off
|
|
|
|
|
SHARED_LIBS:=y
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),tcfull)
|
2020-01-21 20:59:19 +08:00
|
|
|
HAVE_ELF:=y
|
2021-02-21 00:56:20 +08:00
|
|
|
LIBBPF_FORCE:=on
|
2020-01-21 20:59:19 +08:00
|
|
|
SHARED_LIBS:=y
|
|
|
|
|
endif
|
|
|
|
|
|
2018-01-15 18:26:41 +08:00
|
|
|
ifdef CONFIG_PACKAGE_devlink
|
|
|
|
|
HAVE_MNL:=y
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifdef CONFIG_PACKAGE_rdma
|
|
|
|
|
HAVE_MNL:=y
|
|
|
|
|
endif
|
|
|
|
|
|
2017-09-06 19:19:45 +08:00
|
|
|
define Build/Configure
|
2018-01-15 18:26:41 +08:00
|
|
|
echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \
|
2017-09-06 19:19:45 +08:00
|
|
|
> $(PKG_BUILD_DIR)/include/SNAPSHOT.h
|
|
|
|
|
endef
|
|
|
|
|
|
2020-02-16 01:28:32 +08:00
|
|
|
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
|
2021-02-21 00:56:20 +08:00
|
|
|
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
|
2020-01-21 20:59:19 +08:00
|
|
|
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
2017-09-06 19:19:45 +08:00
|
|
|
|
|
|
|
|
MAKE_FLAGS += \
|
2020-01-21 20:59:19 +08:00
|
|
|
KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \
|
|
|
|
|
SHARED_LIBS=$(SHARED_LIBS) \
|
2017-09-06 19:19:45 +08:00
|
|
|
IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
|
2021-04-18 18:09:44 +08:00
|
|
|
BUILD_VARIANT=$(BUILD_VARIANT) \
|
2021-02-21 00:56:20 +08:00
|
|
|
LIBBPF_FORCE=$(LIBBPF_FORCE) \
|
2020-01-21 20:59:19 +08:00
|
|
|
HAVE_ELF=$(HAVE_ELF) \
|
2018-01-15 18:26:41 +08:00
|
|
|
HAVE_MNL=$(HAVE_MNL) \
|
2020-01-21 20:59:19 +08:00
|
|
|
HAVE_CAP=$(HAVE_CAP) \
|
2018-01-15 18:26:41 +08:00
|
|
|
IPT_LIB_DIR=/usr/lib/iptables \
|
2020-01-21 20:59:19 +08:00
|
|
|
XT_LIB_DIR=/usr/lib/iptables \
|
2021-02-21 00:56:20 +08:00
|
|
|
FPIC="$(FPIC)" \
|
|
|
|
|
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
|
2017-09-06 19:19:45 +08:00
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
|
+$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2021-02-21 00:56:20 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include/iproute2
|
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/bpf_elf.h $(1)/usr/include/iproute2
|
2018-09-07 13:43:55 +08:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/
|
2017-09-06 19:19:45 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/
|
2020-04-10 23:05:45 +08:00
|
|
|
# Hack for qos-gargoyle
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/iproute2/{tc,lib,include}
|
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/{tc,include,lib} $(1)/usr/lib/iproute2
|
|
|
|
|
# Hack end
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/ip-tiny/install
|
2020-01-21 20:59:19 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/libexec
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-tiny
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/ip-full/install
|
2020-01-21 20:59:19 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/libexec
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-full
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
define Package/tc-tiny/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/libexec
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/tc-full/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/libexec
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/tc-mod-iptables/install
|
2020-01-21 20:59:19 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/tc
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc
|
2017-09-06 19:19:45 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/genl/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/ip-bridge/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/ss/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/nstat/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/nstat $(1)/usr/sbin/
|
|
|
|
|
endef
|
|
|
|
|
|
2018-01-15 18:26:41 +08:00
|
|
|
define Package/devlink/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/devlink/devlink $(1)/usr/sbin/
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
define Package/rdma/install
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rdma/rdma $(1)/usr/sbin/
|
|
|
|
|
endef
|
|
|
|
|
|
2017-09-06 19:19:45 +08:00
|
|
|
$(eval $(call BuildPackage,ip-tiny))
|
|
|
|
|
$(eval $(call BuildPackage,ip-full))
|
2021-10-21 21:35:41 +08:00
|
|
|
# build tc-mod-iptables before its dependents, to avoid
|
|
|
|
|
# spurious rebuilds when building multiple variants.
|
|
|
|
|
$(eval $(call BuildPackage,tc-mod-iptables))
|
iproute2: separate tc into tiny and full variants
This change was investigated previously [1] but not deemed necessary. With
the recent addition [2] of modern BPF loader support, however, tc gained
dependencies on libelf and libbpf, with a larger installation footprint.
Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants,
where the latter excludes the eBPF loader, uses a smaller executable, and
avoids libelf and libbpf package dependencies. Both variants provide the
'tc' virtual package, with tc-tiny as the default.
The previous tc package included a loadable module for iptables actions.
Separate this out into a common package, tc-mod-iptables, which both
variants depend on. Some package sizes on mips_24kc:
Before:
148343 tc_5.11.0-1_mips_24kc.ipk
After:
144833 tc-full_5.11.0-2_mips_24kc.ipk
138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf)
4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk
Also fix up some Makefile indentation.
[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962
[2] b048a305a3d3 ("iproute2: update to 5.11.0")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-02 09:14:50 +08:00
|
|
|
$(eval $(call BuildPackage,tc-tiny))
|
|
|
|
|
$(eval $(call BuildPackage,tc-full))
|
2017-09-06 19:19:45 +08:00
|
|
|
$(eval $(call BuildPackage,genl))
|
|
|
|
|
$(eval $(call BuildPackage,ip-bridge))
|
|
|
|
|
$(eval $(call BuildPackage,ss))
|
|
|
|
|
$(eval $(call BuildPackage,nstat))
|
2018-01-15 18:26:41 +08:00
|
|
|
$(eval $(call BuildPackage,devlink))
|
|
|
|
|
$(eval $(call BuildPackage,rdma))
|