Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lets suppose I have a module named "mptsas". How can I find out, what kernel configuration menu entry (make menuconfig inside /usr/src/linux) corresponds to that module?

By 'corresponds' I mean what menu entry compiles the appropriate module into the kernel.

enter image description here

//edit: it works very nicely: enter image description here

share|improve this question
up vote 1 down vote accepted

There is no recorded association. You need to explore the makefiles in the kernel source. You'll find lines like

obj-$(CONFIG_FUSION_SAS)        += mptbase.o mptscsih.o mptsas.o

This means that:

  • If CONFIG_FUSION_SAS is y, then the drivers mptbase, mptscsih and mptsas are compiled into the kernel.
  • If CONFIG_FUSION_SAS is m, then the drivers mptbase, mptscsih and mptsas are compiled as modules.
  • If CONFIG_FUSION_SAS is n, then the drivers mptbase, mptscsih and mptsas are not compiled.

The command grep -R --include=Makefile '\bNAME\.o\b' from the top of the kernel source tree will return the relevant makefile line in most cases.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.