LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Detect what built-in kernel components (not modules) are actually being used? (http://www.linuxquestions.org/questions/linux-kernel-70/detect-what-built-in-kernel-components-not-modules-are-actually-being-used-728089/)

MaxIBoy 05-23-2009 09:18 PM

Detect what built-in kernel components (not modules) are actually being used?
 
Okay, I'm running my kernel as monolithic as I can make it-- no initrd, and only three modules (which refuse to compile directly into the kernel for some reason.) Sure, it's not as elegant, but it runs faster that way.

However, when I build stuff into the kernel, I have to err on the side of caution, and I probably have more stuff compiled into it than I need.

I know that lsmod will tell me what modules I'm using, but I need to know what built-in stuff is being used. My current workflow is:
  • Disable something in xconfig.
  • Compile kernel.
  • Reboot.
  • If I get a kernel panic, or sound/internet gets disabled, re-enable whatever I disabled.
  • Repeat from step one.
This trial-and error method is time-consuming, and I was wondering if there was a faster way.

I am using Debian Sid/Squeeze/Experimental, kernel 2.6.30-rc6-git6.

veerain 05-24-2009 06:18 AM

See the content of /proc/config or /proc/config.gz file.
It has the settings used when during build.
Or if it's not available you have to see the .config file used for kernel build. .config file is present in the source code directory of the kernel.

sundialsvcs 05-24-2009 08:44 AM

I run a similar kernel, and I am frankly not in agreement that "it runs faster that way."

Now, "bumming code" is a legendary and noble enterprise ... :D ... but at this point, that's really all that you're doing.

When I built my kernel, I selected the options for the hardware that I am actually using on a machine, then added removable-device support, crypto-algorithms and so on as modules. I very carefully save the ".config" files so that they cannot get lost.

The machine, of course, "runs like a bandit," booting all the way to ready-to-use in about 40 seconds.


All times are GMT -5. The time now is 02:56 PM.