mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: diet-kconfig: a script to trim unneeded kconfigs
Date: Thu, 18 Sep 2008 22:17:22 +0200	[thread overview]
Message-ID: <s5hk5d9us31.wl%tiwai@suse.de> (raw)
In-Reply-To: <20080918122541.2c3c7b39@areia.chehab.org>

At Thu, 18 Sep 2008 12:25:41 -0300,
Mauro Carvalho Chehab wrote:
> 
> Hi Takashi,
> 
> On Wed, 17 Sep 2008 01:55:26 +0200
> Takashi Iwai <tiwai@suse.de> wrote:
> 
> > Hi,
> > 
> > a topic that just came up in kernel summit is a script to remove
> > unneeded kernel configs automatically to reduce the compile time.
> > Incidentally, I already wrote such a script during the last SUSE hack
> > week a couple of weeks ago, so I'd like to share here, hopefully to
> > give an idea for further improvements.
> > 
> > The script checks the currently loaded modules and trims other
> > CONFIG_XXX=m simply, and tries make oldconfig, and writes out the
> > resultant .config in the current directory after some checks. 
> > You can specify the config file via option,  as default, it reads from
> > /proc/config.gz. 
> 
> I agree with Giacomo: you should also check for /boot/config-`uname -r`
> and /boot/config-`uname -r`.gz.

OK, I'll add the check of these as fallback.
Any known paths for other distros?

> Also, if the idea is to make life easier for kernel newbies, I think the better
> would be to have the script called at kernel Makefile (something like "make
> diet"), and having a few other config's available somewhere at kernel tree,
> since even a "minimal" kernel may need (or not) a few random modules, like
> usb-storage. So, I think we should open a dialog that allows the selection of
> using the previous kernel config or selecting between a few profiles like
> "minimalist" (just the auto-detected things), "desktop" (adding things like
> usb-storage), "notebook" (with a power-saving optimized config),
> "server" (adding stuff like LVM, RAID5 and some advanced network configs).

There are different perspectives for this.  My goal to reduce the
build time with the existing kernel config for a specific hardware.
That is, it makes eaiser to create another set of kernel with test
patches or bisect.

OTOH, it would be definitely useful if we can create a clean minimum
kernel config from scratch based on the hardware information.  For that,
the use-case specific configuration (or preset) would be good.

> > The script is VERY hackish.  I should have begun with perl or whatever
> > better script language, but I chose bash and co.  So, don't expect
> > much code quality.  I'm no script guy after all :)
> 
> Using just a shellscript and binutils seems to be better than using other
> tools, since it allows the usage on minimal configured systems where the user
> might not have perl or other scripting languages.

Well, perl or python is most likely installed on every modern system,
so I think we don't stick with bash & co.  But, I see your point, and
it's also the reason I started with bash, etc.


thanks,

Takashi

  parent reply	other threads:[~2008-09-18 20:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 23:55 Takashi Iwai
2008-09-18 14:01 ` Giacomo A. Catenazzi
2008-09-18 20:09   ` Takashi Iwai
2008-09-18 15:25 ` Mauro Carvalho Chehab
2008-09-18 15:43   ` Giacomo A. Catenazzi
2008-09-18 16:27     ` Mauro Carvalho Chehab
2008-09-19  9:12       ` Giacomo A. Catenazzi
2008-09-19 16:01         ` Takashi Iwai
2008-09-19 23:55           ` Chris Li
2008-09-19 23:57             ` Chris Li
2008-09-22 10:01             ` Takashi Iwai
2008-09-22 13:39               ` Giacomo A. Catenazzi
2008-09-22 15:41                 ` Steven Rostedt
2008-09-22 15:50                   ` Takashi Iwai
2008-09-22 19:25               ` Chris Li
2008-09-23 11:31                 ` Takashi Iwai
2008-09-23 18:15                   ` Chris Li
2008-09-23 18:50                     ` Takashi Iwai
2008-09-23 19:40                       ` Chris Li
2008-09-18 20:20     ` Takashi Iwai
2008-09-18 20:17   ` Takashi Iwai [this message]
2008-09-18 21:09     ` Valdis.Kletnieks
2008-09-18 22:14       ` Takashi Iwai

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=s5hk5d9us31.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.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

all inboxes | Powered by JetHome®