summaryrefslogtreecommitdiff
path: root/packages/linux-kernel/patches
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-30 19:57:06 +0100
committerChristian Poessinger <christian@poessinger.com>2020-12-31 11:54:24 +0100
commit629814dea2e558fb4d28b786ac92850c14f76cd5 (patch)
tree599a036781d0433e2873eb273e8e375a2fc1b9ad /packages/linux-kernel/patches
parentd14b0ee946bcd80e4f758764c784ffa6737f0a4b (diff)
downloadvyos-build-629814dea2e558fb4d28b786ac92850c14f76cd5.tar.gz
vyos-build-629814dea2e558fb4d28b786ac92850c14f76cd5.zip
Kernel: Initial support for 5.10.4
Diffstat (limited to 'packages/linux-kernel/patches')
-rw-r--r--packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch93
-rw-r--r--packages/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch81
-rw-r--r--packages/linux-kernel/patches/kernel/0003-ship-perf-debian-package.patch57
-rw-r--r--packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-wireguard-modules-package.patch74
4 files changed, 113 insertions, 192 deletions
diff --git a/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch b/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch
index 2be1a3c8..b28f255e 100644
--- a/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch
+++ b/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch
@@ -1,4 +1,4 @@
-From 388b9bc4dc78cbc83c6476d765f6e0c3d3ed1fb4 Mon Sep 17 00:00:00 2001
+From 81d38c4a32e059ad7835f7dc254e7627642afbe9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 29 Apr 2013 18:50:15 -0700
Subject: [PATCH] VyOS: Add linkstate IP device attribute
@@ -8,133 +8,129 @@ Backport of earlier Vyatta patch.
(cherry picked from commit 7c5a851086686be14ae937c80d6cee34814dbefc)
---
- Documentation/networking/ip-sysctl.txt | 13 +++++++++++++
+ Documentation/networking/ip-sysctl.rst | 11 +++++++++++
include/linux/inetdevice.h | 1 +
include/linux/ipv6.h | 1 +
include/uapi/linux/ip.h | 1 +
include/uapi/linux/ipv6.h | 1 +
- net/ipv4/devinet.c | 2 ++
- net/ipv6/addrconf.c | 9 +++++++++
- net/ipv6/route.c | 11 +++++++++++
- 8 files changed, 39 insertions(+)
+ net/ipv4/devinet.c | 1 +
+ net/ipv6/addrconf.c | 8 ++++++++
+ net/ipv6/route.c | 10 ++++++++++
+ 8 files changed, 34 insertions(+)
-diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
-index 8af3771a3ebf..93408cc52991 100644
---- a/Documentation/networking/ip-sysctl.txt
-+++ b/Documentation/networking/ip-sysctl.txt
-@@ -1245,6 +1245,19 @@ rp_filter - INTEGER
+diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst
+index 25e6673a085a..4cd1134d3aac 100644
+--- a/Documentation/networking/ip-sysctl.rst
++++ b/Documentation/networking/ip-sysctl.rst
+@@ -1425,6 +1425,17 @@ rp_filter - INTEGER
Default value is 0. Note that some distributions enable it
in startup scripts.
+link_filter - INTEGER
-+ 0 - Allow packets to be received for the address on this interface
-+ even if interface is disabled or no carrier.
-+
++ 0 - Allow packets to be received for the address on this interface
++ even if interface is disabled or no carrier.
+ 1 - Ignore packets received if interface associated with the incoming
-+ address is down.
-+
++ address is down.
+ 2 - Ignore packets received if interface associated with the incoming
-+ address is down or has no carrier.
++ address is down or has no carrier.
+
+ Default value is 0. Note that some distributions enable it
+ in startup scripts.
+
arp_filter - BOOLEAN
- 1 - Allows you to have multiple network interfaces on the same
- subnet, and have the ARPs for each interface be answered
+ - 1 - Allows you to have multiple network interfaces on the same
+ subnet, and have the ARPs for each interface be answered
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
-index 3515ca64e638..dcae58193580 100644
+index 3515ca64e638..bfb49b5913e7 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -133,6 +133,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
#define IN_DEV_ARP_ANNOUNCE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_ANNOUNCE)
#define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE)
#define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY)
-+#define IN_DEV_LINKFILTER(in_dev) IN_DEV_MAXCONF((in_dev), LINKFILTER)
++#define IN_DEV_LINKFILTER(in_dev) IN_DEV_MAXCONF((in_dev), LINKFILTER)
struct in_ifaddr {
struct hlist_node hash;
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
-index ea7c7906591e..57f656ea2783 100644
+index dda61d150a13..9d96b27ec350 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
-@@ -76,6 +76,7 @@ struct ipv6_devconf {
- __s32 ndisc_tclass;
+@@ -77,6 +77,7 @@ struct ipv6_devconf {
+ __s32 rpl_seg_enabled;
struct ctl_table_header *sysctl_header;
-+ __s32 link_filter; /* VyOS */
++ __s32 link_filter;
};
struct ipv6_params {
diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
-index e42d13b55cf3..baf8e77c201b 100644
+index e42d13b55cf3..8f5291976f04 100644
--- a/include/uapi/linux/ip.h
+++ b/include/uapi/linux/ip.h
@@ -169,6 +169,7 @@ enum
IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
IPV4_DEVCONF_DROP_GRATUITOUS_ARP,
IPV4_DEVCONF_BC_FORWARDING,
-+ IPV4_DEVCONF_LINKFILTER, /* VyOS only */
++ IPV4_DEVCONF_LINKFILTER,
__IPV4_DEVCONF_MAX
};
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
-index 9c0f4a92bcff..619edd130cfd 100644
+index 13e8751bf24a..2ea26a70bda2 100644
--- a/include/uapi/linux/ipv6.h
+++ b/include/uapi/linux/ipv6.h
-@@ -187,6 +187,7 @@ enum {
- DEVCONF_DISABLE_POLICY,
+@@ -189,6 +189,7 @@ enum {
DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN,
DEVCONF_NDISC_TCLASS,
+ DEVCONF_RPL_SEG_ENABLED,
+ DEVCONF_LINK_FILTER,
DEVCONF_MAX
};
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
-index a27d034c85cc..b62b62abe907 100644
+index 123a6d39438f..1deb400805b0 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
-@@ -2550,6 +2550,8 @@ static struct devinet_sysctl_table {
+@@ -2547,6 +2547,7 @@ static struct devinet_sysctl_table {
"route_localnet"),
DEVINET_SYSCTL_FLUSHING_ENTRY(DROP_UNICAST_IN_L2_MULTICAST,
"drop_unicast_in_l2_multicast"),
-+ /* VyOS */
+ DEVINET_SYSCTL_RW_ENTRY(LINKFILTER, "link_filter"),
},
};
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
-index 635b2482fa20..ce1405ecf6f6 100644
+index 8b6eb384bac7..176a914acfee 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
-@@ -5477,6 +5477,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
- array[DEVCONF_ADDR_GEN_MODE] = cnf->addr_gen_mode;
+@@ -5516,6 +5516,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
array[DEVCONF_DISABLE_POLICY] = cnf->disable_policy;
array[DEVCONF_NDISC_TCLASS] = cnf->ndisc_tclass;
+ array[DEVCONF_RPL_SEG_ENABLED] = cnf->rpl_seg_enabled;
+ array[DEVCONF_LINK_FILTER] = cnf->link_filter;
}
static inline size_t inet6_ifla6_size(void)
-@@ -6849,6 +6850,14 @@ static const struct ctl_table addrconf_sysctl[] = {
- .mode = 0644,
- .proc_handler = addrconf_sysctl_disable_policy,
+@@ -6896,6 +6897,13 @@ static const struct ctl_table addrconf_sysctl[] = {
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
},
-+ /* VyOS */
+ {
+ .procname = "link_filter",
+ .data = &ipv6_devconf.link_filter,
+ .maxlen = sizeof(int),
+ .mode = 0644,
-+ .proc_handler = proc_dointvec
-+ },
++ .proc_handler = proc_dointvec,
++ },
{
- .procname = "ndisc_tclass",
- .data = &ipv6_devconf.ndisc_tclass,
+ /* sentinel */
+ }
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
-index 46df6345bb99..2b930a2c4fdb 100644
+index 7e0ce7af8234..c4ef9f4d40e1 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
-@@ -686,6 +686,15 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh)
+@@ -687,6 +687,14 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh)
}
#endif
@@ -142,15 +138,14 @@ index 46df6345bb99..2b930a2c4fdb 100644
+{
+ const struct net_device *dev = nh->fib_nh_dev;
+ int linkf = __in6_dev_get(dev)->cnf.link_filter;
-+
+ return (linkf && !netif_running(dev))
-+ || (linkf > 1 && !netif_carrier_ok(dev));
++ || (linkf > 1 && !netif_carrier_ok(dev));
+}
+
/*
* Default Router Selection (RFC 2461 6.3.6)
*/
-@@ -727,6 +736,8 @@ static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif,
+@@ -728,6 +736,8 @@ static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif,
if (!m && (strict & RT6_LOOKUP_F_IFACE))
return RT6_NUD_FAIL_HARD;
diff --git a/packages/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch b/packages/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch
index 21f4cd60..93e9154e 100644
--- a/packages/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch
+++ b/packages/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch
@@ -1,4 +1,4 @@
-From 77ce1f672326050d6b47dbab4f52f0bbcd553a37 Mon Sep 17 00:00:00 2001
+From 1d625d2f745b61a718ce52cd1729f467c17defa6 Mon Sep 17 00:00:00 2001
From: Alex Harpin <development@landsofshadow.co.uk>
Date: Wed, 31 Dec 2014 10:33:38 +0000
Subject: [PATCH] VyOS: add inotify support for stackable filesystems
@@ -19,19 +19,20 @@ for bug #303, and will allow that commit to be reverted.
Bug #425 http://bugzilla.vyos.net/show_bug.cgi?id=425
(cherry picked from commit a93f1128bc83b5a6628da242e71c18ef05e81ea2)
+
---
fs/notify/inotify/Kconfig | 9 +++
- fs/notify/inotify/inotify_user.c | 110 ++++++++++++++++++++++++++++++-
- fs/overlayfs/super.c | 24 ++++++-
+ fs/notify/inotify/inotify_user.c | 114 ++++++++++++++++++++++++++++++-
+ fs/overlayfs/super.c | 27 ++++++--
include/linux/inotify.h | 28 ++++++++
- 4 files changed, 168 insertions(+), 3 deletions(-)
+ 4 files changed, 172 insertions(+), 6 deletions(-)
diff --git a/fs/notify/inotify/Kconfig b/fs/notify/inotify/Kconfig
-index 6736e47d94d8..84d9b31300c0 100644
+index 1cc8be25df7e..bc4acd1a6ea4 100644
--- a/fs/notify/inotify/Kconfig
+++ b/fs/notify/inotify/Kconfig
@@ -15,3 +15,12 @@ config INOTIFY_USER
- For more information, see <file:Documentation/filesystems/inotify.txt>
+ For more information, see <file:Documentation/filesystems/inotify.rst>
If unsure, say Y.
+
@@ -39,12 +40,12 @@ index 6736e47d94d8..84d9b31300c0 100644
+ bool "Inotify support for stackable filesystem"
+ select INOTIFY_USER
+ default y
-+ ---help---
++ help
+ Say Y here to enable inotify support for stackable filesystem.
+
+ If unsure, say N.
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
-index 81ffc8629fc4..cacedffa6534 100644
+index 186722ba3894..1ce328e506c8 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -15,6 +15,7 @@
@@ -55,7 +56,7 @@ index 81ffc8629fc4..cacedffa6534 100644
#include <linux/fsnotify_backend.h>
#include <linux/idr.h>
#include <linux/init.h> /* fs_initcall */
-@@ -75,6 +76,92 @@ struct ctl_table inotify_table[] = {
+@@ -75,6 +76,93 @@ struct ctl_table inotify_table[] = {
};
#endif /* CONFIG_SYSCTL */
@@ -78,10 +79,10 @@ index 81ffc8629fc4..cacedffa6534 100644
+
+ read_lock(&inotify_fs_lock);
+ list_for_each_entry(fse, &inotify_fs_list, list) {
-+ if (fse->fs_type == fs) {
-+ ret = fse;
-+ break;
-+ }
++ if (fse->fs_type == fs) {
++ ret = fse;
++ break;
++ }
+ }
+ read_unlock(&inotify_fs_lock);
+
@@ -134,6 +135,7 @@ index 81ffc8629fc4..cacedffa6534 100644
+EXPORT_SYMBOL_GPL(inotify_unregister_stackfs);
+
+#else
++
+static inline struct inotify_stackfs* inotify_get_stackfs(struct path *path)
+{
+ return NULL;
@@ -145,23 +147,26 @@ index 81ffc8629fc4..cacedffa6534 100644
+
+#endif /* CONFIG_INOTIFY_STACKFS */
+
- static inline __u32 inotify_arg_to_mask(u32 arg)
+ static inline __u32 inotify_arg_to_mask(struct inode *inode, u32 arg)
{
__u32 mask;
-@@ -332,7 +419,7 @@ static const struct file_operations inotify_fops = {
+@@ -334,8 +422,8 @@ static const struct file_operations inotify_fops = {
/*
* find_inode - resolve a user-given path to a specific inode
*/
-static int inotify_find_inode(const char __user *dirname, struct path *path,
+- unsigned int flags, __u64 mask)
+static inline int __inotify_find_inode(const char __user *dirname, struct path *path,
- unsigned int flags, __u64 mask)
++ unsigned int flags, __u64 mask)
{
int error;
-@@ -354,6 +441,27 @@ static int inotify_find_inode(const char __user *dirname, struct path *path,
+
+@@ -356,6 +444,28 @@ static int inotify_find_inode(const char __user *dirname, struct path *path,
return error;
}
-+static int inotify_find_inode(const char __user *dirname, struct path *path, unsigned flags, __u64 mask)
++static int inotify_find_inode(const char __user *dirname, struct path *path,
++ unsigned int flags, __u64 mask)
+{
+ int ret;
+ struct path tpath;
@@ -186,7 +191,7 @@ index 81ffc8629fc4..cacedffa6534 100644
struct inotify_inode_mark *i_mark)
{
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
-index d6b724beb304..380ac598f2e4 100644
+index 290983bcfbb3..c751b0c8d9e5 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -15,6 +15,7 @@
@@ -197,7 +202,7 @@ index d6b724beb304..380ac598f2e4 100644
#include "overlayfs.h"
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
-@@ -1758,6 +1759,18 @@ static void ovl_inode_init_once(void *foo)
+@@ -2040,6 +2041,18 @@ static void ovl_inode_init_once(void *foo)
inode_init_once(&oi->vfs_inode);
}
@@ -216,20 +221,26 @@ index d6b724beb304..380ac598f2e4 100644
static int __init ovl_init(void)
{
int err;
-@@ -1772,13 +1785,21 @@ static int __init ovl_init(void)
-
- err = register_filesystem(&ovl_fs_type);
- if (err)
-- kmem_cache_destroy(ovl_inode_cachep);
-+ goto err;
-+ err = inotify_register_stackfs(&ovl_inotify);
-+ if (err)
-+ goto err;
-+ return err;
+@@ -2055,18 +2068,24 @@ static int __init ovl_init(void)
+ err = ovl_aio_request_cache_init();
+ if (!err) {
+ err = register_filesystem(&ovl_fs_type);
+- if (!err)
+- return 0;
++ if (err)
++ goto err;
++ err = inotify_register_stackfs(&ovl_inotify);
++ if (err)
++ goto err;
++ return 0;
+- ovl_aio_request_cache_destroy();
+ }
+err:
-+ kmem_cache_destroy(ovl_inode_cachep);
+ kmem_cache_destroy(ovl_inode_cachep);
+-
+ unregister_filesystem(&ovl_fs_type);
++ ovl_aio_request_cache_destroy();
return err;
}
@@ -239,14 +250,6 @@ index d6b724beb304..380ac598f2e4 100644
unregister_filesystem(&ovl_fs_type);
/*
-@@ -1787,7 +1808,6 @@ static void __exit ovl_exit(void)
- */
- rcu_barrier();
- kmem_cache_destroy(ovl_inode_cachep);
--
- }
-
- module_init(ovl_init);
diff --git a/include/linux/inotify.h b/include/linux/inotify.h
index 6a24905f6e1e..4484f0760588 100644
--- a/include/linux/inotify.h
diff --git a/packages/linux-kernel/patches/kernel/0003-ship-perf-debian-package.patch b/packages/linux-kernel/patches/kernel/0003-ship-perf-debian-package.patch
index 9e8378bc..30219961 100644
--- a/packages/linux-kernel/patches/kernel/0003-ship-perf-debian-package.patch
+++ b/packages/linux-kernel/patches/kernel/0003-ship-perf-debian-package.patch
@@ -1,10 +1,8 @@
-From be73c78420d9a23accfa9568e451046272ceab84 Mon Sep 17 00:00:00 2001
From: Riku Voipio <riku.voipio@linaro.org>
-Date: Sat, 17 Oct 2020 10:30:37 +0000
-Subject: [PATCH] Perf is shipped in debian in linux-tools-$version package
-Extend the existing to builddeb script to build perf if BUILD_TOOLS=y is
-added the make deb-pkg line
+Perf is shipped in debian in linux-tools-$version package. Extend
+the existing to builddeb script to build perf if BUILD_TOOLS=y
+is added the make deb-pkg line
Some features of this patch I'm uncomfortable with:
@@ -28,53 +26,52 @@ Some features of this patch I'm uncomfortable with:
patch series.
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
+
---
scripts/package/builddeb | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
-index c4c580f547ef..9a4caabef7dc 100755
+index 91a502bb97e8..79987641bed5 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
-@@ -51,10 +51,12 @@ tmpdir="$objtree/debian/tmp"
- kernel_headers_dir="$objtree/debian/hdrtmp"
- libc_headers_dir="$objtree/debian/headertmp"
- dbg_dir="$objtree/debian/dbgtmp"
+@@ -109,8 +109,10 @@ deploy_libc_headers () {
+ version=$KERNELRELEASE
+ tmpdir=debian/linux-image
+ dbg_dir=debian/linux-image-dbg
+tools_dir="$objtree/debian/toolstmp"
packagename=linux-image-$version
- kernel_headers_packagename=linux-headers-$version
- libc_headers_packagename=linux-libc-dev
dbg_packagename=$packagename-dbg
+tools_packagename=linux-tools-$version
if [ "$ARCH" = "um" ] ; then
packagename=user-mode-linux-$version
-@@ -77,7 +79,7 @@ esac
+@@ -133,7 +135,7 @@ esac
BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
# Setup the directory structure
--rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
-+rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$tools_dir" $objtree/debian/files
+-rm -rf "$tmpdir" "$dbg_dir" debian/files
++rm -rf "$tmpdir" "$dbg_dir" "$tools_dir" debian/files
mkdir -m 755 -p "$tmpdir/DEBIAN"
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
- mkdir -p "$kernel_headers_dir/lib/modules/$version/"
-@@ -205,4 +207,31 @@ if [ -n "$BUILD_DEBUG" ] ; then
+
+@@ -234,4 +236,31 @@ if [ -n "$BUILD_DEBUG" ] ; then
create_package "$dbg_packagename" "$dbg_dir"
fi
+if [ -n "$BUILD_TOOLS" ]
+then
-+ # HACK - change output dir from relative to absolute
-+ mkdir -p $tools_dir
-+ tools_dest=`readlink -f $tools_dir`
-+ if [ -n "$O" ]
-+ then
-+ output=`readlink -f $objtree`
-+ mkdir -p $output/tools/perf
-+ output="O=$output/tools/perf"
-+ fi
-+ $MAKE V=1 -C $srctree/tools/perf $output LDFLAGS= srctree=$KBUILD_SRC prefix=$tools_dest/usr install
-+ cat <<EOF >> debian/control
++ # HACK - change output dir from relative to absolute
++ mkdir -p $tools_dir
++ tools_dest=`readlink -f $tools_dir`
++ if [ -n "$O" ]
++ then
++ output=`readlink -f $objtree`
++ mkdir -p $output/tools/perf
++ output="O=$output/tools/perf"
++ fi
++ $MAKE -C $srctree/tools/perf $output LDFLAGS= srctree=$KBUILD_SRC prefix=$tools_dest/usr install
++ cat <<EOF >> debian/control
+
+Package: $tools_packagename
+Architecture: any
@@ -85,8 +82,8 @@ index c4c580f547ef..9a4caabef7dc 100755
+ kernel version $version .
+EOF
+
-+ dpkg-shlibdeps $tools_dest/usr/bin/* $tools_dest/usr/lib*/traceevent/plugins/*
-+ create_package "$tools_packagename" "$tools_dir"
++ dpkg-shlibdeps $tools_dest/usr/bin/* $tools_dest/usr/lib*/traceevent/plugins/*
++ create_package "$tools_packagename" "$tools_dir"
+fi
+
exit 0
diff --git a/packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-wireguard-modules-package.patch b/packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-wireguard-modules-package.patch
deleted file mode 100644
index 4b5e3b03..00000000
--- a/packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-wireguard-modules-package.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From e5fa65c772eac4f577642038031da360f11e925c Mon Sep 17 00:00:00 2001
-From: Christian Poessinger <christian@poessinger.com>
-Date: Sun, 30 Aug 2020 09:26:59 +0200
-Subject: [PATCH] Debian: build wireguard-modules package
-
-VyOS requires a pre build binary of the WireGuard package over a DKMS build.
-Change the build rules to produce the binary over the source package for DKMS.
----
- debian/control | 10 +++-------
- debian/rules | 9 ++++-----
- 2 files changed, 7 insertions(+), 12 deletions(-)
-
-diff --git a/debian/control b/debian/control
-index d65b8b5..e7be383 100644
---- a/debian/control
-+++ b/debian/control
-@@ -5,15 +5,14 @@ Maintainer: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
- Uploaders:
- Unit 193 <unit193@debian.org>,
- Build-Depends:
-- debhelper-compat (= 13),
-- dkms,
-+ debhelper-compat (= 12)
- Standards-Version: 4.5.0
- Homepage: https://www.wireguard.com
- Vcs-Git: https://salsa.debian.org/debian/wireguard-linux-compat.git -b debian/buster-backports
- Vcs-Browser: https://salsa.debian.org/debian/wireguard-linux-compat
- Rules-Requires-Root: no
-
--Package: wireguard-dkms
-+Package: wireguard-modules
- Architecture: all
- Section: kernel
- Depends:
-@@ -22,7 +21,7 @@ Depends:
- Recommends:
- wireguard (>= 0.0.20191219),
- wireguard-tools (>= 0.0.20191219),
--Description: fast, modern, secure kernel VPN tunnel (DKMS version)
-+Description: fast, modern, secure kernel VPN tunnel (Kernel module)
- WireGuard is a novel VPN that runs inside the Linux Kernel and uses
- state-of-the-art cryptography (the "Noise" protocol). It aims to be
- faster, simpler, leaner, and more useful than IPSec, while avoiding
-@@ -30,6 +29,3 @@ Description: fast, modern, secure kernel VPN tunnel (DKMS version)
- than OpenVPN. WireGuard is designed as a general purpose VPN for
- running on embedded interfaces and super computers alike, fit for
- many different circumstances. It runs over UDP.
-- .
-- This package uses DKMS to automatically build the wireguard kernel
-- module.
-diff --git a/debian/rules b/debian/rules
-index 4fbedc6..4d93243 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -6,12 +6,11 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
- export DEB_VERSION_UPSTREAM
-
- WIREGUARD_ARGS = V=1
-+KERNEL_VERSION := $(shell cat "${KERNELDIR}"/include/config/kernel.release)
-
- %:
-- dh $@ --with dkms
-+ dh $@
-
- override_dh_auto_install-indep:
-- $(MAKE) -C src DESTDIR=../debian/wireguard-dkms DKMSDIR=/usr/src/wireguard-$(DEB_VERSION_UPSTREAM) dkms-install
--
--override_dh_dkms:
-- dh_dkms -p wireguard-dkms -- src/dkms.conf
-+ $(MAKE) -C src module
-+ echo "src/wireguard.ko /lib/modules/$(KERNEL_VERSION)/extra" > debian/wireguard-modules.install
---
-2.20.1
-