Log in

No account? Create an account

Mon, Jan. 17th, 2011, 05:43 pm
Restricting Linux kernel configure options to currently used set

git is great for bisecting regressions (or finding a fix in a series of commits) - but compiling the kernel can take ages, especially if you have to do it on an Atom, and with the configuration of your favorite distribution...

Now finally I created a perl script for reducing the default config to the set of modules that are currently actually loaded. Reduces kernel compilation times on a quad core machine from 56 minutes to 6 for a standard SLED kernel Guess it's even more difference on this !@#$% Atom...


# cd /var/tmp/linux-2.6or wherever your git tree is located
# gunzip </proc/config.gz >.configto get the current configuration
# make oldconfig to add new options for current kernel
# ~/linux-adaptconfig.pl >.config.new    to remove all not required options
# mv .config.new .config
# make oldconfigto be on the save side...
# make -j5build, mother*beep*, build :-)

Yes, it's a hack. No, it's certainly not perfect. But it might be exactly what you had been waiting for. I waited long enough to actually write it myself...

Mon, Jan. 17th, 2011 05:37 pm (UTC)
emmes: Sigh...

As always, the minute you implement and post something, someone tells you that this had already been invented.

make localmodconfig   apparently does exactly the same as my script. Many thanks to Peter for this information!

It's noteworthy that you never get important information like this before working on this yourself, even if you ask many people in advance - just apparently the wrong ones
Yeah, and reading documentation like the one from make help would help sometimes as well. But documentation is for whimps.

Tue, Jan. 18th, 2011 12:08 am (UTC)

especially for bisecting you should also use ccache