mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
Merge pull request #3060 from rn/kern-src
Stash kernel source and WireGuard source in the package
This commit is contained in:
commit
6ad3055401
@ -84,6 +84,11 @@ RUN set -e && \
|
|||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
RUN mkdir -p /out/src
|
||||||
|
|
||||||
|
# Save kernel source
|
||||||
|
RUN tar cJf /out/src/linux.tar.xz /linux
|
||||||
|
|
||||||
# Kernel config
|
# Kernel config
|
||||||
RUN case $(uname -m) in \
|
RUN case $(uname -m) in \
|
||||||
x86_64) \
|
x86_64) \
|
||||||
@ -109,7 +114,6 @@ RUN case $(uname -m) in \
|
|||||||
make oldconfig && \
|
make oldconfig && \
|
||||||
if [ -z "${EXTRA}" ] && [ -z "${DEBUG}" ]; then diff .config ${KERNEL_DEF_CONF}; fi
|
if [ -z "${EXTRA}" ] && [ -z "${DEBUG}" ]; then diff .config ${KERNEL_DEF_CONF}; fi
|
||||||
|
|
||||||
RUN mkdir /out
|
|
||||||
|
|
||||||
# Kernel
|
# Kernel
|
||||||
RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
|
RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
|
||||||
@ -128,8 +132,9 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
|
|||||||
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
|
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
|
||||||
|
|
||||||
# WireGuard
|
# WireGuard
|
||||||
RUN curl -sSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \
|
RUN curl -fsSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \
|
||||||
echo "${WIREGUARD_SHA256} /wireguard.tar.xz" | sha256sum -c - && \
|
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" && \
|
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
|
make -j "$(getconf _NPROCESSORS_ONLN)" M="/wireguard" modules
|
||||||
|
|
||||||
@ -184,7 +189,7 @@ ENV UCODE_URL=https://downloadmirror.intel.com/27776/eng/microcode-20180425.tgz
|
|||||||
RUN set -e && \
|
RUN set -e && \
|
||||||
if [ $(uname -m) == x86_64 ]; then \
|
if [ $(uname -m) == x86_64 ]; then \
|
||||||
cd /ucode && \
|
cd /ucode && \
|
||||||
curl -sSL -o microcode.tar.gz ${UCODE_URL} && \
|
curl -fsSL -o microcode.tar.gz ${UCODE_URL} && \
|
||||||
md5sum -c intel-ucode-md5sums && \
|
md5sum -c intel-ucode-md5sums && \
|
||||||
tar xf microcode.tar.gz && \
|
tar xf microcode.tar.gz && \
|
||||||
rm -f intel-ucode/list && \
|
rm -f intel-ucode/list && \
|
||||||
|
Loading…
Reference in New Issue
Block a user