From 502c2c674fc1c5c282d661d360e8dac781228dfb Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Fri, 26 May 2017 16:48:55 -0600 Subject: [PATCH] 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 --- projects/kernel-config/kernel_config.debug | 1 + projects/kernel-config/makeconfig.sh | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/projects/kernel-config/kernel_config.debug b/projects/kernel-config/kernel_config.debug index 00e73d577..7149bb31f 100644 --- a/projects/kernel-config/kernel_config.debug +++ b/projects/kernel-config/kernel_config.debug @@ -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 diff --git a/projects/kernel-config/makeconfig.sh b/projects/kernel-config/makeconfig.sh index 98e675133..86c940181 100755 --- a/projects/kernel-config/makeconfig.sh +++ b/projects/kernel-config/makeconfig.sh @@ -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)"