summaryrefslogtreecommitdiff
path: root/packages/linux-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux-kernel')
-rw-r--r--packages/linux-kernel/Jenkinsfile133
-rwxr-xr-xpackages/linux-kernel/build-intel-drivers.sh17
-rwxr-xr-xpackages/linux-kernel/build-intel-qat.sh96
-rwxr-xr-xpackages/linux-kernel/build-kernel.sh6
-rwxr-xr-xpackages/linux-kernel/build-wireguard-modules.sh (renamed from packages/linux-kernel/build-wireguard.sh)8
-rw-r--r--packages/linux-kernel/patches/kernel/0001-VyOS-Add-linkstate-IP-device-attribute.patch27
-rw-r--r--packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch21
-rw-r--r--packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch93
-rw-r--r--packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-WireGuard-module-package-instead-of-DKM.patch70
-rw-r--r--packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch59
10 files changed, 391 insertions, 139 deletions
diff --git a/packages/linux-kernel/Jenkinsfile b/packages/linux-kernel/Jenkinsfile
index 8c68d889..f3554054 100644
--- a/packages/linux-kernel/Jenkinsfile
+++ b/packages/linux-kernel/Jenkinsfile
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 VyOS maintainers and contributors
+// Copyright (C) 2019-2020 VyOS maintainers and contributors
//
// This program is free software; you can redistribute it and/or modify
// in order to easy exprort images built to "external" world
@@ -18,7 +18,7 @@
// Using a version specifier library, use 'current' branch. The underscore (_)
// is not a typo! You need this underscore if the line immediately after the
// @Library annotation is not an import statement!
-@Library('vyos-build@crux')_
+@Library('vyos-build@current')_
/* Only keep the most recent builds. */
def projectProperties = [
@@ -62,99 +62,172 @@ pipeline {
}
environment {
DEBIAN_ARCH = sh(returnStdout: true, script: 'dpkg --print-architecture').trim()
- BASE_DIR = 'packages/linux-kernel'
+ BASE_DIR = getJenkinsfilePath()
+ CHANGESET_DIR = getChangeSetPath()
}
stages {
stage('Fetch') {
steps {
script {
- dir('build') {
- checkout scm
- }
+ checkout scm
+ echo env.CHANGESET_DIR
}
}
}
stage('Git Clone - Components') {
parallel {
stage('Kernel') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
+ }
+ }
steps {
dir(env.BASE_DIR + '/linux') {
checkout([$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanCheckout'],
[$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true]],
- branches: [[name: 'v4.19.114' ]],
- userRemoteConfigs: [[url: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git']]])
+ branches: [[name: 'v4.19.139' ]],
+ userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git']]])
}
}
}
stage('WireGuard') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
+ }
+ }
steps {
dir(env.BASE_DIR + '/wireguard') {
checkout([$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanCheckout']],
- branches: [[name: 'debian/0.0.20191219-1' ]],
- userRemoteConfigs: [[url: 'https://salsa.debian.org/debian/wireguard']]])
+ branches: [[name: 'debian/1.0.20200319-1_bpo10+1' ]],
+ userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://salsa.debian.org/debian/wireguard.git']]])
}
- }
- }
- stage('Accel-PPP') {
- steps {
- dir(env.BASE_DIR + '/accel-ppp') {
+ dir(env.BASE_DIR + '/wireguard-linux-compat') {
checkout([$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanCheckout']],
- branches: [[name: 'ed7b28722ec85' ]],
- userRemoteConfigs: [[url: 'https://github.com/accel-ppp/accel-ppp.git']]])
+ branches: [[name: 'debian/1.0.20200429-2_bpo10+1' ]],
+ userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://salsa.debian.org/debian/wireguard-linux-compat.git']]])
}
}
}
- stage('Intel-QAT') {
+ stage('Accel-PPP') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
+ }
+ }
steps {
- dir(env.BASE_DIR + '/intel-qat') {
+ dir(env.BASE_DIR + '/accel-ppp') {
checkout([$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanCheckout']],
- branches: [[name: 'master' ]],
- userRemoteConfigs: [[url: 'https://github.com/vyos/vyos-qat']]])
+ branches: [[name: 'befc6e430add4b322e01c492e69dd4ccb2f02b9d' ]],
+ userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://github.com/accel-ppp/accel-ppp.git']]])
}
}
}
-
}
}
stage('Compile Kernel') {
- steps {
- dir(env.BASE_DIR) {
- sh "./build-kernel.sh"
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
}
}
- }
- stage('Intel Driver(s)') {
steps {
dir(env.BASE_DIR) {
- sh "./build-intel-drivers.sh"
+ sh "./build-kernel.sh"
}
}
}
+
stage('Kernel Module(s)') {
parallel {
stage('WireGuard') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
+ }
+ }
steps {
dir(env.BASE_DIR) {
- sh "./build-wireguard.sh"
+ // In Debian wireguard repo commit edb7124c866ea0e506278c311fc82dfde1f957be
+ // they decided to split source code of the kernel part and tools
+ dir('wireguard') {
+ sh "dpkg-buildpackage -b -us -uc -tc"
+ }
+ sh "./build-wireguard-modules.sh"
}
}
}
stage('Accel-PPP') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
+ }
+ }
steps {
dir(env.BASE_DIR) {
sh "./build-accel-ppp.sh"
}
}
}
- stage('Intel-QAT') {
+ stage('Intel Driver(s)') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
+ }
+ }
+ steps {
+ dir(env.BASE_DIR) {
+ sh "./build-intel-drivers.sh"
+ }
+ }
+ }
+ stage('Intel QuickAssist Technology') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: "${env.CHANGESET_DIR}"
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
+ }
+ }
steps {
dir(env.BASE_DIR) {
sh "./build-intel-qat.sh"
diff --git a/packages/linux-kernel/build-intel-drivers.sh b/packages/linux-kernel/build-intel-drivers.sh
index 8f34f8b1..e8b53a3b 100755
--- a/packages/linux-kernel/build-intel-drivers.sh
+++ b/packages/linux-kernel/build-intel-drivers.sh
@@ -10,21 +10,18 @@ fi
. ${KERNEL_VAR_FILE}
declare -a intel=(
- "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/5.6.5/ixgbe-5.6.5.tar.gz/download"
- "https://sourceforge.net/projects/e1000/files/igb%20stable/5.3.5.42/igb-5.3.5.42.tar.gz/download"
- "https://sourceforge.net/projects/e1000/files/i40e%20stable/2.11.21/i40e-2.11.21.tar.gz/download"
- "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/4.6.3/ixgbevf-4.6.3.tar.gz/download"
- "https://sourceforge.net/projects/e1000/files/i40evf%20stable/3.6.15/i40evf-3.6.15.tar.gz/download"
- "https://sourceforge.net/projects/e1000/files/iavf%20stable/3.9.3/iavf-3.9.3.tar.gz/download"
+ "http://dev.packages.vyos.net/source-mirror/ixgbe-5.8.1.tar.gz"
+ "http://dev.packages.vyos.net/source-mirror/ixgbevf-4.8.1.tar.gz"
+ "http://dev.packages.vyos.net/source-mirror/igb-5.3.6.tar.gz"
+ "http://dev.packages.vyos.net/source-mirror/i40e-2.12.6.tar.gz"
+ "http://dev.packages.vyos.net/source-mirror/iavf-4.0.1.tar.gz"
)
for url in "${intel[@]}"
do
cd ${CWD}
- # URL_SIMPLE does not contain the /download path
- URL_SIMPLE="${url%/*}"
- DRIVER_FILE="${URL_SIMPLE##*/}"
+ DRIVER_FILE="$(basename ${url})"
DRIVER_DIR="${DRIVER_FILE%.tar.gz}"
DRIVER_NAME="${DRIVER_DIR%-*}"
DRIVER_VERSION="${DRIVER_DIR##*-}"
@@ -79,7 +76,7 @@ EOF
# build Debian package
echo "I: Building Debian package vyos-intel-${DRIVER_NAME}"
- dpkg-deb --build ${DEBIAN_DIR}
+ fakeroot dpkg-deb --build ${DEBIAN_DIR}
echo "I: Cleanup ${DRIVER_NAME} source"
diff --git a/packages/linux-kernel/build-intel-qat.sh b/packages/linux-kernel/build-intel-qat.sh
index e5738db7..d4da3a4e 100755
--- a/packages/linux-kernel/build-intel-qat.sh
+++ b/packages/linux-kernel/build-intel-qat.sh
@@ -2,12 +2,6 @@
CWD=$(pwd)
KERNEL_VAR_FILE=${CWD}/kernel-vars
-QAT_SRC=${CWD}/intel-qat
-if [ ! -d ${QAT_SRC} ]; then
- echo "Intel QAT source not found"
- exit 1
-fi
-
if [ ! -f ${KERNEL_VAR_FILE} ]; then
echo "Kernel variable file '${KERNEL_VAR_FILE}' does not exist, run ./build_kernel.sh first"
exit 1
@@ -15,7 +9,91 @@ fi
. ${KERNEL_VAR_FILE}
-cd ${QAT_SRC}
+declare -a intel=(
+ "https://01.org/sites/default/files/downloads/qat1.7.l.4.9.0-00008.tar_0.gz"
+)
+
+for url in "${intel[@]}"
+do
+ cd ${CWD}
+
+ DRIVER_FILE=$(basename ${url} | sed -e s/tar_0/tar/)
+ DRIVER_DIR="${DRIVER_FILE%.tar.gz}"
+ DRIVER_NAME="qat"
+ DRIVER_VERSION=$(echo ${DRIVER_DIR} | awk -F${DRIVER_NAME} '{print $2}')
+ DRIVER_VERSION_EXTRA="-0"
+
+ # Build up Debian related variables required for packaging
+ DEBIAN_ARCH=$(dpkg --print-architecture)
+ DEBIAN_DIR="${CWD}/vyos-intel-${DRIVER_NAME}_${DRIVER_VERSION}${DRIVER_VERSION_EXTRA}_${DEBIAN_ARCH}"
+ DEBIAN_CONTROL="${DEBIAN_DIR}/DEBIAN/control"
+
+ # Fetch Intel driver source from SourceForge
+ if [ -e ${DRIVER_FILE} ]; then
+ rm -f ${DRIVER_FILE}
+ fi
+ curl -L -o ${DRIVER_FILE} ${url}
+ if [ "$?" -ne "0" ]; then
+ exit 1
+ fi
+
+ # Unpack archive
+ if [ -d ${DRIVER_DIR} ]; then
+ rm -rf ${DRIVER_DIR}
+ fi
+ mkdir -p ${DRIVER_DIR}
+ tar -C ${DRIVER_DIR} -xf ${DRIVER_FILE}
+
+ cd ${DRIVER_DIR}
+ if [ -z $KERNEL_DIR ]; then
+ echo "KERNEL_DIR not defined"
+ exit 1
+ fi
+
+ echo "I: Compile Kernel module for Intel ${DRIVER_NAME} driver"
+ mkdir -p ${DEBIAN_DIR}/lib/firmware ${DEBIAN_DIR}/usr/local/bin ${DEBIAN_DIR}/usr/lib/x86_64-linux-gnu ${DEBIAN_DIR}/etc/init.d
+ KERNEL_SOURCE_ROOT=${KERNEL_DIR} ./configure --enable-kapi
+ make -j $(getconf _NPROCESSORS_ONLN) all
+ make INSTALL_MOD_PATH=${DEBIAN_DIR} INSTALL_FW_PATH=${DEBIAN_DIR} \
+ qat-driver-install
+
+ cp build/*.bin ${DEBIAN_DIR}/lib/firmware
+ cp build/*.so ${DEBIAN_DIR}/usr/lib/x86_64-linux-gnu
+ cp build/qat_service ${DEBIAN_DIR}/etc/init.d
+ cp build/adf_ctl ${DEBIAN_DIR}/usr/local/bin
+ cp build/usdm_drv.ko ${DEBIAN_DIR}/lib/modules/${KERNEL_VERSION}${KERNEL_SUFFIX}/updates/drivers
+ chmod 644 ${DEBIAN_DIR}/lib/firmware/*
+ chmod 755 ${DEBIAN_DIR}/etc/init.d/* ${DEBIAN_DIR}/usr/local/bin/*
+
+ mkdir -p $(dirname "${DEBIAN_CONTROL}")
+ cat << EOF >${DEBIAN_CONTROL}
+Package: vyos-intel-${DRIVER_NAME}
+Version: ${DRIVER_VERSION}${DRIVER_VERSION_EXTRA}
+Section: kernel
+Priority: extra
+Architecture: ${DEBIAN_ARCH}
+Maintainer: VyOS Package Maintainers <maintainers@vyos.net>
+Description: Vendor based driver for Intel ${DRIVER_NAME}
+Depends: linux-image-${KERNEL_VERSION}${KERNEL_SUFFIX}
+EOF
+
+ # delete non required files which are also present in the kernel package
+ # und thus lead to duplicated files
+ find ${DEBIAN_DIR} -name "modules.*" | xargs rm -f
+
+ # build Debian package
+ echo "I: Building Debian package vyos-intel-${DRIVER_NAME}"
+ fakeroot dpkg-deb --build ${DEBIAN_DIR}
-echo "I: Build Intel QAT Debian package"
-KERNELDIR=${KERNEL_DIR} dpkg-buildpackage -b -us -uc -tc -j$(getconf _NPROCESSORS_ONLN)
+ echo "I: Cleanup ${DRIVER_NAME} source"
+ cd ${CWD}
+ if [ -e ${DRIVER_FILE} ]; then
+ rm -f ${DRIVER_FILE}
+ fi
+ if [ -d ${DRIVER_DIR} ]; then
+ rm -rf ${DRIVER_DIR}
+ fi
+ if [ -d ${DEBIAN_DIR} ]; then
+ rm -rf ${DEBIAN_DIR}
+ fi
+done
diff --git a/packages/linux-kernel/build-kernel.sh b/packages/linux-kernel/build-kernel.sh
index 5e9dd88e..c1fec72a 100755
--- a/packages/linux-kernel/build-kernel.sh
+++ b/packages/linux-kernel/build-kernel.sh
@@ -30,9 +30,6 @@ echo "I: make x86_64_vyos_defconfig"
# Select Kernel configuration - currently there is only one
make x86_64_vyos_defconfig
-echo "I: Build Debian Kernel package"
-make bindeb-pkg LOCALVERSION=${KERNEL_SUFFIX} KDEB_PKGVERSION=${KERNEL_VERSION}-1 -j $(getconf _NPROCESSORS_ONLN)
-
echo "I: Generate environment file containing Kernel variable"
cat << EOF >${CWD}/kernel-vars
#!/bin/sh
@@ -40,3 +37,6 @@ export KERNEL_VERSION=${KERNEL_VERSION}
export KERNEL_SUFFIX=${KERNEL_SUFFIX}
export KERNEL_DIR=${CWD}/${KERNEL_SRC}
EOF
+
+echo "I: Build Debian Kernel package"
+make bindeb-pkg BUILD_TOOLS=1 LOCALVERSION=${KERNEL_SUFFIX} KDEB_PKGVERSION=${KERNEL_VERSION}-1 -j $(getconf _NPROCESSORS_ONLN)
diff --git a/packages/linux-kernel/build-wireguard.sh b/packages/linux-kernel/build-wireguard-modules.sh
index e234933a..740af8b2 100755
--- a/packages/linux-kernel/build-wireguard.sh
+++ b/packages/linux-kernel/build-wireguard-modules.sh
@@ -1,8 +1,8 @@
#!/bin/sh
CWD=$(pwd)
KERNEL_VAR_FILE=${CWD}/kernel-vars
+WIREGUARD_SRC=${CWD}/wireguard-linux-compat
-WIREGUARD_SRC=${CWD}/wireguard
if [ ! -d ${WIREGUARD_SRC} ]; then
echo "WireGuard source not found"
exit 1
@@ -19,15 +19,13 @@ cd ${WIREGUARD_SRC}
# We need some WireGuard patches for building, it's easier to have them here
# and make use of the upstream repository instead of maintaining a full fork,
# saving time/resources is essential :-)
-PATCH_DIR=${CWD}/patches/wireguard
+PATCH_DIR=${CWD}/patches/wireguard-linux-compat
for patch in $(ls ${PATCH_DIR})
do
echo "I: Apply WireGuard patch: ${PATCH_DIR}/${patch}"
patch -p1 < ${PATCH_DIR}/${patch}
done
-# set compatibility level to 9
-echo 9 > debian/compat
-
echo "I: Build Debian WireGuard package"
+echo 9 > debian/compat
KERNELDIR=$KERNEL_DIR dpkg-buildpackage -b -us -uc -tc -d
diff --git a/packages/linux-kernel/patches/kernel/0001-VyOS-Add-linkstate-IP-device-attribute.patch b/packages/linux-kernel/patches/kernel/0001-VyOS-Add-linkstate-IP-device-attribute.patch
index f23c41a5..c70a9f13 100644
--- a/packages/linux-kernel/patches/kernel/0001-VyOS-Add-linkstate-IP-device-attribute.patch
+++ b/packages/linux-kernel/patches/kernel/0001-VyOS-Add-linkstate-IP-device-attribute.patch
@@ -6,6 +6,7 @@ Subject: [PATCH] VyOS: Add linkstate IP device attribute
Backport of earlier Vyatta patch.
(cherry picked from commit 7c5a851086686be14ae937c80d6cee34814dbefc)
+
---
Documentation/networking/ip-sysctl.txt | 13 +++++++++++++
include/linux/inetdevice.h | 1 +
@@ -18,10 +19,10 @@ Backport of earlier Vyatta patch.
8 files changed, 40 insertions(+)
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
-index 960de8fe3f40..8e737f77f4e6 100644
+index 7eb9366422f5..b99d54a313a0 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
-@@ -1168,6 +1168,19 @@ rp_filter - INTEGER
+@@ -1177,6 +1177,19 @@ rp_filter - INTEGER
Default value is 0. Note that some distributions enable it
in startup scripts.
@@ -42,10 +43,10 @@ index 960de8fe3f40..8e737f77f4e6 100644
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 c759d1cbcedd..d3e88498910b 100644
+index a64f21a97369..4014dd852bae 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
-@@ -131,6 +131,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
+@@ -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)
@@ -90,10 +91,10 @@ index 9c0f4a92bcff..619edd130cfd 100644
};
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
-index ea4bd8a52422..6c6aad3c302f 100644
+index a08d682ba676..17949eb57a5b 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
-@@ -2310,6 +2310,8 @@ static struct devinet_sysctl_table {
+@@ -2318,6 +2318,8 @@ static struct devinet_sysctl_table {
"route_localnet"),
DEVINET_SYSCTL_FLUSHING_ENTRY(DROP_UNICAST_IN_L2_MULTICAST,
"drop_unicast_in_l2_multicast"),
@@ -103,10 +104,10 @@ index ea4bd8a52422..6c6aad3c302f 100644
};
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
-index 4e81ff2f4588..5ae30cf09028 100644
+index 627cd24b7c0d..8c49eac27fd0 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
-@@ -5200,6 +5200,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
+@@ -5240,6 +5240,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
array[DEVCONF_ADDR_GEN_MODE] = cnf->addr_gen_mode;
array[DEVCONF_DISABLE_POLICY] = cnf->disable_policy;
array[DEVCONF_NDISC_TCLASS] = cnf->ndisc_tclass;
@@ -114,7 +115,7 @@ index 4e81ff2f4588..5ae30cf09028 100644
}
static inline size_t inet6_ifla6_size(void)
-@@ -6514,6 +6515,14 @@ static const struct ctl_table addrconf_sysctl[] = {
+@@ -6561,6 +6562,14 @@ static const struct ctl_table addrconf_sysctl[] = {
.mode = 0644,
.proc_handler = addrconf_sysctl_disable_policy,
},
@@ -130,10 +131,10 @@ index 4e81ff2f4588..5ae30cf09028 100644
.procname = "ndisc_tclass",
.data = &ipv6_devconf.ndisc_tclass,
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
-index abcb5ae77319..90296536873f 100644
+index dad35cd48807..1a2439c6a257 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
-@@ -590,6 +590,15 @@ static inline int rt6_check_dev(struct fib6_info *rt, int oif)
+@@ -595,6 +595,15 @@ static inline int rt6_check_dev(struct fib6_info *rt, int oif)
return 0;
}
@@ -149,7 +150,7 @@ index abcb5ae77319..90296536873f 100644
static inline enum rt6_nud_state rt6_check_neigh(struct fib6_info *rt)
{
enum rt6_nud_state ret = RT6_NUD_FAIL_HARD;
-@@ -629,6 +638,9 @@ static int rt6_score_route(struct fib6_info *rt, int oif, int strict)
+@@ -634,6 +643,9 @@ static int rt6_score_route(struct fib6_info *rt, int oif, int strict)
m = rt6_check_dev(rt, oif);
if (!m && (strict & RT6_LOOKUP_F_IFACE))
return RT6_NUD_FAIL_HARD;
@@ -160,5 +161,5 @@ index abcb5ae77319..90296536873f 100644
m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->fib6_flags)) << 2;
#endif
--
-2.11.0
+2.20.1
diff --git a/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch b/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch
index 1555a3d7..bf28f313 100644
--- a/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch
+++ b/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch
@@ -19,11 +19,12 @@ 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 | 112 ++++++++++++++++++++++++++++++++++++++-
- fs/overlayfs/super.c | 24 ++++++++-
- include/linux/inotify.h | 28 ++++++++++
+ fs/notify/inotify/Kconfig | 9 +++
+ fs/notify/inotify/inotify_user.c | 112 ++++++++++++++++++++++++++++++-
+ fs/overlayfs/super.c | 24 ++++++-
+ include/linux/inotify.h | 28 ++++++++
4 files changed, 170 insertions(+), 3 deletions(-)
diff --git a/fs/notify/inotify/Kconfig b/fs/notify/inotify/Kconfig
@@ -44,7 +45,7 @@ index b981fc0c8379..b0b208bd584b 100644
+
+ If unsure, say N.
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
-index ac6978d3208c..6780209a34f7 100644
+index 97a51690338e..0595de27e1b5 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -24,6 +24,7 @@
@@ -188,7 +189,7 @@ index ac6978d3208c..6780209a34f7 100644
struct inotify_inode_mark *i_mark)
{
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
-index 30adc9d408a0..722a7fdf9540 100644
+index 127df4a85c8a..d6d41a328f9d 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -18,6 +18,7 @@
@@ -199,7 +200,7 @@ index 30adc9d408a0..722a7fdf9540 100644
#include "overlayfs.h"
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
-@@ -1533,6 +1534,18 @@ static void ovl_inode_init_once(void *foo)
+@@ -1703,6 +1704,18 @@ static void ovl_inode_init_once(void *foo)
inode_init_once(&oi->vfs_inode);
}
@@ -218,7 +219,7 @@ index 30adc9d408a0..722a7fdf9540 100644
static int __init ovl_init(void)
{
int err;
-@@ -1547,13 +1560,21 @@ static int __init ovl_init(void)
+@@ -1717,13 +1730,21 @@ static int __init ovl_init(void)
err = register_filesystem(&ovl_fs_type);
if (err)
@@ -241,7 +242,7 @@ index 30adc9d408a0..722a7fdf9540 100644
unregister_filesystem(&ovl_fs_type);
/*
-@@ -1562,7 +1583,6 @@ static void __exit ovl_exit(void)
+@@ -1732,7 +1753,6 @@ static void __exit ovl_exit(void)
*/
rcu_barrier();
kmem_cache_destroy(ovl_inode_cachep);
@@ -294,5 +295,5 @@ index 6a24905f6e1e..248b1441ba83 100644
+
#endif /* _LINUX_INOTIFY_H */
--
-2.11.0
+2.20.1
diff --git a/packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch b/packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch
new file mode 100644
index 00000000..38d5b980
--- /dev/null
+++ b/packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch
@@ -0,0 +1,93 @@
+From: Riku Voipio <riku.voipio@linaro.org>
+
+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:
+
+1. Relative paths are resoved to absolute ones
+ Especially with separate O= buildd, perf build from tools/perf dir
+ fail.
+
+2. Unsetting LDFLAGS
+ make -> shell (builddeb) -> make expands variables. The LDFLAGS as
+ set by toplevel makefile are for kernel, so we just unset the flag
+ here.
+
+3. Replaces ubuntu/debian packages instead attempting to fit to
+ the linux-base/linux-tools-common frameworks. I think people who
+ want to run "make deb-pkg" for their kernels would rather keep this
+ simple.
+
+4. More tools than just perf could be built - unfortunately most
+ tools fail to have a working "install" target and/or else have
+ build process inconsistent with other tools. A topic for another
+ 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 0b31f4f1f92c..629144b4226b 100755
+--- a/scripts/package/builddeb
++++ b/scripts/package/builddeb
+@@ -39,10 +39,12 @@ tmpdir="$objtree/debian/tmp"
+ kernel_headers_dir="$objtree/debian/hdrtmp"
+ libc_headers_dir="$objtree/debian/headertmp"
+ dbg_dir="$objtree/debian/dbgtmp"
++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
+@@ -65,7 +67,7 @@ esac
+ BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
+
+ # 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
+ mkdir -m 755 -p "$tmpdir/DEBIAN"
+ mkdir -p "$tmpdir/lib" "$tmpdir/boot"
+ mkdir -p "$kernel_headers_dir/lib/modules/$version/"
+@@ -194,4 +196,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 -C $srctree/tools/perf $output LDFLAGS= srctree=$KBUILD_SRC prefix=$tools_dest/usr install
++ cat <<EOF >> debian/control
++
++Package: $tools_packagename
++Architecture: any
++Replaces: linux-base, linux-tools-common
++Depends: \${shlibs:Depends}
++Description: Performance analysis tools for Linux $version
++ This package contains the 'perf' performance analysis tools for Linux
++ kernel version $version .
++EOF
++
++ dpkg-shlibdeps $tools_dest/usr/bin/* $tools_dest/usr/lib*/traceevent/plugins/*
++ create_package "$tools_packagename" "$tools_dir"
++fi
++
+ exit 0
+--
+2.20.1
+
diff --git a/packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-WireGuard-module-package-instead-of-DKM.patch b/packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-WireGuard-module-package-instead-of-DKM.patch
new file mode 100644
index 00000000..061d96c0
--- /dev/null
+++ b/packages/linux-kernel/patches/wireguard-linux-compat/0001-Debian-build-WireGuard-module-package-instead-of-DKM.patch
@@ -0,0 +1,70 @@
+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 | 8 ++------
+ debian/rules | 9 ++++-----
+ 2 files changed, 6 insertions(+), 11 deletions(-)
+
+diff --git a/debian/control b/debian/control
+index 7b2af41..ae02be3 100644
+--- a/debian/control
++++ b/debian/control
+@@ -6,14 +6,13 @@ Uploaders:
+ Unit 193 <unit193@debian.org>,
+ Build-Depends:
+ debhelper-compat (= 12),
+- dkms,
+ 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:
+@@ -23,7 +22,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
+@@ -31,6 +30,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..15ede39 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
+\ No newline at end of file
+--
+2.20.1
+
diff --git a/packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch b/packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch
deleted file mode 100644
index 9da36b80..00000000
--- a/packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From a0ec7855f632d6ea7d4134628fa53760ff73aada Mon Sep 17 00:00:00 2001
-From: Christian Poessinger <christian@poessinger.com>
-Date: Wed Sep 25 07:50:39 2019 +0200
-Subject: [PATCH] Debian: compile in VyOS environment
-
-----
-
-diff --git i/debian/control w/debian/control
-index dc1fd11..b7e5b51 100644
---- i/debian/control
-+++ w/debian/control
-@@ -17,7 +17,7 @@ Rules-Requires-Root: no
- Package: wireguard
- Architecture: all
- Depends:
-- wireguard-dkms (= ${source:Version}) | wireguard-modules (= ${source:Upstream-Version}),
-+ wireguard-modules (= ${source:Version}),
- wireguard-tools (>= ${source:Version}),
- ${misc:Depends},
- Description: fast, modern, secure kernel VPN tunnel (metapackage)
-@@ -33,7 +33,7 @@ Description: fast, modern, secure kernel VPN tunnel (metapackage)
- userspace tooling, and tries to load the new kernel module upon
- installation, if wireguard is already in use on the system.
-
--Package: wireguard-dkms
-+Package: wireguard-modules
- Architecture: all
- Section: kernel
- Depends:
-diff --git i/debian/rules w/debian/rules
-index af06b98..97df06a 100755
---- i/debian/rules
-+++ w/debian/rules
-@@ -6,21 +6,17 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
- export DEB_VERSION_UPSTREAM
-
- WIREGUARD_ARGS = WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes WITH_SYSTEMDUNITS=yes V=1
-+KERNEL_VERSION := $(shell cat "${KERNELDIR}"/include/config/kernel.release)
-
- %:
-- dh $@ --with dkms
--
--override_dh_auto_install-indep:
-- $(MAKE) -C src DESTDIR=../debian/wireguard-dkms DKMSDIR=/usr/src/wireguard-$(DEB_VERSION_UPSTREAM) dkms-install
-+ dh $@
-
- override_dh_auto_build-arch:
-- dh_auto_build --sourcedirectory=src/tools -- $(WIREGUARD_ARGS)
-+ dh_auto_build --sourcedirectory=src -- $(WIREGUARD_ARGS)
-
- override_dh_auto_install-arch:
- $(MAKE) -C src/tools DESTDIR=../../debian/wireguard-tools $(WIREGUARD_ARGS) install
--
--override_dh_dkms:
-- dh_dkms -p wireguard-dkms -- src/dkms.conf
-+ echo "src/wireguard.ko /lib/modules/$(KERNEL_VERSION)/extra" > debian/wireguard-modules.install
-
- override_dh_installchangelogs:
- dh_installchangelogs debian/upstream.changelog