mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +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 / /
|
||||
|
||||
# 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" && \
|
||||
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} && \
|
||||
@ -21,12 +22,12 @@ RUN set -e && for VERSION in ${KERNEL_VERSIONS}; do \
|
||||
done
|
||||
|
||||
# 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 && \
|
||||
echo "Patching $VERSION" && \
|
||||
echo "Patching $VERSION $SERIES" && \
|
||||
cd /linux-${VERSION} && \
|
||||
set -e && \
|
||||
if [ -d /patches-${KERNEL_SERIES} ]; then \
|
||||
if [ -d /patches-${SERIES} ]; then \
|
||||
for patch in /patches-${SERIES}/*.patch; do \
|
||||
echo "Applying $patch" && \
|
||||
patch -p1 < "$patch"; \
|
||||
|
Loading…
Reference in New Issue
Block a user