# Force disable config options

## FlowIt

I needed to tweak options under CONFIG_EXPERT but this also enabled CONFIG_DEBUG_KERNEL. Is there any way to disable CONFIG_DEBUG_KERNEL while keeping CONFIG_EXPERT enabled? (menuconfig says that CONFIG_DEBUG_KERNEL is selected by CONFIG_EXPERT=y)

----------

## NeddySeagoon

FlowIt,

You need to go through all of the CONFIG_DEBUG_KERNEL menu and turn off things that you don't want.

Its a one time thing, since you will use your current kernel .config as the basis for your next  kernel .config.

----------

## FlowIt

I am not sure if I understand you correctly.

In the Kernel hacking submenu there is the CONFIG_DEBUG_KERNEL option, but this option itself is no submenu. I want to disable the option itself, but I can't, because I would have to disable CONFIG_EXPERT first (which I don't want, because I had to enable it for another feature).

Most additional debugging options are disabled nevertheless, but CONFIG_DEBUG_KERNEL says "Say Y here if you are developing drivers or trying to debug and identify kernel problems" which sounds like a lot of debug information is compiled into the kernel and I don't want that.

----------

## Hu

A cursory read of recent kernel sources suggests that, with a few likely irrelevant exceptions, CONFIG_DEBUG_KERNEL does not, on its own, change anything about the compiled kernel.  Using git grep -w CONFIG_DEBUG_KERNEL shows many hits in defconfig files and a few source files.  Adding  -- '*.[chsS]' to restrict it to common source file extensions makes the list much easier to read.  If you are on one of blackfin, mips, parisc, powerpc, or xtensa, then setting CONFIG_DEBUG_KERNEL might change the generated kernel.  For any other architecture, debug-specific code is guarded by other Kconfig symbols, which you should be able to change independently.

----------

