mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 18:41:37 +00:00
kernel: Fix Dockerfile.kbuild
Patches were not applied and this fixes it as well as tidying up the error handling. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
3184572403
commit
5995d9a10d
@ -13,7 +13,8 @@ ARG KERNEL_VERSIONS
|
|||||||
COPY / /
|
COPY / /
|
||||||
|
|
||||||
# Unpack kernels (download if not present)
|
# Unpack kernels (download if not present)
|
||||||
RUN set -e && for VERSION in ${KERNEL_VERSIONS}; do \
|
RUN set -e && \
|
||||||
|
for VERSION in ${KERNEL_VERSIONS}; do \
|
||||||
echo "Downloading/Unpacking $VERSION" && \
|
echo "Downloading/Unpacking $VERSION" && \
|
||||||
KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${VERSION}.tar.xz && \
|
KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${VERSION}.tar.xz && \
|
||||||
[ -f sources/linux-${VERSION}.tar.xz ] || curl -fSLo sources/linux-${VERSION}.tar.xz ${KERNEL_SOURCE} && \
|
[ -f sources/linux-${VERSION}.tar.xz ] || curl -fSLo sources/linux-${VERSION}.tar.xz ${KERNEL_SOURCE} && \
|
||||||
@ -21,12 +22,12 @@ RUN set -e && for VERSION in ${KERNEL_VERSIONS}; do \
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Apply patches to all kernels and move config files into place
|
# Apply patches to all kernels and move config files into place
|
||||||
RUN for VERSION in ${KERNEL_VERSIONS}; do \
|
RUN set -e && \
|
||||||
|
for VERSION in ${KERNEL_VERSIONS}; do \
|
||||||
SERIES=${VERSION%.*}.x && \
|
SERIES=${VERSION%.*}.x && \
|
||||||
echo "Patching $VERSION" && \
|
echo "Patching $VERSION $SERIES" && \
|
||||||
cd /linux-${VERSION} && \
|
cd /linux-${VERSION} && \
|
||||||
set -e && \
|
if [ -d /patches-${SERIES} ]; then \
|
||||||
if [ -d /patches-${KERNEL_SERIES} ]; then \
|
|
||||||
for patch in /patches-${SERIES}/*.patch; do \
|
for patch in /patches-${SERIES}/*.patch; do \
|
||||||
echo "Applying $patch" && \
|
echo "Applying $patch" && \
|
||||||
patch -p1 < "$patch"; \
|
patch -p1 < "$patch"; \
|
||||||
|
Loading…
Reference in New Issue
Block a user