[PATCH 00/15] [GIT PULL] kconfig: localmodconfig for v2.6.32


This is the patch set that creates localmodconfig and localyesconfig.
This will facilitate testers by removing the thousand modules that
distributions enable with only the ones that they have loaded.

Yes it may miss usb devices that you don't have plugged in, but it will
save a lot of time in compiling by only compiling the code that you
have loaded.

The usage is quite simple. Just download the latest kernel.org kernel
(with this changeset in), cd to that directory and then do:

make localmodconfig

It will search for a .config locally first, then will look for
/proc/config.gz, then it will search the /boot directory for configs
matching the local kernel (uname -r). If it still does not find one
It search for configurations in the local binarys (vmlinux, /lib/modules..,
kernel/configs.ko, etc).

Once it finds a config to use, it will then read all the Kconfigs
and Makefiles to find out what config compiles what module. Then lsmod
is used to see what modules are loaded, and it will keep enabled all
the configs (including dependencies) that those modules require to
build. It disables all modules not needed.

Note, it only disables it does not enable, because a lot of modules
can be enabled by more than one config, and I don't want to guess.
I could someday enable easy configs (1 to 1 matches of config to module).

It also does nothing with built in code (=y). It does not enable or
disable them.

I've been using this code (various versions of) since 2005, and
so have others. When I get a new box, the first thing I do is
boot up the distribution kernel, download kernel.org kernel, and run
this script to get the modules needed to boot the kernel.


linux-next has proven that there is a conflict between these patches
and Sam Ravnborg's tree. I've tried to get in contact with Sam, but
he seems to be out. I don't want to hold up this push on that account.
But if you want, I could wait to fix the conflicts, or you can pull
this and he can fix it on his end. I'm fine with it. I just think
that this tool is important enough to get into mainline, especially
early in the merge window since it will help others test it. ;-)

Please pull kconfig updates for v2.6.32 from:


Steven Rostedt (15):
kconfig: add streamline_config.pl to scripts
kconfig: make localmodconfig to run streamline_config.pl
kconfig: add make localyesconfig option
kconfig: streamline_config.pl do not stop with no depends
kconfig: do not warn about modules built in
kconfig: enable CONFIG_IKCONFIG from streamline_config.pl
kconfig: add check if end exists in extract-ikconfig
kconfig: have extract-ikconfig read ELF files
kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set
kconfig: search for a config to base the local(mod|yes)config on
kconfig: unset IKCONFIG_PROC and clean up nesting
kconfig: test for /boot/config-uname after /proc/config.gz in localconfig
kconfig: make local .config default for streamline_config
kconfig: test if a .config already exists
kconfig: add missing dependency of conf to localyesconfig

kernel/Makefile | 2 +-
scripts/extract-ikconfig | 14 ++
scripts/kconfig/Makefile | 34 +++-
scripts/kconfig/streamline_config.pl | 366 ++++++++++++++++++++++++++++++++++
4 files changed, 414 insertions(+), 2 deletions(-)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Relevant Pages

  • [PATCH] x86: simplify "make ARCH=x86" and fix kconfig all.config
    ... -> kconfig: add helper to set config symbol from environment variable ... The general rule are that ARCH= and native architecture ... kernel no matter what the configuration says. ... the config symbol "64BIT" to the value of the K64BIT variable. ...
    ... retrieving revision 1.3 ... diff -u -p -r1.3 Kconfig ... config MMU ...
  • Re: tristate and bool not enogh for Kconfig anymore
    ... not built into the kernel? ... config FOO ... Randy - we should document this somewhere together with more kconfig tips'n'tricks. ... can be built as loadable module. ...
  • Re: [PATCH/RFC] kconfig hints/tips/tricks
    ... Add a section on kconfig hints: how to do in Kconfig files. ... -Most entries define a config option, all other entries help to organize ...
  • Re: Immortal CONFIG_DEBUG_INFO=y
    ... config DEBUG_INFO ... If you say Y here the resulting kernel image will include ... Instead of editing the Kconfig file you should use the KCONFIG_ALLCONFIG trick. ...