package/batman-adv: fix build failures with Linux >= 6.12
PATCH 1/2 package/batman-adv: fix build failures with Linux >= 6.12
The first two patches fix:
/home/autobuild/autobuild/instance-5/output-1/build/batman-adv-2024.2/net/batman-adv/distributed-arp-table.c:10:10: fatal error: asm/unaligned.h: No such file or directory
Which is a fallout out from Linux kernel upstream commit 5f60d5f6bbc12e782fac78110b0ee62698f3b576 that got merged in Linux 6.12.
Patch 0003 is needed due to the removal of NETIF_F_LLTX in upstream Linux kernel commit 00d066a4d4edbe559ba6c35153da71d4b2b8a383 that got merged in Linux 6.12.
Patch 0004 is needed due to the removal of NETIF_F_NETNS_LOCAL in upstream Linux kernel commit 05c1280a2bcfca187fe7fa90bb240602cf54af0a that got merged in Linux 6.12.
Fixes:
https://autobuild.buildroot.org/results/4ac369f7fe9cd62de431fa02bc982465e8d1f806/
--- ...asm-unaligned.h-to-linux-unaligned.h.patch | 74 +++++++++++++++++++ ...er-includes-for-distributed-arp-tabl.patch | 39 ++++++++++ ...adv-convert-NETIF_F_LLTX-to-dev-lltx.patch | 40 ++++++++++ ...rt-NETIF_F_NETNS_LOCAL-to-dev-netns_.patch | 43 +++++++++++ 4 files changed, 196 insertions(+) create mode 100644 package/batman-adv/0001-batman-adv-move-asm-unaligned.h-to-linux-unaligned.h.patch create mode 100644 package/batman-adv/0002-batman-adv-Reorder-includes-for-distributed-arp-tabl.patch create mode 100644 package/batman-adv/0003-batman-adv-convert-NETIF_F_LLTX-to-dev-lltx.patch create mode 100644 package/batman-adv/0004-batman-adv-convert-NETIF_F_NETNS_LOCAL-to-dev-netns_.patch
package/batman-adv/0001-batman-adv-move-asm-unaligned.h-to-linux-unaligned.h.patch new file +74 -0
@@ -0,0 +1,74 @@ +From 3b434d5878131cd45aa5c4dd906fe0e569b445d6 Mon Sep 17 00:00:00 2001 +From: Al Viro <[email protected]> +Date: Tue, 1 Oct 2024 15:35:57 -0400 +Subject: [PATCH] batman-adv: move asm/unaligned.h to linux/unaligned.h + +asm/unaligned.h is always an include of asm-generic/unaligned.h; +might as well move that thing to linux/unaligned.h and include +that - there's nothing arch-specific in that header. + +auto-generated by the following: + +for i in `git grep -l -w asm/unaligned.h`; do + sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i +done +for i in `git grep -l -w asm-generic/unaligned.h`; do + sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i +done +git mv include/asm-generic/unaligned.h include/linux/unaligned.h +git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h +sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild +sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h + +Signed-off-by: Al Viro <[email protected]> +Signed-off-by: Sven Eckelmann <[email protected]> +Upstream: https://git.open-mesh.org/batman-adv.git/commit/ee60832ebec47a023d634b06f9434103ec090aed +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + compat-include/linux/unaligned.h | 20 ++++++++++++++++++++ + net/batman-adv/distributed-arp-table.c | 2 +- + 2 files changed, 21 insertions(+), 1 deletion(-) + create mode 100644 compat-include/linux/unaligned.h + +diff --git a/compat-include/linux/unaligned.h b/compat-include/linux/unaligned.h +new file mode 100644 +index 00000000..66d86646 +--- /dev/null ++++ b/compat-include/linux/unaligned.h +@@ -0,0 +1,20 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* Copyright (C) B.A.T.M.A.N. contributors: ++ * ++ * Marek Lindner, Simon Wunderlich ++ * ++ * This file contains macros for maintaining compatibility with older versions ++ * of the Linux kernel. ++ */ ++ ++#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_ ++#define _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_ ++ ++#include <linux/version.h> ++#if LINUX_VERSION_IS_GEQ(6, 12, 0) ++#include_next <linux/unaligned.h> ++#else ++#include <asm/unaligned.h> ++#endif ++ ++#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_ */ +diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c +index 4c7e8553..801eff8a 100644 +--- a/net/batman-adv/distributed-arp-table.c ++++ b/net/batman-adv/distributed-arp-table.c +@@ -7,7 +7,7 @@ + #include "distributed-arp-table.h" + #include "main.h" + +-#include <asm/unaligned.h> ++#include <linux/unaligned.h> + #include <linux/atomic.h> + #include <linux/bitops.h> + #include <linux/byteorder/generic.h> +-- +2.47.1 +
package/batman-adv/0002-batman-adv-Reorder-includes-for-distributed-arp-tabl.patch new file +39 -0
@@ -0,0 +1,39 @@ +From dc072c88ef0eaa80215dbc25923678c6a3d46e25 Mon Sep 17 00:00:00 2001 +From: Sven Eckelmann <[email protected]> +Date: Wed, 16 Oct 2024 09:23:06 +0200 +Subject: [PATCH] batman-adv: Reorder includes for distributed-arp-table.c + +The commit ee60832ebec4 ("batman-adv: move asm/unaligned.h to +linux/unaligned.h") changed the include without adjusting the order (to +match the rest of the file). + +Signed-off-by: Sven Eckelmann <[email protected]> +Upstream: https://git.open-mesh.org/batman-adv.git/commit/fd3a0eff09429719e61e60b7dc3d2a373183a5ad +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + net/batman-adv/distributed-arp-table.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c +index 801eff8a..48b72c2b 100644 +--- a/net/batman-adv/distributed-arp-table.c ++++ b/net/batman-adv/distributed-arp-table.c +@@ -7,7 +7,6 @@ + #include "distributed-arp-table.h" + #include "main.h" + +-#include <linux/unaligned.h> + #include <linux/atomic.h> + #include <linux/bitops.h> + #include <linux/byteorder/generic.h> +@@ -32,6 +31,7 @@ + #include <linux/stddef.h> + #include <linux/string.h> + #include <linux/udp.h> ++#include <linux/unaligned.h> + #include <linux/workqueue.h> + #include <net/arp.h> + #include <net/genetlink.h> +-- +2.47.1 +
package/batman-adv/0003-batman-adv-convert-NETIF_F_LLTX-to-dev-lltx.patch new file +40 -0
@@ -0,0 +1,40 @@ +From e8d6208a41c9b9912cac60ebad57d7dbe4b9786c Mon Sep 17 00:00:00 2001 +From: Alexander Lobakin <[email protected]> +Date: Thu, 29 Aug 2024 14:33:37 +0200 +Subject: [PATCH] batman-adv: convert NETIF_F_LLTX to dev->lltx + +NETIF_F_LLTX can't be changed via Ethtool and is not a feature, +rather an attribute, very similar to IFF_NO_QUEUE (and hot). +Free one netdev_features_t bit and make it a "hot" private flag. + +Signed-off-by: Alexander Lobakin <[email protected]> +Signed-off-by: Paolo Abeni <[email protected]> +[[email protected]: add compat code] +Signed-off-by: Sven Eckelmann <[email protected]> +Upstream: https://git.open-mesh.org/batman-adv.git/commit/b6d2c16d1a5f90e1aff1ca55d73ba4e7be03c2a0 +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + net/batman-adv/soft-interface.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c +index 30ecbc2e..48cf3bd9 100644 +--- a/net/batman-adv/soft-interface.c ++++ b/net/batman-adv/soft-interface.c +@@ -1021,8 +1021,12 @@ static void batadv_softif_init_early(struct net_device *dev) + dev->needs_free_netdev = true; + dev->priv_destructor = batadv_softif_free; + dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_NETNS_LOCAL; +- dev->features |= NETIF_F_LLTX; + dev->priv_flags |= IFF_NO_QUEUE; ++#if LINUX_VERSION_IS_GEQ(6, 12, 0) // UGLY_HACK_NEW ++ dev->lltx = true; ++#else // UGLY_HACK_OLD ++ dev->features |= NETIF_F_LLTX; ++#endif // UGLY_HACK_STOP + + /* can't call min_mtu, because the needed variables + * have not been initialized yet +-- +2.47.1 +
package/batman-adv/0004-batman-adv-convert-NETIF_F_NETNS_LOCAL-to-dev-netns_.patch new file +43 -0
43 lines not on this page · raw message
Signature · 6 lines
2.47.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/batman-adv: bump to version 2024.4
We can drop patches 0001, 0003 and 0004 as they are upstream. 0002 is renumbered to 0001.
---
...r-includes-for-distributed-arp-tabl.patch} | 0
...asm-unaligned.h-to-linux-unaligned.h.patch | 74 -------------------
...adv-convert-NETIF_F_LLTX-to-dev-lltx.patch | 40 ----------
...rt-NETIF_F_NETNS_LOCAL-to-dev-netns_.patch | 43 -----------
package/batman-adv/batman-adv.hash | 6 +-
package/batman-adv/batman-adv.mk | 2 +-
6 files changed, 4 insertions(+), 161 deletions(-)
rename package/batman-adv/{0002-batman-adv-Reorder-includes-for-distributed-arp-tabl.patch => 0001-batman-adv-Reorder-includes-for-distributed-arp-tabl.patch} (100%)
delete mode 100644 package/batman-adv/0001-batman-adv-move-asm-unaligned.h-to-linux-unaligned.h.patch
delete mode 100644 package/batman-adv/0003-batman-adv-convert-NETIF_F_LLTX-to-dev-lltx.patch
delete mode 100644 package/batman-adv/0004-batman-adv-convert-NETIF_F_NETNS_LOCAL-to-dev-netns_.patchpackage/batman-adv/0001-batman-adv-Reorder-includes-for-distributed-arp-tabl.patch renamed from package/batman-adv/0002-batman-adv-Reorder-includes-for-distributed-arp-tabl.patch +0 -0
package/batman-adv/0001-batman-adv-move-asm-unaligned.h-to-linux-unaligned.h.patch deleted +0 -74
74 lines not on this page · raw message
package/batman-adv/0003-batman-adv-convert-NETIF_F_LLTX-to-dev-lltx.patch deleted +0 -40
@@ -1,40 +0,0 @@ -From e8d6208a41c9b9912cac60ebad57d7dbe4b9786c Mon Sep 17 00:00:00 2001 -From: Alexander Lobakin <[email protected]> -Date: Thu, 29 Aug 2024 14:33:37 +0200 -Subject: [PATCH] batman-adv: convert NETIF_F_LLTX to dev->lltx - -NETIF_F_LLTX can't be changed via Ethtool and is not a feature, -rather an attribute, very similar to IFF_NO_QUEUE (and hot). -Free one netdev_features_t bit and make it a "hot" private flag. - -Signed-off-by: Alexander Lobakin <[email protected]> -Signed-off-by: Paolo Abeni <[email protected]> -[[email protected]: add compat code] -Signed-off-by: Sven Eckelmann <[email protected]> -Upstream: https://git.open-mesh.org/batman-adv.git/commit/b6d2c16d1a5f90e1aff1ca55d73ba4e7be03c2a0 -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - net/batman-adv/soft-interface.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c -index 30ecbc2e..48cf3bd9 100644 ---- a/net/batman-adv/soft-interface.c -+++ b/net/batman-adv/soft-interface.c -@@ -1021,8 +1021,12 @@ static void batadv_softif_init_early(struct net_device *dev) - dev->needs_free_netdev = true; - dev->priv_destructor = batadv_softif_free; - dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_NETNS_LOCAL; -- dev->features |= NETIF_F_LLTX; - dev->priv_flags |= IFF_NO_QUEUE; -+#if LINUX_VERSION_IS_GEQ(6, 12, 0) // UGLY_HACK_NEW -+ dev->lltx = true; -+#else // UGLY_HACK_OLD -+ dev->features |= NETIF_F_LLTX; -+#endif // UGLY_HACK_STOP - - /* can't call min_mtu, because the needed variables - * have not been initialized yet --- -2.47.1 -
package/batman-adv/0004-batman-adv-convert-NETIF_F_NETNS_LOCAL-to-dev-netns_.patch deleted +0 -43
43 lines not on this page · raw message
package/batman-adv/batman-adv.hash +3 -3
@@ -1,7 +1,7 @@ -# From https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2024.2.tar.gz.sha1 -sha1 de2a55d8d15b350efa6e6d3e6d29b6e3a6f4c04f batman-adv-2024.2.tar.gz +# From https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2024.4.tar.gz.sha1 +sha1 36bdc78a00bfa51d8afa689be1b651b9da9f8860 batman-adv-2024.4.tar.gz # locally computed -sha256 7692a6dee7a2f3f66732e9aec8c7164e0c1818167f3af063bff3fffbb0199643 batman-adv-2024.2.tar.gz +sha256 a554df6fc7abccc6b243f56ea7b184486c95ea986db1133f87aafe237da92f21 batman-adv-2024.4.tar.gz # Hash for license files sha256 cecbf53d1148e13256ac29f8b900655b7fc8dc12d59939a95bc2323ea1747025 LICENSES/preferred/GPL-2.0
package/batman-adv/batman-adv.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -BATMAN_ADV_VERSION = 2024.2 +BATMAN_ADV_VERSION = 2024.4 BATMAN_ADV_SITE = https://downloads.open-mesh.org/batman/stable/sources/batman-adv BATMAN_ADV_LICENSE = GPL-2.0, MIT (batman_adv.h) BATMAN_ADV_LICENSE_FILES = LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT
Signature · 6 lines
2.47.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 16 lines · Thomas Petazzoni via buildroot
The first two patches fix:
/home/autobuild/autobuild/instance-5/output-1/build/batman-adv-2024.2/net/batman-adv/distributed-arp-table.c:10:10: fatal error:asm/unaligned.h: No such file or directoryWhich is a fallout out from Linux kernel upstream commit
5f60d5f6bbc12e782fac78110b0ee62698f3b576that got merged in Linux 6.12.Patch 0003 is needed due to the removal of
NETIF_F_LLTXin upstream Linux kernel commit00d066a4d4edbe559ba6c35153da71d4b2b8a383that got merged in Linux 6.12.Patch 0004 is needed due to the removal of
NETIF_F_NETNS_LOCALin upstream Linux kernel commit05c1280a2bcfca187fe7fa90bb240602cf54af0athat got merged in Linux 6.12.
Quoted 6 lines
Fixes:
https://autobuild.buildroot.org/results/4ac369f7fe9cd62de431fa02bc982465e8d1f806/
Signed-off-by Thomas Petazzoni <[email protected]>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot