|

楼主 |
发表于 2009-11-29 11:41:26
|
显示全部楼层
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 00/15] [GIT PULL] kconfig: localmodconfig for v2.6.32
Date: Fri, 11 Sep 2009 15:58:49 -0400
Message-ID: <20090911195849.451244684@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>, Theodore Tso <tytso@mit.edu>, Arnaldo Carvalho de Melo <acme@redhat.com>, zippel@linux-m68k.org, linux-kbuild@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>, Dick Streefland <dick@streefland.net>, Stephen Rothwell <sfr@canb.auug.org.au>
Archive-link: Article, Thread
Linus,
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.
** CONFLICTS **
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. ;-) |
|