aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iproute2/Makefile
diff options
context:
space:
mode:
authorTony Ambardar <itugrok@yahoo.com>2021-02-20 08:56:20 -0800
committerHauke Mehrtens <hauke@hauke-m.de>2021-04-10 14:22:28 +0200
commit0ffc498ddd24a528df4afca8737a50e5969b7161 (patch)
tree7aee4c894ed11cb22ff09727e4cb0cb8e4fc6e73 /package/network/utils/iproute2/Makefile
parent272a9e1975df8cba9e3c5a732b0708dd81bb88f0 (diff)
downloadupstream-0ffc498ddd24a528df4afca8737a50e5969b7161.tar.gz
upstream-0ffc498ddd24a528df4afca8737a50e5969b7161.tar.bz2
upstream-0ffc498ddd24a528df4afca8737a50e5969b7161.zip
iproute2: update to 5.11.0
The latest iproute2 version brings various improvements and fixes: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/log/?qt=range&q=v5.10.0..v5.11.0 In particular, ip and tc now use libbpf as the standard way to load BPF programs, rather than the old, limited custom loader. This allows more consistent and featureful BPF program handling e.g. support for global initialized variables. Also fix a longstanding problem with iproute2 builds where unneeded DSO dependencies are added to most utilities, bloating their installation footprint. From research and testing, explicitly using a "--as-needed" linker flag avoids the issue. Update accordingly and drop extra package dependencies from Makefile. Additional build and packaging updates include: - install missing development header to iproute2/bpf_elf.h - propagate OpenWrt verbose flag during build - update and refresh patches Compile and run tested: QEMU/malta-mips32be on kernels 5.4 & 5.10. All iproute2 packages were built and installed to the test image. Some regression testing using ip-full and tc was successfully performed to exercise several kmods, tc modules, and simple BPF programs. Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit b048a305a3d3cbb5375e32757e70aa129b4c7c4f)
Diffstat (limited to 'package/network/utils/iproute2/Makefile')
-rw-r--r--package/network/utils/iproute2/Makefile32
1 files changed, 19 insertions, 13 deletions
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index a20916f6ca..440e33069b 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=iproute2
-PKG_VERSION:=5.10.0
+PKG_VERSION:=5.11.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
-PKG_HASH:=a54a34ae309c0406b2d1fb3a46158613ffb83d33fefd5d4a27f0010237ac53e9
+PKG_HASH:=c5e2ea108212b3445051b35953ec267f9f3469e1d5c67ac034ab559849505c54
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=iptables
PKG_LICENSE:=GPL-2.0
@@ -47,7 +47,7 @@ $(call Package/iproute2/Default)
VARIANT:=full
PROVIDES:=ip
ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full
- DEPENDS:=+libnl-tiny +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
+ DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
endef
define Package/tc
@@ -55,56 +55,59 @@ $(call Package/iproute2/Default)
TITLE:=Traffic control utility
VARIANT:=tc
PROVIDES:=tc
- DEPENDS:=+kmod-sched-core +libxtables +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
+ DEPENDS:=+kmod-sched-core +libxtables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
endef
define Package/genl
$(call Package/iproute2/Default)
TITLE:=General netlink utility frontend
- DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
+ DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
endef
define Package/ip-bridge
$(call Package/iproute2/Default)
TITLE:=Bridge configuration utility from iproute2
- DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
+ DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
endef
define Package/ss
$(call Package/iproute2/Default)
TITLE:=Socket statistics utility
- DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf +kmod-netlink-diag
+ DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +kmod-netlink-diag
endef
define Package/nstat
$(call Package/iproute2/Default)
TITLE:=Network statistics utility
- DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
+ DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
endef
define Package/devlink
$(call Package/iproute2/Default)
TITLE:=Network devlink utility
- DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
+ DEPENDS:=+libmnl
endef
define Package/rdma
$(call Package/iproute2/Default)
TITLE:=Network rdma utility
- DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
+ DEPENDS:=+libmnl
endef
ifeq ($(BUILD_VARIANT),tiny)
IP_CONFIG_TINY:=y
+ LIBBPF_FORCE:=off
endif
ifeq ($(BUILD_VARIANT),full)
HAVE_ELF:=y
+ LIBBPF_FORCE:=on
HAVE_CAP:=n
endif
ifeq ($(BUILD_VARIANT),tc)
HAVE_ELF:=y
+ LIBBPF_FORCE:=on
SHARED_LIBS:=y
endif
@@ -122,26 +125,29 @@ define Build/Configure
endef
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
MAKE_FLAGS += \
KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \
SHARED_LIBS=$(SHARED_LIBS) \
IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
+ LIBBPF_FORCE=$(LIBBPF_FORCE) \
HAVE_ELF=$(HAVE_ELF) \
HAVE_MNL=$(HAVE_MNL) \
HAVE_CAP=$(HAVE_CAP) \
IPT_LIB_DIR=/usr/lib/iptables \
XT_LIB_DIR=/usr/lib/iptables \
- FPIC="$(FPIC)"
+ FPIC="$(FPIC)" \
+ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
define Build/Compile
+$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/include/iproute2
+ $(CP) $(PKG_BUILD_DIR)/include/bpf_elf.h $(1)/usr/include/iproute2
$(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/