mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chris Li" <lkml@chrisli.org>
To: "Takashi Iwai" <tiwai@suse.de>
Cc: "Giacomo A. Catenazzi" <cate@cateee.net>,
	"Mauro Carvalho Chehab" <mchehab@infradead.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org
Subject: Re: diet-kconfig: a script to trim unneeded kconfigs
Date: Tue, 23 Sep 2008 11:15:19 -0700	[thread overview]
Message-ID: <70318cbf0809231115r506db98etd87b67a590ba6eae@mail.gmail.com> (raw)
In-Reply-To: <s5hr67bumiq.wl%tiwai@suse.de>

On Tue, Sep 23, 2008 at 4:31 AM, Takashi Iwai <tiwai@suse.de> wrote:
> That is true.  Enabling arbitrary kernel config item is hard to
> achieve right now.  I think this feature should be implemented in
> kbuild parser itself.  The current reverse-select is way limited and
> known to be problematic in many kernel configs.

I was looking at the kbuild system. BTW, I really like the Makefile
in kbuild.  For the reverse select, here is what I have in mind.

The reverse select needs to maintain the define-user chain for
each kernel option. And each kernel option has a list of the kernel
option and value pare to enable an option. Once we produce such
an list for "all config". We can know exactly what kernel option
needs to set in order to get to so module. It is kind of doing
the data flow analyze on the config options.

It is not trivial, but it shouldn't be too hard either.

> Anyway, I think the white list isn't that hard for certain use-cases.
> My assumption is that users base on the distro kernel that have
> already all modules.  Then, for likely scenarios such as USB-storage
> hotplug, we can simply provide possible modules such as usb-storage
> and nls_* as the additional modules.  The script would just need to
> add them to the existing module list.  If necessary, the module
> dependency can be solved easily from modules.dep, too.

If you just want a white list without resolving the dependency, that
should be very easy to do in my current minmod.py.

In terms of implement in C. The currently kconf symbol has most
of the bits ready already. We can add a symbol type "module".
It points to a list of config symbols. That should be good enough.
Then we can use 1 bit of flag in config symbol to mark it is blacklisted
or not.

We can use some thing like minmod.py to provide a prototype
for some kernel user to try it out. If it covers most of the feature
the we want. We can go ahead to the C version.

> But not about this case.  It wants to be compiled-in, too.

I think my script can catch those already. Maybe I will beat it
up to generate a list of similar configs using "obj-m" directly.
We can example them one by one.

Chris

  reply	other threads:[~2008-09-23 18:15 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 [this message]
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
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=70318cbf0809231115r506db98etd87b67a590ba6eae@mail.gmail.com \
    --to=lkml@chrisli.org \
    --cc=cate@cateee.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tiwai@suse.de \
    /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®