Skip to contentSkip to conversation

Calculating CONFIG's from lsmod info

DISCUSSION Alex Bennee 1 participant 1 message Dec 27, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

Following a conversation with my Dad concerning his new netbook we discussed one option for speeding up the boot process was a static kernel with the correct config for his actual hardware, obviating the need for initrd and the rest of the flexible hardware hackery. However he has less patience than me for reading through each Kconfig entry so I'm wondering if it's possible to come up with a solution that just works (tm).

Given we usually know the config of the running kernel (/proc/config.gz or some package copy of it) and the modules that have been successfully loaded (lsmod) it must be deducible which CONFIG_* to turn from m to y for a kernel rebuild.

The info from modinfo brings up a host of information for each module but the CONFIG flag that selects it for building is not one of them. Is there some sort of macro magic that could add the flag as module information or will I be reduced to grokking Makefile to deduce which object was invoked by which switch?

Or am I in fact re-inventing a wheel that has already been created but isn't living in the scripts directory?

Signature · 2 lines
Alex, homepage: http://www.bennee.com/~alex/
CV: http://www.bennee.com/~alex/cv.php