From 0a46f29a050064ca081387c8ed5e959754a37644 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Sun, 12 May 2019 17:29:24 +0100 Subject: [PATCH] kernel: Disable WireGuard for 5.1.x kernels Getting compile errors: AS [M] /wireguard/crypto/zinc/chacha20/chacha20-x86_64.o In file included from : /wireguard/compat/compat.h:795:10: fatal error: net/netfilter/nf_nat_core.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rolf Neugebauer --- kernel/Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/kernel/Dockerfile b/kernel/Dockerfile index 510e82ceb..83d8cd2f4 100644 --- a/kernel/Dockerfile +++ b/kernel/Dockerfile @@ -131,11 +131,14 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \ ([ -n "${DEBUG}" ] && cp vmlinux /out || true) # WireGuard -RUN curl -fsSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \ - echo "${WIREGUARD_SHA256} /wireguard.tar.xz" | sha256sum -c - && \ - cp /wireguard.tar.xz /out/src/ && \ - tar -C / --one-top-level=wireguard --strip-components=2 -xJf /wireguard.tar.xz "WireGuard-${WIREGUARD_VERSION}/src" && \ - make -j "$(getconf _NPROCESSORS_ONLN)" M="/wireguard" modules +RUN set -e && \ + if [ "$KERNEL_SERIES" != "5.1.x" ]; then \ + curl -fsSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \ + echo "${WIREGUARD_SHA256} /wireguard.tar.xz" | sha256sum -c - && \ + cp /wireguard.tar.xz /out/src/ && \ + tar -C / --one-top-level=wireguard --strip-components=2 -xJf /wireguard.tar.xz "WireGuard-${WIREGUARD_VERSION}/src" && \ + make -j "$(getconf _NPROCESSORS_ONLN)" M="/wireguard" modules; \ + fi # Modules and Device Tree binaries RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \