mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 02:51:55 +00:00
kernel: Use in kernel WireGuard if present
5.6.x has WireGuard upstream. Skip pulling it for kernel where WireGuard is present. Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
This commit is contained in:
parent
e208e3050c
commit
42c51fab2b
@ -163,12 +163,14 @@ RUN case $(uname -m) in \
|
|||||||
cp System.map /out && \
|
cp System.map /out && \
|
||||||
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
|
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
|
||||||
|
|
||||||
# WireGuard
|
# WireGuard (skip kernels which have it in tree)
|
||||||
RUN curl -fsSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \
|
RUN if [ ! -d /linux/drivers/net/wireguard ]; then \
|
||||||
echo "${WIREGUARD_SHA256} /wireguard.tar.xz" | sha256sum -c - && \
|
curl -fsSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \
|
||||||
cp /wireguard.tar.xz /out/src/ && \
|
echo "${WIREGUARD_SHA256} /wireguard.tar.xz" | sha256sum -c - && \
|
||||||
tar -C / --one-top-level=wireguard --strip-components=2 -xJf /wireguard.tar.xz "wireguard-linux-compat-${WIREGUARD_VERSION}/src" && \
|
cp /wireguard.tar.xz /out/src/ && \
|
||||||
make -j "$(getconf _NPROCESSORS_ONLN)" M="/wireguard" modules
|
tar -C / --one-top-level=wireguard --strip-components=2 -xJf /wireguard.tar.xz "wireguard-linux-compat-${WIREGUARD_VERSION}/src" && \
|
||||||
|
make -j "$(getconf _NPROCESSORS_ONLN)" M="/wireguard" modules; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Modules and Device Tree binaries
|
# Modules and Device Tree binaries
|
||||||
RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
||||||
|
Loading…
Reference in New Issue
Block a user