kernel: Improve kconfig Docker file
Be a bit more verbose and error on error.
@@ -15,7 +15,8 @@ ARG KERNEL_VERSIONS
COPY / /
# Unpack kernels (download if not present)
-RUN 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} && \
tar xf sources/linux-${VERSION}.tar.xz; \
@@ -24,8 +25,9 @@ RUN for VERSION in ${KERNEL_VERSIONS}; do \
# Apply patches to all kernels and move config files into place
RUN for VERSION in ${KERNEL_VERSIONS}; do \
SERIES=${VERSION%.*}.x && \
+ echo "Patching $VERSION" && \
cd /linux-${VERSION} && \
- for patch in /patches-${SERIES}/*.patch; do \
+ set -e && for patch in /patches-${SERIES}/*.patch; do \
echo "Applying $patch" && \
patch -p1 < "$patch"; \
done && \
