kconfig: add streamline_config.pl to scripts
authorSteven Rostedt <srostedt@redhat.com>
Thu, 30 Apr 2009 02:52:21 +0000 (22:52 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 19 Aug 2009 01:49:43 +0000 (21:49 -0400)
commitdcc60243e726978576cb02b74c84440629c69c87
treef1a4cd4a41c942118a21c3b1cb0b4857fe2c63e1
parentdc8ed71eeb8adce08d3070f4130e12ee540baa59
kconfig: add streamline_config.pl to scripts

streamline_config.pl is a very powerful tool. For those that install
a kernel to a new box using the config file from the distribution know that
it can take forever to compile the kernel.

Making a custom config file that will still boot your box, but bring
down the compile time of the kernel can be quit painful, and to ask
someone that reported a bug to do this can be a large burdon since that
person may not even know how to build a kernel.

This script will perform "lsmod" to find all the modules loaded on the
current running system. It will read all the Makefiles to map which
CONFIG enables a module. It will read the Kconfig files to find the
dependencies and selects that may be needed to support a CONFIG.
Finally, it reads the .config file and removes any module "=m" that is
not needed to enable the currently loaded modules. The output goes to
standard out.

Here's a way to run the script. From the Linux directory that holds
a distribution .config.

 $ scripts/kconfig/streamline_config.pl arch/x86/Kconfig > config-sl
 $ mv .config config-save
 $ mv config-sl .config
 $ make oldconfig

Now you have a .config that will still build all your modules, but also
take much less time to build the kernel.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
scripts/kconfig/streamline_config.pl [new file with mode: 0644]