Files
linuxkit/kernel/Dockerfile.kconfig
Rolf Neugebauer 4005564228 kernel: Drop 'kernel_' prefix from kernel config files
It's kinda obvious that these are kernel configuration files
and, looking at various other distros it seems more common
to call the files 'config-<foo>'.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-22 19:49:14 +01:00

40 lines
1.3 KiB
Docker

FROM linuxkit/alpine:ad35b6ddbc70faa07e59a9d7dee7707c08122e8d AS kernel-build
RUN apk add \
argp-standalone \
build-base \
curl \
diffutils \
ncurses-dev \
tar \
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} && \
tar xf sources/linux-${VERSION}.tar.xz; \
done
# 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} && \
set -e && \
if [ -d /patches-${KERNEL_SERIES} ]; then \
for patch in /patches-${SERIES}/*.patch; do \
echo "Applying $patch" && \
patch -p1 < "$patch"; \
done; \
fi && \
mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \
mv /config-${SERIES}-aarch64 arch/arm64/configs/defconfig; \
done
ENTRYPOINT ["/bin/sh"]