mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
kernel: Verify kernel config
Since we supply a full .config file we can check that after make defconfig/oldconfig it hasn't changed. This should catch cases where a config option has changed between releases. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
72ed2b3a06
commit
9362de0adb
@ -57,7 +57,15 @@ RUN curl -fsSLO ${KERNEL_SHA256_SUMS} && \
|
|||||||
gpg2 --verify linux-${KERNEL_VERSION}.tar.sign linux-${KERNEL_VERSION}.tar && \
|
gpg2 --verify linux-${KERNEL_VERSION}.tar.sign linux-${KERNEL_VERSION}.tar && \
|
||||||
cat linux-${KERNEL_VERSION}.tar | tar --absolute-names -x && mv /linux-${KERNEL_VERSION} /linux
|
cat linux-${KERNEL_VERSION}.tar | tar --absolute-names -x && mv /linux-${KERNEL_VERSION} /linux
|
||||||
|
|
||||||
# When using COPY with more than one source file, the destination must be a directory and end with a /
|
# Apply local patches
|
||||||
|
COPY patches-${KERNEL_SERIES} /patches
|
||||||
|
WORKDIR /linux
|
||||||
|
RUN set -e && for patch in /patches/*.patch; do \
|
||||||
|
echo "Applying $patch"; \
|
||||||
|
patch -p1 < "$patch"; \
|
||||||
|
done
|
||||||
|
|
||||||
|
# Kernel config
|
||||||
COPY kernel_config-${KERNEL_SERIES}* /linux/
|
COPY kernel_config-${KERNEL_SERIES}* /linux/
|
||||||
COPY kernel_config.debug /linux/debug_config
|
COPY kernel_config.debug /linux/debug_config
|
||||||
|
|
||||||
@ -74,22 +82,15 @@ RUN case $(uname -m) in \
|
|||||||
sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
|
sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
|
||||||
cat /linux/debug_config >> ${KERNEL_DEF_CONF}; \
|
cat /linux/debug_config >> ${KERNEL_DEF_CONF}; \
|
||||||
fi && \
|
fi && \
|
||||||
rm /linux/kernel_config-${KERNEL_SERIES}*
|
rm /linux/kernel_config-${KERNEL_SERIES}* && \
|
||||||
|
make defconfig && \
|
||||||
# Apply local patches
|
make oldconfig && \
|
||||||
COPY patches-${KERNEL_SERIES} /patches
|
diff .config ${KERNEL_DEF_CONF}
|
||||||
WORKDIR /linux
|
|
||||||
RUN set -e && for patch in /patches/*.patch; do \
|
|
||||||
echo "Applying $patch"; \
|
|
||||||
patch -p1 < "$patch"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
RUN mkdir /out
|
RUN mkdir /out
|
||||||
|
|
||||||
# Kernel
|
# Kernel
|
||||||
RUN make defconfig && \
|
RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
|
||||||
make oldconfig && \
|
|
||||||
make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
|
|
||||||
case $(uname -m) in \
|
case $(uname -m) in \
|
||||||
x86_64) \
|
x86_64) \
|
||||||
cp arch/x86_64/boot/bzImage /out/kernel; \
|
cp arch/x86_64/boot/bzImage /out/kernel; \
|
||||||
|
Loading…
Reference in New Issue
Block a user