From f586b91cb8ef17aebf7374ed88f380b7ba7b4460 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 27 Jan 2022 12:30:38 +0000 Subject: [PATCH 1/8] iproute2: Remove libxtables from some tc variants This adds the new tc-bpf variant and removes libxtables dependency from the tc-tiny variant. The tc-full variant stays like before and contains everything. This allows to use tc without libxtables. The variants have the following sizes: root@OpenWrt:/# ls -al /usr/libexec/tc-* -rwxr-xr-x 1 root root 282453 Mar 1 21:55 /usr/libexec/tc-bpf -rwxr-xr-x 1 root root 282533 Mar 1 21:55 /usr/libexec/tc-full -rwxr-xr-x 1 root root 266037 Mar 1 21:55 /usr/libexec/tc-tiny They are linking the following shared libraries: root@OpenWrt:/# ldd /usr/libexec/tc-tiny /lib/ld-musl-mips-sf.so.1 (0x77d6e000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x77d4a000) libc.so => /lib/ld-musl-mips-sf.so.1 (0x77d6e000) root@OpenWrt:/# ldd /usr/libexec/tc-bpf /lib/ld-musl-mips-sf.so.1 (0x77da6000) libbpf.so.0 => /usr/lib/libbpf.so.0 (0x77d60000) libelf.so.1 => /usr/lib/libelf.so.1 (0x77d3e000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x77d1a000) libc.so => /lib/ld-musl-mips-sf.so.1 (0x77da6000) libz.so.1 => /usr/lib/libz.so.1 (0x77cf6000) root@OpenWrt:/# ldd /usr/libexec/tc-full /lib/ld-musl-mips-sf.so.1 (0x77de8000) libbpf.so.0 => /usr/lib/libbpf.so.0 (0x77da2000) libelf.so.1 => /usr/lib/libelf.so.1 (0x77d80000) libxtables.so.12 => /usr/lib/libxtables.so.12 (0x77d66000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x77d42000) libc.so => /lib/ld-musl-mips-sf.so.1 (0x77de8000) libz.so.1 => /usr/lib/libz.so.1 (0x77d1e000) This is based on a patch from Tiago Gaspar. Signed-off-by: Hauke Mehrtens --- package/network/utils/iproute2/Makefile | 42 +++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 928f44e797863..55c00a0d6d941 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -57,7 +57,16 @@ $(call Package/iproute2/Default) DEFAULT_VARIANT:=1 PROVIDES:=tc ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny - DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-bpf +$(call Package/iproute2/Default) + TITLE:=Traffic control utility (bpf) + VARIANT:=tcbpf + PROVIDES:=tc + ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-bpf + DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf endef define Package/tc-full @@ -65,13 +74,14 @@ $(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 + ALTERNATIVES:=400:/sbin/tc:/usr/libexec/tc-full + DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables +tc-mod-iptables endef define Package/tc-mod-iptables $(call Package/iproute2/Default) TITLE:=Traffic control module - iptables action + VARIANT:=tcfull DEPENDS:=+libxtables endef @@ -123,13 +133,29 @@ endif ifeq ($(BUILD_VARIANT),tctiny) LIBBPF_FORCE:=off +endif + +ifeq ($(BUILD_VARIANT),tcbpf) + HAVE_ELF:=y + LIBBPF_FORCE:=on SHARED_LIBS:=y endif ifeq ($(BUILD_VARIANT),tcfull) + #enable iptables/xtables requirement only if tciptables variant is selected + TC_CONFIG_XT:=y + TC_CONFIG_XT_OLD:=y + TC_CONFIG_XT_OLD_H:=y + TC_CONFIG_IPSET:=y HAVE_ELF:=y LIBBPF_FORCE:=on SHARED_LIBS:=y +else + #disable iptables requirement by default + TC_CONFIG_XT:=n + TC_CONFIG_XT_OLD:=n + TC_CONFIG_XT_OLD_H:=n + TC_CONFIG_IPSET:=n endif ifdef CONFIG_PACKAGE_devlink @@ -160,6 +186,10 @@ MAKE_FLAGS += \ HAVE_CAP=$(HAVE_CAP) \ IPT_LIB_DIR=/usr/lib/iptables \ XT_LIB_DIR=/usr/lib/iptables \ + TC_CONFIG_XT=$(TC_CONFIG_XT) \ + TC_CONFIG_XT_OLD=$(TC_CONFIG_XT_OLD) \ + TC_CONFIG_XT_OLD_H=$(TC_CONFIG_XT_OLD_H) \ + TC_CONFIG_IPSET=$(TC_CONFIG_IPSET) \ FPIC="$(FPIC)" \ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') @@ -190,6 +220,11 @@ define Package/tc-tiny/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny endef +define Package/tc-bpf/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-bpf +endef + define Package/tc-full/install $(INSTALL_DIR) $(1)/usr/libexec $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full @@ -236,6 +271,7 @@ $(eval $(call BuildPackage,ip-full)) # spurious rebuilds when building multiple variants. $(eval $(call BuildPackage,tc-mod-iptables)) $(eval $(call BuildPackage,tc-tiny)) +$(eval $(call BuildPackage,tc-bpf)) $(eval $(call BuildPackage,tc-full)) $(eval $(call BuildPackage,genl)) $(eval $(call BuildPackage,ip-bridge)) From fa409c126ad6472400b39bdd468b81d99f65e860 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 5 Aug 2022 12:11:28 +0200 Subject: [PATCH 2/8] iproute2: update to 5.16.0 Import patch: - 0001-lib-fix-ax25.h-include-for-musl.patch Refreshed patches: - 100-configure.patch - 130-no_netem_tipc_dcb_man_vdpa.patch - 140-keep_libmnl_optional.patch - 145-keep_libelf_optional.patch - 150-keep_libcap_optional.patch - 170-ip_tiny.patch - 190-fix-nls-rpath-link.patch - 195-build_variant_ip_tc.patch - 200-drop_libbsd_dependency.patch - 300-selinux-configurable.patch Size ip-full (mips_24kc): - 176K ip-full_5.16.0-1_mips_24kc.ipk - 172K ip-full_5.15.0-2_mips_24kc.ipk Size ip-tiny (mips_24kc): - 124K ip-tiny_5.16.0-1_mips_24kc.ipk - 124K ip-tiny_5.15.0-2_mips_24kc.ipk Changes: ade99e20 v5.16.0 1225e307 testsuite: Fix tc/vlan.t test 4734fdb9 uapi: update to mptcp.h c04e45d0 lib/bpf: fix verbose flag when using libbpf 73590d95 tc: flower: Fix buffer overflow on large labels 3f77bc62 uapi: update to if_ether.h 5f8bb902 ip/ipnexthop: fix unsigned overflow in parse_nh_group_type_res() 3184de37 lib/bpf_legacy: remove always-true check 79026c12 rdma: update uapi headers fa58de9b vdpa: align uapi headers be31c264 lnstat: fix buffer overflow in header output 0e949725 tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH 9bd5ab0f mptcp: fix JSON output when dumping endpoints by id a787d9ae man: tc-u32: Fix page to match new firstfrag behavior af96c7b5 Fix some typos detected by Lintian in manpages 35c81b18 uapi: update vdpa.h 0c263d7c iplink_can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC) 0f7bb8d8 iplink_can: print brp and dbrp bittiming variables 67f3c7a5 iplink_can: use PRINT_ANY to factorize code and fix signedness fd5e958c iplink_can: code refactoring of print_ctrlmode() 8316df6e iplink_can: fix configuration ranges in print_usage() and add unit 6e15d27a ip: add AMT support 9cae1de5 Import amt.h 258e350c Update kernel headers 047e9ae5 devlink: Fix cmd_dev_param_set() to check configuration mode 9e009e78 ip, neigh: Add NTF_EXT_MANAGED support 040e5252 ip, neigh: Add missing NTF_USE support c76a3849 ip, neigh: Fix up spacing in netlink dump 76b30805 xfrm: enable to manage default policies 95cd2a62 iplink: enable to specify index when changing netns cee0cf84 configure: add the --libdir option 0ee1950b configure: add the --prefix option 4b8bca5f configure: support --param=value style 99245d17 configure: simplify options parsing c330d097 configure: fix parsing issue with more than one value per option 48c379bc configure: fix parsing issue on libbpf_dir option 1d819dcc configure: fix parsing issue on include_dir option 19ba785f rdma: Add optional-counters set/unset support 7d5cb70e rdma: Add stat "mode" support d480cb71 rdma: Update uapi headers e4ca6a49 Update kernel headers a31e7b79 mptcp: cleanup include section. 41020eb0 Update documentation 8fb522cd Add support for IOAM encap modes b840c620 ip: nexthop: keep cache netlink socket open b9017435 devlink: print maximum number of snapshots if available 6448ed37 Update kernel headers 7ca868a7 ip: nexthop: add print_cache_nexthop which prints and manages the nh cache 5d5dc549 ip: route: print and cache detailed nexthop information when requested cb3d18c2 ip: nexthop: add a helper which retrieves and prints cached nh entry 60a97030 ip: nexthop: add cache helpers 53d7c43b ip: nexthop: factor out ipnh_get_id rtnl talk into a helper a2ca4312 ip: nexthop: factor out print_nexthop's nh entry printing 945c26db ip: nexthop: parse attributes into nh entry structure before printing 7ec1cee6 ip: nexthop: add nh entry structure 60a7515b ip: nexthop: split print_nh_res_group into parse and print parts cfb0a872 ip: nexthop: add resilient group structure 371e889d ip: export print_rta_gateway version which outputs prepared gateway string f7278996 ip: print_rta_if takes ifindex as device argument instead of attribute e2cc9840 ROSE: Print decoded addresses rather than hex numbers. 26c5782f ROSE: Add rose_ntop implementation. fd4c1c81 NETROM: Print decoded addresses rather than hex numbers. c63b769a NETROM: Add netrom_ntop implementation. 399ae00a AX.25: Print decoded addresses rather than hex numbers. 3a92669b AX.25: Add ax25_ntop implementation. ebbb7017 lib: bpf_legacy: add prog name, load time, uid and btf id in prog info dump 0431e1e7 ip: Support filter links/neighs with no master 12b3d6a2 man: ip-macsec: fix gcm-aes-256 formatting issue ae895504 bridge: vlan: add support for mcast_router option 12fbe3e4 bridge: vlan: set vlan option attributes while parsing db28c944 Update kernel headers 6d676ad9 ip: rewrite routel in python 1eaebad2 ip: remove routef script adddf30c ip: remove ifcfg script 2c811088 ip: remove old rtpr script 72222cd4 bridge: vlan: add support for dumping router ports 7ad5505b bridge: vlan: add global mcast_querier option 061da2e2 bridge: vlan: add global mcast_startup_query_interval option 60dcd5c3 bridge: vlan: add global mcast_query_response_interval option 0e4cfa03 bridge: vlan: add global mcast_query_interval option ebcee09c bridge: vlan: add global mcast_querier_interval option 3ae784f5 bridge: vlan: add global mcast_membership_interval option 2b6cc38d bridge: vlan: add global mcast_last_member_interval option 7cc7dbf4 bridge: vlan: add global mcast_startup_query_count option 3399c075 bridge: vlan: add global mcast_last_member_count option a8d7212a bridge: vlan: add global mcast_mld_version option 29fada0f bridge: vlan: add global mcast_igmp_version option 1f608d59 bridge: vlan: add global mcast_snooping option dee5eb05 bridge: vlan: add support to set global vlan options ecf6d8b4 bridge: vlan: add support for vlan filtering when dumping options 720f8613 bridge: vlan: add support to show global vlan options d3a961a9 bridge: vlan: skip unknown attributes when printing options 312e22fe bridge: vlan: factor out vlan option printing d2eecb9d ip: bridge: add support for mcast_vlan_snooping ebaa603b ip/bond: add lacp active support 8d6134b2 Update kernel headers 51d8fc70 ip/tunnel: always print all known attributes 71ba9c18 ipioam6: use print_nl instead of print_null e7841194 tc/skbmod: Introduce SKBMOD_F_ECN option 78832863 IOAM man8 32f4969d New IOAM6 encap type for routes 29098125 Add, show, link, remove IOAM namespaces and schemas e53f4cd5 Import ioam6 uapi headers 236696e5 Update kernel headers cf866f0a ipneigh: add support to print brief output of neigh cache in tabular format Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 4 +-- ...0001-lib-fix-ax25.h-include-for-musl.patch | 31 +++++++++++++++++++ .../iproute2/patches/100-configure.patch | 2 +- .../130-no_netem_tipc_dcb_man_vdpa.patch | 2 +- .../patches/140-keep_libmnl_optional.patch | 2 +- .../patches/145-keep_libelf_optional.patch | 2 +- .../patches/150-keep_libcap_optional.patch | 2 +- .../utils/iproute2/patches/170-ip_tiny.patch | 10 +++--- .../patches/190-fix-nls-rpath-link.patch | 4 +-- .../patches/195-build_variant_ip_tc.patch | 4 +-- .../patches/200-drop_libbsd_dependency.patch | 2 +- .../patches/300-selinux-configurable.patch | 2 +- 12 files changed, 49 insertions(+), 18 deletions(-) create mode 100644 package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 55c00a0d6d941..cd453b4c98f9d 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.15.0 +PKG_VERSION:=5.16.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=38e3e4a5f9a7f5575c015027a10df097c149111eeb739993128e5b2b35b291ff +PKG_HASH:=c064b66f6b001c2a35aa5224b5b1ac8aa4bee104d7dce30d6f10a84cb8b01e2f PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch b/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch new file mode 100644 index 0000000000000..fa6a6c9f25f6d --- /dev/null +++ b/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch @@ -0,0 +1,31 @@ +From 8bced38a941a181f1468fa39541e872e51b6022f Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Thu, 13 Jan 2022 08:14:13 +0000 +Subject: [PATCH 1/1] lib: fix ax25.h include for musl + +ax25.h isn't guaranteed to be avilable in netax25/*; +it's dependent on our choice of libc (it's not available +on musl at least) [0]. + +Let's use the version from linux-headers. + +[0] https://sourceware.org/glibc/wiki/Synchronizing_Headers +Bug: https://bugs.gentoo.org/831102 + +Signed-off-by: Sam James +Signed-off-by: Stephen Hemminger +--- + lib/ax25_ntop.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/ax25_ntop.c ++++ b/lib/ax25_ntop.c +@@ -2,7 +2,7 @@ + + #include + #include +-#include ++#include + + #include "utils.h" + diff --git a/package/network/utils/iproute2/patches/100-configure.patch b/package/network/utils/iproute2/patches/100-configure.patch index 0c19b2086a95b..2d4fb7b9b39b3 100644 --- a/package/network/utils/iproute2/patches/100-configure.patch +++ b/package/network/utils/iproute2/patches/100-configure.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -34,7 +34,8 @@ int main(int argc, char **argv) { +@@ -36,7 +36,8 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch index 8ddb316744fac..1386dd9e1fa6f 100644 --- a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch +++ b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-s +@@ -65,7 +65,7 @@ WFLAGS += -Wmissing-declarations -Wold-s CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch index ff7e9ca4e58f9..576da0fd597b5 100644 --- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch +++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -387,7 +387,7 @@ check_selinux() +@@ -398,7 +398,7 @@ check_selinux() check_mnl() { diff --git a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch index 079ca0512e212..0c5c3f59ed9ad 100644 --- a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch +++ b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -255,7 +255,7 @@ EOF +@@ -266,7 +266,7 @@ EOF check_elf() { diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch index 68e16241663c3..e945d802f380b 100644 --- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch +++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -445,7 +445,7 @@ EOF +@@ -456,7 +456,7 @@ EOF check_cap() { diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index cd687e7601044..399dd4fc87f0f 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -17,6 +17,13 @@ RTMONOBJ=rtmon.o +@@ -18,6 +18,13 @@ RTMONOBJ=rtmon.o include ../config.mk @@ -12,9 +12,9 @@ +STATIC_SYM_SOURCES:=$(filter-out $(STATIC_SYM_FILTER),$(wildcard *.c)) + ALLOBJ=$(IPOBJ) $(RTMONOBJ) - SCRIPTS=ifcfg rtpr routel routef + SCRIPTS=routel TARGETS=ip rtmon -@@ -46,7 +53,7 @@ else +@@ -47,7 +54,7 @@ else ip: static-syms.o static-syms.o: static-syms.h @@ -30,8 +30,8 @@ "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] -batch filename\n" +#ifndef IPROUTE2_TINY - "where OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n" - " macsec | maddress | monitor | mptcp | mroute | mrule |\n" + "where OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |\n" + " link | macsec | maddress | monitor | mptcp | mroute | mrule |\n" " neighbor | neighbour | netconf | netns | nexthop | ntable |\n" " ntbl | route | rule | sr | tap | tcpmetrics |\n" " token | tunnel | tuntap | vrf | xfrm }\n" diff --git a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch index 92d02b9a4e931..c7fceb2e22106 100644 --- a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch +++ b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -279,7 +279,7 @@ int main(int argc, char **argv) { +@@ -290,7 +290,7 @@ int main(int argc, char **argv) { } EOF @@ -9,7 +9,7 @@ local ret=$? rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test -@@ -297,7 +297,7 @@ int main(int argc, char **argv) { +@@ -308,7 +308,7 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch index 13418662eeaa7..a219251573b86 100644 --- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch +++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch @@ -1,9 +1,9 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -26,7 +26,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI +@@ -27,7 +27,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI ALLOBJ=$(IPOBJ) $(RTMONOBJ) - SCRIPTS=ifcfg rtpr routel routef + SCRIPTS=routel -TARGETS=ip rtmon +TARGETS=$(findstring ip,$(BUILD_VARIANT)) rtmon diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch index 12a1ccfa33cf1..bc316c7ddefa4 100644 --- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch +++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -431,14 +431,8 @@ EOF +@@ -442,14 +442,8 @@ EOF if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then echo "no" else diff --git a/package/network/utils/iproute2/patches/300-selinux-configurable.patch b/package/network/utils/iproute2/patches/300-selinux-configurable.patch index b7e61fd3bd593..817abf7d17ac0 100644 --- a/package/network/utils/iproute2/patches/300-selinux-configurable.patch +++ b/package/network/utils/iproute2/patches/300-selinux-configurable.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -374,7 +374,7 @@ check_libbpf() +@@ -385,7 +385,7 @@ check_libbpf() check_selinux() # SELinux is a compile time option in the ss utility { From 917589b8ed31e572780dbb2c5c105cf1131a7eb0 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 5 Aug 2022 12:31:06 +0200 Subject: [PATCH 3/8] iproute2: update to 5.17.0 Remove backports: - 0001-lib-fix-ax25.h-include-for-musl.patch Changes: 4c424dfd v5.17.0 7846496b link_xfrm: if_id must be non zero eed4bb1a testsuite: link xfrm delete no if_id test ac0a54b2 rdma: make RES_PID and RES_KERN_NAME alternative to each other 885e281e uapi: update vdpa.h 19c0def1 ipaddress: remove 'label' compatibility with Linux-2.0 net aliases 1808f002 lib/fs: fix memory leak in get_task_name() 62c0700c uapi: update magic.h c8d9d925 rdma: Fix the logic to print unsigned int. a42dfaa4 Revert "rdma: Fix res_print_uint() and add res_print_u64()" 9d0badec rdma: Fix res_print_uint() and add res_print_u64() 86a1452b uapi: update to xfrm.h 09c6a3d2 bridge: Remove vlan listing from `bridge link` e4fda259 bridge: Fix error string typo cc143bda lnstat: fix strdup leak in -w argument parsing 90bbf861 iplink_can: print_usage: typo fix, add missing spaces 1b5c7414 dcb: Fix error reporting when accessing "dcb app" a38d305d tc: fix duplicate fall-through f8beda6e libnetlink: fix socket leak in rtnl_open_byproto() 7f70eb2a tc_util: Fix parsing action control with space and slash 29da83f8 iprule: Allow option dsfield in 'ip rule show' 07012a1f ss: use freecon() instead of free() when appropriate 03b4de0b man: Fix a typo in the flag documentation of ip address 924f6b4a dcb: app: Add missing "dcb app show dev X default-prio" 5c9571bc uapi: update kernel headers from 5.17-rc1 d542543b tc/action: print error to stderr 52370c61 mptcp: add id check for deleting address c556f577 dcb: Rewrite array-formatting code to not cause warnings with Clang 0dc5da8e f_flower: fix checkpatch warnings ffbcb246 netem: fix checkpatch warnings 8bced38a lib: fix ax25.h include for musl e27bb8e5 uapi: add missing virtio headers 26ff0afa uapi: add missing rose and ax25 files eb4206ec q_cake: allow changing to diffserv3 db530529 iplink_can: add ctrlmode_{supported,_static} to the "--details --json" output ac2e9148 Update kernel headers bb4cc9cc rdma: Don't allocate sparse array b8767168 rdma: Limit copy data by the destination size 167e33f3 vdpa: Enable user to set mtu of the vdpa device 384938f9 vdpa: Enable user to set mac address of vdpa device a311f0c4 vdpa: Enable user to query vdpa device config layout 9d8882d5 vdpa: Update kernel headers 5cb7ec0c Update kernel headers and import virtio_net 26113360 mptcp: add support for changing the backup flag 4b301b87 tc: Add support for ce_threshold_value/mask in fq_codel 99d09ee9 bond: add arp_missed_max option 432cb06b mptcp: add support for fullmesh flag 2d777dfe Update kernel headers a21458fc vdpa: Remove duplicate vdpa UAPI header file Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 4 +-- ...0001-lib-fix-ax25.h-include-for-musl.patch | 31 ------------------- 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index cd453b4c98f9d..6058b5e8d94ea 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.16.0 +PKG_VERSION:=5.17.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=c064b66f6b001c2a35aa5224b5b1ac8aa4bee104d7dce30d6f10a84cb8b01e2f +PKG_HASH:=6e384f1b42c75e1a9daac57866da37dcff909090ba86eb25a6e764da7893660e PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch b/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch deleted file mode 100644 index fa6a6c9f25f6d..0000000000000 --- a/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8bced38a941a181f1468fa39541e872e51b6022f Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Thu, 13 Jan 2022 08:14:13 +0000 -Subject: [PATCH 1/1] lib: fix ax25.h include for musl - -ax25.h isn't guaranteed to be avilable in netax25/*; -it's dependent on our choice of libc (it's not available -on musl at least) [0]. - -Let's use the version from linux-headers. - -[0] https://sourceware.org/glibc/wiki/Synchronizing_Headers -Bug: https://bugs.gentoo.org/831102 - -Signed-off-by: Sam James -Signed-off-by: Stephen Hemminger ---- - lib/ax25_ntop.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/lib/ax25_ntop.c -+++ b/lib/ax25_ntop.c -@@ -2,7 +2,7 @@ - - #include - #include --#include -+#include - - #include "utils.h" - From 64d52cbde8810a610a537f92667121fc1dcf4b11 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 5 Aug 2022 12:36:12 +0200 Subject: [PATCH 4/8] iproute2: update to 5.18.0 The ip-tiny size grows from 124k (5.17.0) to 128k (5.18.0). The update introduces a commit "configure: add check_libtirpc()" that introduces a check for libtirpc. However, if libtirpc is already in the staging directory due to an other dependency the check yields that the library is installed and should be used resulting in failures like: Package ss is missing dependencies for the following libraries: libtirpc.so.3 To fix it add a patch making libtirpc optional again and setting it "HAVE_TIRPC=n": - 155-keep_tirpc_optional.patch Fix patches: - 130-no_netem_tipc_dcb_man_vdpa.patch Refresh patches: - 140-keep_libmnl_optional.patch - 150-keep_libcap_optional.patch - 180-drop_FAILED_POLICY.patch - 200-drop_libbsd_dependency.patch Changes: 6474b7c8 v5.18.0 4429a6c9 tipc: fix keylen check 6b6979b9 iplink: remove GSO_MAX_SIZE definition 19c3e009 doc: fix 'infact' --> 'in fact' typo ed706c78 man: fix some typos 03589beb man: devlink-region: fix typo in example b84fc332 tc: em_u32: fix offset parsing b6d17086 uapi: update of virtio_ids 17bf51b7 libbpf: Remove use of bpf_map_is_offload_neutral fa305925 libbpf: Remove use of bpf_program__set_priv and bpf_program__priv 9e0057b4 libbpf: Use bpf_object__load instead of bpf_object__load_xattr e81fd551 devlink: fix "devlink health dump" command without arg 6f3b5843 man: use quote instead of acute accent 42d351fa man: 'allow to' -> 'allow one to' d8a7a0f4 uapi: upstream update to stddef.h 5b2ff061 uapi: update from 5.18-rc1 292509f9 ss: remove an implicit dependency on rpcinfo 1ee309a4 configure: add check_libtirpc() 41848100 ip/geneve: add support for IFLA_GENEVE_INNER_PROTO_INHERIT 28add137 f_flower: Implement gtp options support b25599c5 ip: GTP support in ip link e4880869 man: bridge: document per-port mcast_router settings 9e82e828 bridge: support for controlling mcast_router per port f1d18e2e Update kernel headers 8130653d vdpa: Update man page with added support to configure max vq pair 56eb8bf4 vdpa: Support reading device features 16482fd4 vdpa: Support for configuring max VQ pairs for a device bd91c764 vdpa: Allow for printing negotiated features of a device 2d1954c8 vdpa: Remove unsupported command line option 93fb6810 Makefile: move HAVE_MNL check to top-level Makefile 2dee2101 man: ip-link: whitespace fixes to odd line breaks mid sentence 609b90aa man: ip-link: mention bridge port's default mcast_flood state b1c3ad84 man: ip-link: document new bcast_flood flag on bridge ports c354a434 ip: iplink_bridge_slave: support for broadcast flooding 909f0d51 man: bridge: add missing closing " in bridge show mdb 3b681cf9 man: bridge: document new bcast_flood flag for bridge ports a6c848eb bridge: support for controlling flooding of broadcast per port 8acb5247 ip/batadv: allow to specify RA when creating link 0431d8e8 Import batman_adv.h header from last kernel sync point 239bfd45 Revert "configure: Allow command line override of toolchain" a93c90c7 tc: separate action print for filter and action dump d9977eaf bpf: Remove use of bpf_create_map_xattr ac4e0913 bpf: Export bpf syscall wrapper 873bb975 bpf_glue: Remove use of bpf_load_program from libbpf 5e17b715 ss: display advertised TCP receive window and out-of-order counter 712ec66e tc: bash-completion: Add profinet and ethercat to procotol completion list 75061b35 lib: add profinet and ethercat as link layer protocol names 0a685b98 man8/ip-link.8: add locked port feature description and cmd syntax d4fe3673 man8/bridge.8: add locked port feature description and cmd syntax 092af16b ip: iplink_bridge_slave: add locked port flag support 0e51a185 bridge: link: add command to set port in locked mode 04a0077d Update kernel headers 386ae64c configure: Allow command line override of toolchain bea92cb0 mptcp: add port support for setting flags 2dbc6c90 mptcp: add fullmesh support for setting flags 5fb6bda0 mptcp: add fullmesh check for adding address 9831202f bond: add ns_ip6_target option e8fd4d4b devlink: Remove strtouint8_t in favor of get_u8 2688abf0 devlink: Remove strtouint16_t in favor of get_u16 95c03f40 devlink: Remove strtouint32_t in favor of get_u32 7cb0e24d devlink: Remove strtouint64_t in favor of get_u64 7848f6bb Update kernel headers 4f015972 f_flower: fix indentation for enc_key_id and u32 25a9c4fa tunnel: Fix missing space after local/remote print ff14875e Update documentation 8908cb25 Add support for the IOAM insertion frequency cd24451e Update kernel headers e4ba36f7 iplink: add ip-link documentation 5d57e130 iplink: add gro_max_size attribute handling 721435dc tc: u32: add json support in `print_raw`, `print_ipv4`, `print_ipv6` c733722b tc: u32: add support for json output 5f44590d tc/f_flower: fix indentation 9948b6cb tc_util: fix breakage from clang changes f4cd4f12 tc: add skip_hw and skip_sw to control action offload ba5ac984 json_print: suppress clang format warning bf71c8f2 libbpf: fix clang warning about format non-literal 5632cf69 tunnel: fix clang warning c0248878 tipc: fix clang warning about empty format string 371c13e8 can: fix clang warning 8d27eee5 ipl2tp: fix clang warning 560d2336 tc_util: fix clang warning in print_masked_type b2450e46 flower: fix clang warnings 4e27d538 netem: fix clang warnings 9d5e29e6 utils: add format attribute 343c4f52 tc: add format attribute to tc_print_rate Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 5 +++-- .../patches/130-no_netem_tipc_dcb_man_vdpa.patch | 11 +++++++---- .../iproute2/patches/140-keep_libmnl_optional.patch | 2 +- .../iproute2/patches/150-keep_libcap_optional.patch | 2 +- .../iproute2/patches/155-keep_tirpc_optional.patch | 11 +++++++++++ .../iproute2/patches/180-drop_FAILED_POLICY.patch | 2 +- .../iproute2/patches/200-drop_libbsd_dependency.patch | 2 +- 7 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 6058b5e8d94ea..123b0ce238e7c 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.17.0 +PKG_VERSION:=5.18.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=6e384f1b42c75e1a9daac57866da37dcff909090ba86eb25a6e764da7893660e +PKG_HASH:=5ba3d464d51c8c283550d507ffac3d10f7aec587b7c66b0ccb6950643646389e PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 @@ -184,6 +184,7 @@ MAKE_FLAGS += \ HAVE_ELF=$(HAVE_ELF) \ HAVE_MNL=$(HAVE_MNL) \ HAVE_CAP=$(HAVE_CAP) \ + HAVE_TIRPC=n \ IPT_LIB_DIR=/usr/lib/iptables \ XT_LIB_DIR=/usr/lib/iptables \ TC_CONFIG_XT=$(TC_CONFIG_XT) \ diff --git a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch index 1386dd9e1fa6f..2a3f9eb90f1d1 100644 --- a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch +++ b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch @@ -1,11 +1,14 @@ --- a/Makefile +++ b/Makefile -@@ -65,7 +65,7 @@ WFLAGS += -Wmissing-declarations -Wold-s +@@ -65,9 +65,9 @@ WFLAGS += -Wmissing-declarations -Wold-s CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v --SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa -+SUBDIRS=lib ip tc bridge misc genl devlink rdma +-SUBDIRS=lib ip tc bridge misc netem genl man ++SUBDIRS=lib ip tc bridge misc genl + ifeq ($(HAVE_MNL),y) +-SUBDIRS += tipc devlink rdma dcb vdpa ++SUBDIRS += devlink rdma + endif LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a - LDLIBS += $(LIBNETLINK) diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch index 576da0fd597b5..a8cdd103ba308 100644 --- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch +++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -398,7 +398,7 @@ check_selinux() +@@ -411,7 +411,7 @@ check_tirpc() check_mnl() { diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch index e945d802f380b..4cce2c3ca6802 100644 --- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch +++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -456,7 +456,7 @@ EOF +@@ -469,7 +469,7 @@ EOF check_cap() { diff --git a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch new file mode 100644 index 0000000000000..28ba7e52176d5 --- /dev/null +++ b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -398,7 +398,7 @@ check_selinux() + + check_tirpc() + { +- if ${PKG_CONFIG} libtirpc --exists; then ++ if [ "${HAVE_TIRPC}" = "y" ] && ${PKG_CONFIG} libtirpc --exists; then + echo "HAVE_RPC:=y" >>$CONFIG + echo "yes" + diff --git a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch index 07d5230a6e4b4..094ff393a68df 100644 --- a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch +++ b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch @@ -31,7 +31,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY if (!end || end == arg || *end || res > 255) --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h -@@ -256,6 +256,7 @@ enum { +@@ -265,6 +265,7 @@ enum { RTN_THROW, /* Not in this table */ RTN_NAT, /* Translate this address */ RTN_XRESOLVE, /* Use external resolver */ diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch index bc316c7ddefa4..d1948860e8665 100644 --- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch +++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -442,14 +442,8 @@ EOF +@@ -455,14 +455,8 @@ EOF if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then echo "no" else From 56d38a961a5fee34702ea9ea8f3cae34a73bed30 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 6 Aug 2022 09:41:38 +0200 Subject: [PATCH 5/8] iproute2: update to 5.19.0 Add patch: - 105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch Refreshed: - 170-ip_tiny.patch - 195-build_variant_ip_tc.patch Changes: deb48554 v5.19.0 f8decf82 bpf_glue: include errno.h 71178ae0 rdma: update uapi/ib_user_verbs.h 96594fd2 vdpa: update uapi headers from 5.19-rc7 30c7b77f Revert "uapi: add vdpa.h" c5433c4b ip neigh: Fix memory leak when doing 'get' 2cb76253 mptcp: Fix memory leak when getting limits afdbb020 mptcp: Fix memory leak when doing 'endpoint show' 6db01afd bridge: Fix memory leak when doing 'fdb get' 1d540336 ip address: Fix memory leak when specifying device 325f706b uapi: add virtio_ring.h 291898c5 uapi: add vdpa.h 6e2fb804 uapi: update bpf.h 329fda18 ip: Fix size_columns() invocation that passes a 32-bit quantity 2a00a4b1 man: tc-fq_codel: add drop_batch 6bf5abef uapi: update mptcp.h 02410392 ip: Fix size_columns() for very large values ed243312 man: tc-ct.8: fix example 2bb37e90 l2tp: fix typo in AF_INET6 checksum JSON print 855edb3d man: tc-fq_codel: Fix a typo. 4044a453 tc: declaration hides parameter a44a7918 genl: fix duplicate include guard 703f2de6 uapi: change name for zerocopy sendfile in tls 248ad98e uapi: update socket.h 11e41a63 ip: Convert non-constant initializers to macros 8d3977ef Update kernel headers 5a1ad9f8 man: ip-stats.8: Describe groups xstats, xstats_slave and afstats d9976d67 ipstats: Expose bond stats in ipstats 36e10429 ipstats: Expose bridge stats in ipstats 79f5ad95 iplink_bridge: Split bridge_print_stats_attr() 1247ed51 ipstats: Add groups "xstats", "xstats_slave" c6900b79 ipstats: Add a third level of stats hierarchy, a "suite" 2ed73b9a iplink: Add JSON support to MPLS stats formatter 5ed8fd9d ipstats: Add a group "afstats", subgroup "mpls" dff392fd iplink: Publish a function to format MPLS stats 72623b73 iplink: Fix formatting of MPLS stats ce41750f ip: ipstats: Do not assume length of response attribute payload 40b50f15 bridge: vni: add support for stats dumping c7f12a15 ip: iplink_vxlan: add support to set vnifiltering flag on vxlan device 45cd32f9 bridge: vxlan device vnifilter support 837294e4 libbpf: Remove use of bpf_map_is_offload_neutral 64e5ed77 libbpf: Remove use of bpf_program__set_priv and bpf_program__priv ba6519cb libbpf: Use bpf_object__load instead of bpf_object__load_xattr a6eb654d f_flower: add number of vlans man entry 5788732e f_flower: Check args with num_of_vlans 5ba31bcf f_flower: Add num of vlans parameter b28eb051 man: Add man pages for the "stats" functions a05a27c0 ipmonitor: Add monitoring support for stats events 0f1fd40c ipstats: Add offload subgroup "l3_stats" 179030fa ipstats: Add offload subgroup "hw_stats_info" af5e7955 ipstats: Add a group "offload", subgroup "cpu_hit" 0517a2fd ipstats: Add a group "link" df0b2c6d ipstats: Add a shell of "show" command 82f6444f ipstats: Add a "set" command 54d82b06 ip: Add a new family of commands, "stats" 5520cf16 ip: Publish functions for stats formatting a463d6b1 libnetlink: Add filtering to rtnl_statsdump_req_filter() 38ae12d3 devlink: introduce -[he]x cmdline option to allow dumping numbers in hex format bba95837 Update kernel headers f6559bea ip-link: put types on man page in alphabetic order ee53174b ip/iplink_virt_wifi: add support for virt_wifi Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 4 +-- ...IN-function-to-fix-undefined-referen.patch | 27 +++++++++++++++++++ .../utils/iproute2/patches/170-ip_tiny.patch | 6 ++--- .../patches/195-build_variant_ip_tc.patch | 2 +- 4 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 123b0ce238e7c..5439c050c1b59 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.18.0 +PKG_VERSION:=5.19.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=5ba3d464d51c8c283550d507ffac3d10f7aec587b7c66b0ccb6950643646389e +PKG_HASH:=26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch b/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch new file mode 100644 index 0000000000000..7bf55dd57b810 --- /dev/null +++ b/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch @@ -0,0 +1,27 @@ +From c69e8e474936795a2cd7638b11ce3e99ff4d5ae7 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sat, 6 Aug 2022 10:00:20 +0200 +Subject: [PATCH] ipstats: Define MIN function to fix undefined references + +Fixes errors in the form of: + in function `ipstats_show_64': + :(.text+0x4e30): undefined reference to `MIN' + +Signed-off-by: Nick Hainke +--- + ip/ipstats.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/ip/ipstats.c ++++ b/ip/ipstats.c +@@ -6,6 +6,10 @@ + #include "utils.h" + #include "ip_common.h" + ++#ifndef MIN ++#define MIN(a, b) ((a) < (b) ? (a) : (b)) ++#endif ++ + struct ipstats_stat_dump_filters { + /* mask[0] filters outer attributes. Then individual nests have their + * filtering mask at the index of the nested attribute. diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index 399dd4fc87f0f..1196be31f0e73 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -18,6 +18,13 @@ RTMONOBJ=rtmon.o +@@ -19,6 +19,13 @@ RTMONOBJ=rtmon.o include ../config.mk @@ -14,7 +14,7 @@ ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=routel TARGETS=ip rtmon -@@ -47,7 +54,7 @@ else +@@ -48,7 +55,7 @@ else ip: static-syms.o static-syms.o: static-syms.h @@ -93,8 +93,8 @@ { "ioam", do_ioam6 }, +#endif { "help", do_help }, + { "stats", do_ipstats }, { 0 } - }; --- a/lib/Makefile +++ b/lib/Makefile @@ -3,6 +3,10 @@ include ../config.mk diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch index a219251573b86..dc9c0b2969d68 100644 --- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch +++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -27,7 +27,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI +@@ -28,7 +28,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=routel From a350a1cea5eda981dd59d943f0e15d6ceb76966b Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 6 Aug 2022 23:35:12 +0200 Subject: [PATCH 6/8] iproute2: shrink ip-tiny size by disabling features With the 5.18 and 5.19 update ip-tiny grows in size. Remove some features bringing it back to the size before 5.18. Remove - Identifier-locator addressing (ila) - MACsec Device Configuration (macsec) - Multicast Routing Cache Management (mroute) - mrule - Virtual Routing and Forwarding (vrf) - Segment Routing (sr) Signed-off-by: Nick Hainke --- .../utils/iproute2/patches/170-ip_tiny.patch | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index 1196be31f0e73..ba2cb0637a782 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -36,14 +36,14 @@ " ntbl | route | rule | sr | tap | tcpmetrics |\n" " token | tunnel | tuntap | vrf | xfrm }\n" +#else -+ "where OBJECT := { address | ila | link | macsec | maddress | monitor |\n" -+ " mroute | mrule | neighbor | neighbour | netns | route |\n" -+ " rule | sr | token | tunnel | vrf }\n" ++ "where OBJECT := { address | link | maddress | monitor |\n" ++ " neighbor | neighbour | netns | route |\n" ++ " rule | token | tunnel }\n" +#endif " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n" " -f[amily] { inet | inet6 | mpls | bridge | link } |\n" -@@ -91,37 +97,51 @@ static const struct cmd { +@@ -91,37 +97,49 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -63,9 +63,9 @@ +#ifndef IPROUTE2_TINY { "l2tp", do_ipl2tp }, { "fou", do_ipfou }, -+#endif { "ila", do_ipila }, { "macsec", do_ipmacsec }, ++#endif { "tunnel", do_iptunnel }, { "tunl", do_iptunnel }, +#ifndef IPROUTE2_TINY @@ -78,16 +78,14 @@ { "monitor", do_ipmonitor }, +#ifndef IPROUTE2_TINY { "xfrm", do_xfrm }, -+#endif { "mroute", do_multiroute }, { "mrule", do_multirule }, ++#endif { "netns", do_netns }, +#ifndef IPROUTE2_TINY { "netconf", do_ipnetconf }, -+#endif { "vrf", do_ipvrf}, { "sr", do_seg6 }, -+#ifndef IPROUTE2_TINY { "nexthop", do_ipnh }, { "mptcp", do_mptcp }, { "ioam", do_ioam6 }, From 41f59a6c2ef5c3dd81d7087a17935344a2b21f7d Mon Sep 17 00:00:00 2001 From: benihi <88561480+benihi@users.noreply.github.com> Date: Mon, 15 Aug 2022 22:54:57 -0400 Subject: [PATCH 7/8] kernel: modules: cleanup 5.18 (#9946) --- package/kernel/linux/modules/fs.mk | 8 ++++---- package/kernel/linux/modules/netdevices.mk | 6 +++--- package/kernel/linux/modules/other.mk | 4 ++-- package/kernel/linux/modules/usb.mk | 2 +- package/kernel/linux/modules/video.mk | 2 +- package/kernel/mac80211/ath.mk | 4 ++-- package/lean/ntfs3-mount/Makefile | 2 +- target/linux/x86/modules.mk | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index c96e45cbcd2d3..51fea756e0044 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -109,9 +109,9 @@ define KernelPackage/fs-cifs +kmod-crypto-ccm \ +kmod-crypto-ecb \ +kmod-crypto-des \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-asn1-decoder \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-oid-registry \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-dnsresolver + +(LINUX_5_15||LINUX_5_19):kmod-asn1-decoder \ + +(LINUX_5_15||LINUX_5_19):kmod-oid-registry \ + +(LINUX_5_15||LINUX_5_19):kmod-dnsresolver endef define KernelPackage/fs-cifs/description @@ -530,7 +530,7 @@ $(eval $(call KernelPackage,fs-ntfs)) define KernelPackage/fs-ntfs3 SUBMENU:=$(FS_MENU) TITLE:=NTFS3 Read-Write file system support - DEPENDS:=@(LINUX_5_15||LINUX_5_18||LINUX_5_19) +kmod-nls-base + DEPENDS:=@(LINUX_5_15||LINUX_5_19) +kmod-nls-base KCONFIG:= \ CONFIG_NTFS3_FS \ CONFIG_NTFS3_64BIT_CLUSTER=y \ diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 8bba6c63cc156..e4329af952004 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -142,7 +142,7 @@ $(eval $(call KernelPackage,mii)) define KernelPackage/mdio-devres SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Supports MDIO device registration - DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio + DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_5_19) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio KCONFIG:=CONFIG_MDIO_DEVRES HIDDEN:=1 FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko @@ -563,7 +563,7 @@ $(eval $(call KernelPackage,8139cp)) define KernelPackage/r8169 SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:= \ CONFIG_R8169 \ CONFIG_R8169_NAPI=y \ @@ -689,7 +689,7 @@ $(eval $(call KernelPackage,igbvf)) define KernelPackage/ixgbe SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:=CONFIG_IXGBE \ CONFIG_IXGBE_VXLAN=n \ CONFIG_IXGBE_HWMON=y \ diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 030e6767c4f3c..95902cca6b79c 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -1151,8 +1151,8 @@ $(eval $(call KernelPackage,keys-trusted)) define KernelPackage/tpm SUBMENU:=$(OTHER_MENU) TITLE:=TPM Hardware Support - DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-asn1-decoder \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-asn1-encoder +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-oid-registry + DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_5_19):kmod-asn1-decoder \ + +(LINUX_5_15||LINUX_5_19):kmod-asn1-encoder +(LINUX_5_15||LINUX_5_19):kmod-oid-registry KCONFIG:= CONFIG_TCG_TPM FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko AUTOLOAD:=$(call AutoLoad,10,tpm,1) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 6f97c55b740c2..dbb553802a651 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1138,7 +1138,7 @@ $(eval $(call KernelPackage,usb-net-aqc111)) define KernelPackage/usb-net-asix TITLE:=Kernel module for USB-to-Ethernet Asix convertors - DEPENDS:=+kmod-libphy +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=+kmod-libphy +(LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:=CONFIG_USB_NET_AX8817X FILES:= \ $(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko \ diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 09f56ccc1fe68..1740d4101367e 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -244,7 +244,7 @@ define KernelPackage/drm TITLE:=Direct Rendering Manager (DRM) support HIDDEN:=1 DEPENDS:=+kmod-dma-buf +kmod-i2c-core +kmod-i2c-algo-bit +PACKAGE_kmod-backlight:kmod-backlight \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-fb + +(LINUX_5_15||LINUX_5_19):kmod-fb KCONFIG:= \ CONFIG_DRM \ CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y \ diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index e678180a51b06..a0e1c9bd4b5e2 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -344,7 +344,7 @@ define KernelPackage/ath11k-ahb $(call KernelPackage/mac80211/Default) TITLE:=Qualcomm 802.11ax AHB wireless chipset support URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k - DEPENDS+= @TARGET_ipq807x +kmod-ath11k +(LINUX_5_15||LINUX_5_18):kmod-qrtr-smd + DEPENDS+= @TARGET_ipq807x +kmod-ath11k +(LINUX_5_15||LINUX_5_19):kmod-qrtr-smd FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko AUTOLOAD:=$(call AutoProbe,ath11k_ahb) endef @@ -358,7 +358,7 @@ define KernelPackage/ath11k-pci $(call KernelPackage/mac80211/Default) TITLE:=Qualcomm 802.11ax PCI wireless chipset support URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k - DEPENDS+= @PCI_SUPPORT +(LINUX_5_15||LINUX_5_18):kmod-qrtr-mhi +kmod-ath11k + DEPENDS+= @PCI_SUPPORT +(LINUX_5_15||LINUX_5_19):kmod-qrtr-mhi +kmod-ath11k FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko AUTOLOAD:=$(call AutoProbe,ath11k_pci) endef diff --git a/package/lean/ntfs3-mount/Makefile b/package/lean/ntfs3-mount/Makefile index 61dd214bac1e5..a5fc2a2974115 100644 --- a/package/lean/ntfs3-mount/Makefile +++ b/package/lean/ntfs3-mount/Makefile @@ -10,7 +10,7 @@ define Package/ntfs3-mount CATEGORY:=Utilities SUBMENU:=Filesystem TITLE:=NTFS mount script for Paragon NTFS3 driver - DEPENDS:=+LINUX_5_4:kmod-fs-ntfs3-oot +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-fs-ntfs3 + DEPENDS:=+LINUX_5_4:kmod-fs-ntfs3-oot +(LINUX_5_15||LINUX_5_19):kmod-fs-ntfs3 PKGARCH:=all endef diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk index 8d21bf473bdb0..182fa3387ce62 100644 --- a/target/linux/x86/modules.mk +++ b/target/linux/x86/modules.mk @@ -22,7 +22,7 @@ $(eval $(call KernelPackage,amazon-ena)) define KernelPackage/amd-xgbe SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=AMD Ethernet on SoC support - DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:=CONFIG_AMD_XGBE FILES:=$(LINUX_DIR)/drivers/net/ethernet/amd/xgbe/amd-xgbe.ko AUTOLOAD:=$(call AutoLoad,35,amd-xgbe) From 3c6c5fac6c50ce0237a4962619e03d3d95cba0b7 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 14 Aug 2022 23:21:06 +0800 Subject: [PATCH 8/8] rtl8821cu: drop broken package Doesn't have these usb wireless network cards, but did a simple test on rtl8852be, it turns out that the rtl driver is completely rubbish and is no longer usable. --- package/kernel/rtl8821cu/Makefile | 86 ------------------- .../patches/001-use-kernel-byteorder.patch | 15 ---- .../patches/020-remove-repeat-flies.patch | 39 --------- .../030-change-value-of-vht-enable.patch | 11 --- .../rtl8821cu/patches/040-wireless-5.8.patch | 58 ------------- .../patches/050-Buildfix-for-Linux-5.18.patch | 44 ---------- .../patches/051-fix-rtw_memcpy-5.18.patch | 53 ------------ 7 files changed, 306 deletions(-) delete mode 100644 package/kernel/rtl8821cu/Makefile delete mode 100644 package/kernel/rtl8821cu/patches/001-use-kernel-byteorder.patch delete mode 100644 package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch delete mode 100644 package/kernel/rtl8821cu/patches/030-change-value-of-vht-enable.patch delete mode 100644 package/kernel/rtl8821cu/patches/040-wireless-5.8.patch delete mode 100644 package/kernel/rtl8821cu/patches/050-Buildfix-for-Linux-5.18.patch delete mode 100644 package/kernel/rtl8821cu/patches/051-fix-rtw_memcpy-5.18.patch diff --git a/package/kernel/rtl8821cu/Makefile b/package/kernel/rtl8821cu/Makefile deleted file mode 100644 index d74f8564b8dfc..0000000000000 --- a/package/kernel/rtl8821cu/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# -# Copyright (C) 2021 ImmortalWrt -# -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rtl8821cu -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=https://github.com/brektrou/rtl8821CU.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-04-09 -PKG_SOURCE_VERSION:=8c2226a74ae718439d56248bd2e44ccf717086d5 -PKG_MIRROR_HASH:=3353a3bc4c73652eceaab95809aab27c3ae8bbf7e915b73488361a061ba91b84 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINTER:=CN_SZTL - -PKG_BUILD_PARALLEL:=1 - -STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/rtl8821cu - SUBMENU:=Wireless Drivers - TITLE:=Realtek RTL8811CU/RTL8821CU support - DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT - FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko - AUTOLOAD:=$(call AutoProbe,rtl8821cu) - PROVIDES:=kmod-rtl8821cu -endef - -NOSTDINC_FLAGS = \ - -I$(PKG_BUILD_DIR) \ - -I$(PKG_BUILD_DIR)/include \ - -I$(STAGING_DIR)/usr/include/mac80211-backport \ - -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \ - -I$(STAGING_DIR)/usr/include/mac80211 \ - -I$(STAGING_DIR)/usr/include/mac80211/uapi \ - -include backport/autoconf.h \ - -include backport/backport.h - -EXTRA_KCONFIG:= \ - CONFIG_RTL8821CU=m \ - USER_MODULE_NAME=rtl8821cu - -ifeq ($(ARCH),aarch64) - EXTRA_KCONFIG += CONFIG_MP_VHT_HW_TX_MODE=n -endif - -EXTRA_CFLAGS:= \ - -DRTW_SINGLE_WIPHY \ - -DRTW_USE_CFG80211_STA_EVENT \ - -DCONFIG_IOCTL_CFG80211 \ - -DCONFIG_CONCURRENT_MODE \ - -DBUILD_OPENWRT - -ifeq ($(ARCH),arm) - EXTRA_CFLAGS += -mfloat-abi=softfp -endif - -ifeq ($(BOARD),x86) - EXTRA_CFLAGS += -mhard-float -endif - -MAKE_OPTS:= \ - $(KERNEL_MAKE_FLAGS) \ - M="$(PKG_BUILD_DIR)" \ - NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ - USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ - $(EXTRA_KCONFIG) - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - modules -endef - -$(eval $(call KernelPackage,rtl8821cu)) diff --git a/package/kernel/rtl8821cu/patches/001-use-kernel-byteorder.patch b/package/kernel/rtl8821cu/patches/001-use-kernel-byteorder.patch deleted file mode 100644 index e75a278339739..0000000000000 --- a/package/kernel/rtl8821cu/patches/001-use-kernel-byteorder.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix compile problem when rtw_byteorder.h and asm/byteorder.h gets -included in addition for example indirectly, do not use realtek own copy -of the byteorder headers. - ---- a/include/drv_types.h -+++ b/include/drv_types.h -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include diff --git a/package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch b/package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch deleted file mode 100644 index 76baf2a24a9ce..0000000000000 --- a/package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9b2b0ec1bc2d31ddf93ed74d63fdfa6044e329a4 Mon Sep 17 00:00:00 2001 -From: Ben Greear -Date: Fri, 9 Nov 2018 16:21:43 -0800 -Subject: [PATCH] Fix build against openwrt backports tree. - -Like breaks builds elsewhere, can fix it up later. - -Signed-off-by: Ben Greear ---- - include/drv_conf.h | 4 +++- - .../{wireless.h => old_unused_rtl_wireless.h} | 0 - include/{autoconf.h => rtl_autoconf.h} | 0 - 3 files changed, 3 insertions(+), 1 deletions(-) - rename include/linux/{wireless.h => old_unused_rtl_wireless.h} (100%) - rename include/{autoconf.h => rtl_autoconf.h} (100%) - -diff --git a/include/drv_conf.h b/include/drv_conf.h -index 0d20a7e..f0a9f88 100644 ---- a/include/drv_conf.h -+++ b/include/drv_conf.h -@@ -14,7 +14,9 @@ - *****************************************************************************/ - #ifndef __DRV_CONF_H__ - #define __DRV_CONF_H__ --#include "autoconf.h" -+ -+#include -+#include "rtl_autoconf.h" - #include "hal_ic_cfg.h" - - #if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS) -diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h -similarity index 100% -rename from include/linux/wireless.h -rename to include/linux/old_unused_rtl_wireless.h -diff --git a/include/autoconf.h b/include/rtl_autoconf.h -similarity index 100% -rename from include/autoconf.h -rename to include/rtl_autoconf.h diff --git a/package/kernel/rtl8821cu/patches/030-change-value-of-vht-enable.patch b/package/kernel/rtl8821cu/patches/030-change-value-of-vht-enable.patch deleted file mode 100644 index 34dcd8e4de2dc..0000000000000 --- a/package/kernel/rtl8821cu/patches/030-change-value-of-vht-enable.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/os_dep/linux/os_intfs.c -+++ b/os_dep/linux/os_intfs.c -@@ -238,7 +238,7 @@ - #endif /* CONFIG_80211N_HT */ - - #ifdef CONFIG_80211AC_VHT --int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */ -+int rtw_vht_enable = 2; /* 0:disable, 1:enable, 2:force auto enable */ - module_param(rtw_vht_enable, int, 0644); - - int rtw_ampdu_factor = 7; diff --git a/package/kernel/rtl8821cu/patches/040-wireless-5.8.patch b/package/kernel/rtl8821cu/patches/040-wireless-5.8.patch deleted file mode 100644 index 8ed4115a2c7f5..0000000000000 --- a/package/kernel/rtl8821cu/patches/040-wireless-5.8.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c -index d9c81c9..3e7e27a 100755 ---- a/os_dep/linux/ioctl_cfg80211.c -+++ b/os_dep/linux/ioctl_cfg80211.c -@@ -7149,7 +7149,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #else - struct net_device *ndev, - #endif --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT) - struct mgmt_frame_regs *upd) - #else - u16 frame_type, bool reg) -@@ -7178,7 +7178,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - /* Wait QC Verify */ - return; - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT) - SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4)); - #else - switch (frame_type) { -@@ -9467,7 +9467,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT) - .update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register, - #else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c -index 257c581..f97fa24 100755 ---- a/os_dep/linux/os_intfs.c -+++ b/os_dep/linux/os_intfs.c -@@ -1306,6 +1306,14 @@ unsigned int rtw_classify8021d(struct sk_buff *skb) - } - - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) -+static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb -+ , struct net_device *sb_dev -+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0)) -+ , select_queue_fallback_t fallback -+ #endif -+) -+#else - static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) - , void *accel_priv -@@ -1314,6 +1322,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb - #endif - #endif - ) -+#endif - { - _adapter *padapter = rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; diff --git a/package/kernel/rtl8821cu/patches/050-Buildfix-for-Linux-5.18.patch b/package/kernel/rtl8821cu/patches/050-Buildfix-for-Linux-5.18.patch deleted file mode 100644 index 98f8b422bb9b6..0000000000000 --- a/package/kernel/rtl8821cu/patches/050-Buildfix-for-Linux-5.18.patch +++ /dev/null @@ -1,44 +0,0 @@ -From af27791efdde55cdec3b4400c9d1a806c0040e38 Mon Sep 17 00:00:00 2001 -From: Butterfly -Date: Tue, 12 Apr 2022 00:31:54 +0300 -Subject: [PATCH] Buildfix for Linux 5.18 - -Buildfix for Linux 5.18 -Link: https://github.com/brektrou/rtl8821CU/pull/168 ---- - include/ieee80211.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/include/ieee80211.h -+++ b/include/ieee80211.h -@@ -1529,18 +1529,30 @@ enum ieee80211_state { - (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ - (((Addr[5]) & 0xff) == 0xff)) - #else -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) -+static inline int is_multicast_mac_addr(const u8 *addr) -+#else - extern __inline int is_multicast_mac_addr(const u8 *addr) -+#endif - { - return (addr[0] != 0xff) && (0x01 & addr[0]); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) -+static inline int is_broadcast_mac_addr(const u8 *addr) -+#else - extern __inline int is_broadcast_mac_addr(const u8 *addr) -+#endif - { - return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ - (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) -+static inline int is_zero_mac_addr(const u8 *addr) -+#else - extern __inline int is_zero_mac_addr(const u8 *addr) -+#endif - { - return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ - (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); diff --git a/package/kernel/rtl8821cu/patches/051-fix-rtw_memcpy-5.18.patch b/package/kernel/rtl8821cu/patches/051-fix-rtw_memcpy-5.18.patch deleted file mode 100644 index c56fdc1581145..0000000000000 --- a/package/kernel/rtl8821cu/patches/051-fix-rtw_memcpy-5.18.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 7e24201ebdcdbe2d34f5cdfe4065928b381b8d04 Mon Sep 17 00:00:00 2001 -From: Butterfly -Date: Tue, 12 Apr 2022 00:05:41 +0300 -Subject: [PATCH 1/2] osdep_service.c: fix warning _rtw_memcpy - -osdep_service.c: fix warning _rtw_memcpy ---- - os_dep/osdep_service.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c -index d4a01c8..6a2d3ac 100644 ---- a/os_dep/osdep_service.c -+++ b/os_dep/osdep_service.c -@@ -2491,7 +2491,11 @@ int rtw_change_ifname(_adapter *padapter, const char *ifname) - - rtw_init_netdev_name(pnetdev, ifname); - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) - _rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN); -+#else -+ dev_addr_set(pnetdev, adapter_mac_addr(padapter)); -+#endif - - if (rtnl_lock_needed) - ret = register_netdev(pnetdev); - -From 924f57d1cce2843aa28d557b74baf00a6482caa8 Mon Sep 17 00:00:00 2001 -From: Butterfly -Date: Tue, 12 Apr 2022 00:08:52 +0300 -Subject: [PATCH 2/2] ioctl_linux.c: fix warning _rtw_memcpy - -ioctl_linux.c: fix warning _rtw_memcpy ---- - os_dep/linux/ioctl_linux.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c -index 20dd583..a0d32ee 100644 ---- a/os_dep/linux/ioctl_linux.c -+++ b/os_dep/linux/ioctl_linux.c -@@ -9778,7 +9778,11 @@ static int rtw_mp_efuse_set(struct net_device *dev, - rtw_hal_read_chip_info(padapter); - /* set mac addr*/ - rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter)); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) - _rtw_memcpy(padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */ -+#else -+ dev_addr_set(padapter->pnetdev, get_hal_mac_addr(padapter)); /* set mac addr to net_device */ -+#endif - - #ifdef CONFIG_P2P - rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));