mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
* add riscv64 kernels to kernel/Makefile and kernel/Dockerfile.*, riscv64 kernel config, bump alpine version for kernel builds Signed-off-by: Avi Deitcher <avi@deitcher.net> * update bcc to v0.32.0 to include needed fixes Signed-off-by: Avi Deitcher <avi@deitcher.net> * bump kernel builder alpine base to version including llvm19 Signed-off-by: Avi Deitcher <avi@deitcher.net> * in kernel-bcc, automatically determine python path Signed-off-by: Avi Deitcher <avi@deitcher.net> * in kernel-perf, suppress newer gcc errors Signed-off-by: Avi Deitcher <avi@deitcher.net> * riscv path in kernel build was incorrect Signed-off-by: Avi Deitcher <avi@deitcher.net> * remove bcc compilation from kernel Signed-off-by: Avi Deitcher <avi@deitcher.net> * update usages of kernel/6.6.13 to kernel/6.6.71 Signed-off-by: Avi Deitcher <avi@deitcher.net> * next run of updating kernel config Signed-off-by: Avi Deitcher <avi@deitcher.net> * update test dependencies on kernel hash version Signed-off-by: Avi Deitcher <avi@deitcher.net> --------- Signed-off-by: Avi Deitcher <avi@deitcher.net>
52 lines
1.6 KiB
Docker
52 lines
1.6 KiB
Docker
ARG BUILD_IMAGE
|
|
FROM ${BUILD_IMAGE} AS kernel-build
|
|
|
|
ARG KERNEL_VERSIONS
|
|
|
|
RUN apk add \
|
|
argp-standalone \
|
|
bison \
|
|
build-base \
|
|
curl \
|
|
diffutils \
|
|
flex \
|
|
gmp-dev \
|
|
libarchive-tools \
|
|
mpc1-dev \
|
|
mpfr-dev \
|
|
ncurses-dev \
|
|
patch \
|
|
xz
|
|
|
|
COPY / /
|
|
|
|
# Unpack kernels (download if not present)
|
|
RUN set -e && \
|
|
for VERSION in ${KERNEL_VERSIONS}; do \
|
|
MAJOR=$(echo ${VERSION} | cut -d . -f 1) && \
|
|
MAJOR=v${MAJOR}.x && \
|
|
echo "Downloading/Unpacking $VERSION" && \
|
|
KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/${MAJOR}/linux-${VERSION}.tar.xz && \
|
|
[ -f sources/linux-${VERSION}.tar.xz ] || curl -fSLo sources/linux-${VERSION}.tar.xz --create-dirs ${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}-riscv64 ] || mv /config-${SERIES}-riscv64 arch/riscv64/configs/riscv64_defconfig ; \
|
|
done
|
|
|
|
ENTRYPOINT ["/bin/sh"]
|