When I run make menuconfig inside /usr/src/linux directory, the kernel configuration wizard appears. How can I search through the menu entries inside the make menuconfig wizard? I've tested /, but / it appears that / searches only through the .config file. I.e. when I search for "pci dma", there are no results, however there exists an appropriate kernel menu entry to enable DMA for PCI devices.

I was able to find the text of the menu entries inside Kconfig files. The Kconfig files are located in many subdirectories of /usr/src/linux directory. Still, searching through Kconfig files doesn't give me the actual "tree" view of the option I want to find. The command I used to find that one out:

grep -i --directories=recurse 'kprobes' /usr/src/linux --color=always | less

How can I search through the menu entries inside the make menuconfig wizard?

enter image description here

//edit: A working solution:

find /usr/src/linux/ -name 'Kconfig' -exec egrep -i -B 1 '(tristate|bool|menu)' '{}' \; | grep -i -B 1 --color=always 'Device Drivers'

This will show up, what kernel .config name contains the .config label specified. All I have to do now is to look for the config name inside make menuconfig (by using /).


1 Answer 1


When you press /, it says

Enter CONFIG_ (sub)string to search for (with or without "CONFIG_") 

which means it's looking for the names of the options, not the labels of the options.

With Linux 3.3, I found your option using grep...

$ find . -name Kconfig -exec grep 'config.*PCI' {} + | grep DMA
./drivers/ide/Kconfig:config BLK_DEV_IDEDMA_PCI

And then opened the file ./drivers/ide/Kconfig to see more information

    select BLK_DEV_IDEPCI

Since it doesn't have a tristate or bool line like the others, that suggests it doesn't appear in the menu.

Searching in the same file for BLK_DEV_IDEDMA_PCI, you can see lots of entries that refer to it, e.g.

config BLK_DEV_AMD74XX
    tristate "AMD and nVidia IDE support"
    depends on !ARM
    select IDE_TIMINGS

So it looks like you're not supposed to enable DMA explicitly: the drivers that need DMA will enable it automatically.

  • Thanks for the response.I've also found out that the information I need is inside Kconfig files. Check this out: find /usr/src/linux/ -iname 'Kconfig' -exec grep --color=always -i -H -A 3 -B 3 'kprobes' '{}' \; -exec echo \; | less . To search through kernel source files for the information is a little cumbersome way though.
    – colemik
    Commented May 6, 2012 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .