Files
linuxkit/kernel/Dockerfile.kconfig
Alice Frosi db0045b0c9 Add s390 support for linuxkit kernel
Update building process to add s390 support.

The patch serial-forbid-8250-on-s390.patch has been added to disable
8250 serial for s390.

The patch is available upstream https://patchwork.kernel.org/patch/10106437/
but it is not backported.

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
2018-03-01 12:18:16 +00:00

43 lines
1.5 KiB
Docker

FROM linuxkit/alpine:8ad3a04b70f1e93e6159143e3792e379a9b0519d AS kernel-build
RUN apk add \
argp-standalone \
build-base \
curl \
diffutils \
libarchive-tools \
ncurses-dev \
patch \
xz
ARG KERNEL_VERSIONS
COPY / /
# Unpack kernels (download if not present)
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} && \
bsdtar xf sources/linux-${VERSION}.tar.xz; \
done
# Apply patches to all kernels and move config files into place
RUN set -e && \
for VERSION in ${KERNEL_VERSIONS}; do \
SERIES=${VERSION%.*}.x && \
echo "Patching $VERSION $SERIES" && \
cd /linux-${VERSION} && \
if [ -d /patches-${SERIES} ]; then \
for patch in /patches-${SERIES}/*.patch; do \
echo "Applying $patch" && \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi && \
[ ! -f /config-${SERIES}-x86_64 ] || mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \
[ ! -f /config-${SERIES}-aarch64 ] || mv /config-${SERIES}-aarch64 arch/arm64/configs/defconfig ; \
[ ! -f /config-${SERIES}-s390x ] || mv /config-${SERIES}-s390x arch/s390/defconfig; \
done
ENTRYPOINT ["/bin/sh"]