kernel-config: less special casing for PANIC_ON_OOPS

Instead of having a special case sed script, we can just put this in the
.debug config file, and have a special case when it's being checked.

Signed-off-by: Tycho Andersen <tycho@docker.com>
This commit is contained in:
Tycho Andersen 2017-05-26 16:48:55 -06:00
parent d14412810a
commit 502c2c674f
2 changed files with 3 additions and 5 deletions

View File

@ -24,3 +24,4 @@ CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDBOC=y
CONFIG_DEBUG_RODATA_TEST=y
CONFIG_DEBUG_WX=y
# CONFIG_PANIC_ON_OOPS is not set

View File

@ -37,11 +37,6 @@ merge_config "/config/kernel_config.${ARCH}"
merge_config "/config/kernel_config.${KERNEL_SERIES}"
merge_config "/config/kernel_config.${ARCH}.${KERNEL_SERIES}"
if [ -n "${DEBUG}" ]; then
sed -i sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' /linux/arch/x86/configs/x86_64_defconfig
append_config "/config/kernel_config.debug"
fi
cd /linux && make oldconfig
# Let's make sure things are the way we want, i.e. every option we explicitly
@ -51,6 +46,8 @@ function check_config()
if [ ! -f "$1" ]; then return; fi
while read line; do
# CONFIG_PANIC_ON_OOPS is special, and set both ways, depending on
# whether DEBUG is set or not.
if [ -n "${DEBUG}" ] && [ "$line" == "CONFIG_PANIC_ON_OOPS=y" ]; then continue; fi
value="$(grep "^${line}$" /linux/.config || true)"