public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	david@lang.hm, Tejun Heo <tj@kernel.org>,
	Dave Airlie <airlied@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: kms in defconfig
Date: Tue, 28 Apr 2009 21:18:27 +0200	[thread overview]
Message-ID: <20090428191827.GA27062@elte.hu> (raw)
In-Reply-To: <alpine.DEB.2.00.0904281331040.8066@gandalf.stny.rr.com>


* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Tue, 28 Apr 2009, Ingo Molnar wrote:
> 
> > 
> > * Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > 
> > > So yes, it would be good to automate it:
> > > 
> > > > If a tool was available to detect the hardware and create a 
> > > > config tailored for the box, this use for a default config would 
> > > > go away
> > > 
> > > Yeah, I've wished for that.
> > 
> > Steve (Cc:-ed) submitted such a script last year IIRC. It wasnt 
> > particularly complex.
> 
> I've submitted the script a few times to LKML but it is not 
> exactly what people want, but is quite useful in the mean time.
> 
> What people want is a script that will analyze their system 
> devices and enable all the configs that will support them.
> 
> My script requires that you have booted the kernel (or similar 
> kernel with the same config options and modules). It then runs 
> lsmod, and searches for the options that enable those modules. It 
> then reads the current .config file and prints out a new config 
> that disables all module configs that are not used to enable the 
> modules found with lsmod.
> 
> Here's the code (perl script):
> 
> http://rostedt.homelinux.com/code/streamline_config.pl
> 
> The instructions on how to use it are at the top of the file.
> 
> This script has brought down my full kernel compile times with 
> distcc from 50 minutes to under 10.

Looks rather useful IMHO.

I use the following magic incantation in cfs-debug-info.sh to get to 
the distro config automatically:

 KREL=`uname -r | sed 's/smp$//g'`
 ( cat "`rpm -ql kernel-$KREL 2>/dev/null | grep /boot/config`"
   cat "`rpm -ql kernel-smp-$KREL 2>/dev/null | grep /boot/config`"
   cat "`dpkg -L linux-image-$KREL 2>/dev/null | grep /boot/config`"
   cat /boot/config-$KREL 2>/dev/null
 )

Works on most .rpm and .deb based distros. (If /proc/config.gz is 
present that could be added too.)

So if this was added as a 'make builtinconfig' kind of shortcut, 
with no extra steps needed (and if the script bailed out if it 
cannot find the currently booted .config) - that would be a rather 
useful (and easy) way to start kernel development on a new box.

Useful to newbies and oldbies alike IMHO.

	Ingo

  reply	other threads:[~2009-04-28 19:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27  8:21 kms in defconfig Dave Airlie
2009-04-27  8:39 ` Ingo Molnar
2009-04-27  8:56   ` Dave Airlie
2009-04-28  1:45     ` Tejun Heo
2009-04-28  1:59       ` Linus Torvalds
2009-04-28  6:29         ` Ingo Molnar
2009-04-28 16:54         ` david
2009-04-28 17:13           ` Linus Torvalds
2009-04-28 17:22             ` Ingo Molnar
2009-04-28 17:36               ` Steven Rostedt
2009-04-28 19:18                 ` Ingo Molnar [this message]
2009-04-28 21:23                   ` Steven Rostedt
2009-04-28 17:23             ` david
2009-04-28 17:50               ` Linus Torvalds
2009-04-28 21:43                 ` Florian Mickler
2009-04-28 21:50                   ` david
2009-04-28 23:10                     ` Florian Mickler
2009-04-28 23:29                       ` david
2009-04-29  6:55                   ` Giacomo Catenazzi
2009-04-29  5:36     ` Andrew Morton
2009-04-29  5:59       ` Dave Airlie
2009-04-27 15:40   ` Peter Zijlstra
2009-04-28  1:54     ` Dave Airlie
2009-04-28  7:32       ` Peter Zijlstra
2009-04-28 17:04         ` Jesse Barnes
2009-04-28 23:42         ` Dave Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090428191827.GA27062@elte.hu \
    --to=mingo@elte.hu \
    --cc=airlied@gmail.com \
    --cc=david@lang.hm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox