I would like to build a kernel for my system that only contains modules for the hardware which is really in place. Of course I can walk through lspci and manually select all the necessary device drivers to be build as a module.
But I am wondering if there is some script that can automate this process to some degree. For example which scan's the output of lsusb/lspci/cpuinfo etc. and then produces a .config kernel configuration file that can be modified further and acts as a baseline.
There are several tools that provide a good overview of the hardware contained in a system, but none produces a kernel .config file.
http://wiki.gentoo.org/wiki/Hardware_detection
[addendum]
I have just learned about the 'make localmodconfig' parameter which seems to be a real time safer.
This links also contains some valuable information to speed up things, however it does not provide the information i am looking for: http://gentoovps.net/kernel-tips/