mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
kernel config project: makeconfig.sh takes config as args
Instead of figuring out which config files to use inside of makeconfig.sh, let's figure that out in the Dockerfile and pass them into the script. Signed-off-by: Tycho Andersen <tycho@docker.com>
This commit is contained in:
parent
502c2c674f
commit
9757a33bf9
@ -23,7 +23,14 @@ RUN set -e && for patch in /patches/*.patch; do \
|
|||||||
patch -p1 < "$patch"; \
|
patch -p1 < "$patch"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
RUN /config/makeconfig.sh ${ARCH} ${KERNEL_SERIES}
|
RUN \
|
||||||
|
if [ -n "${DEBUG}" ]; then dbg=kernel_config.debug; else dbg=; fi && \
|
||||||
|
/config/makeconfig.sh \
|
||||||
|
kernel_config.base \
|
||||||
|
"kernel_config.${ARCH}" \
|
||||||
|
"kernel_config.${ARCH}.${KERNEL_SERIES}" \
|
||||||
|
"kernel_config.${KERNEL_SERIES}" \
|
||||||
|
"$dbg"
|
||||||
RUN /config/check-kernel-config.sh /linux/.config
|
RUN /config/check-kernel-config.sh /linux/.config
|
||||||
|
|
||||||
RUN mkdir /out
|
RUN mkdir /out
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ARCH=$1
|
|
||||||
KERNEL_SERIES=$2
|
|
||||||
DEBUG=$3
|
|
||||||
|
|
||||||
cd /linux && make defconfig
|
cd /linux && make defconfig
|
||||||
|
|
||||||
function merge_config()
|
function merge_config()
|
||||||
@ -32,10 +28,9 @@ function merge_config()
|
|||||||
|
|
||||||
cd /linux && make defconfig && make oldconfig
|
cd /linux && make defconfig && make oldconfig
|
||||||
|
|
||||||
merge_config "/config/kernel_config.base"
|
for config in "$@"; do
|
||||||
merge_config "/config/kernel_config.${ARCH}"
|
merge_config "$config"
|
||||||
merge_config "/config/kernel_config.${KERNEL_SERIES}"
|
done
|
||||||
merge_config "/config/kernel_config.${ARCH}.${KERNEL_SERIES}"
|
|
||||||
|
|
||||||
cd /linux && make oldconfig
|
cd /linux && make oldconfig
|
||||||
|
|
||||||
@ -48,7 +43,7 @@ function check_config()
|
|||||||
while read line; do
|
while read line; do
|
||||||
# CONFIG_PANIC_ON_OOPS is special, and set both ways, depending on
|
# CONFIG_PANIC_ON_OOPS is special, and set both ways, depending on
|
||||||
# whether DEBUG is set or not.
|
# whether DEBUG is set or not.
|
||||||
if [ -n "${DEBUG}" ] && [ "$line" == "CONFIG_PANIC_ON_OOPS=y" ]; then continue; fi
|
if [ "$line" == *"CONFIG_PANIC_ON_OOPS"* ]; then continue; fi
|
||||||
value="$(grep "^${line}$" /linux/.config || true)"
|
value="$(grep "^${line}$" /linux/.config || true)"
|
||||||
|
|
||||||
# It's okay to for the merging script to have simply not listed values we
|
# It's okay to for the merging script to have simply not listed values we
|
||||||
@ -64,10 +59,6 @@ function check_config()
|
|||||||
done < $1
|
done < $1
|
||||||
}
|
}
|
||||||
|
|
||||||
check_config "/config/kernel_config.base"
|
for config in "$@"; do
|
||||||
check_config "/config/kernel_config.${ARCH}"
|
check_config "$config"
|
||||||
check_config "/config/kernel_config.${KERNEL_SERIES}"
|
done
|
||||||
check_config "/config/kernel_config.${ARCH}.${KERNEL_SERIES}"
|
|
||||||
if [ -n "${DEBUG}" ]; then
|
|
||||||
check_config "/config/kernel_config.debug"
|
|
||||||
fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user