mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Henrik Carlqvist <hc1@poolhem.se>,
	bunk@stusta.de
Subject: Re: tristate and bool not enogh for Kconfig anymore
Date: Sun, 21 Oct 2007 21:42:29 -0700	[thread overview]
Message-ID: <20071021214229.b75e2c3d.rdunlap@xenotime.net> (raw)
In-Reply-To: <20071021201416.4ccde183.rdunlap@xenotime.net>

On Sun, 21 Oct 2007 20:14:16 -0700 Randy Dunlap wrote:

> On Sun, 21 Oct 2007 17:47:48 -0700 Randy Dunlap wrote:
> 
> > On Sun, 21 Oct 2007 23:03:13 +0200 Sam Ravnborg wrote:
> > 
> > > On Sun, Oct 21, 2007 at 09:45:17AM -0700, Randy Dunlap wrote:
> > > > > Is there any other way to specify that a functionality can only be built
> > > > > as a module, not built into the kernel?
> > > > 
> > > > config FOO
> > > > 	depends on BAR && m
> > > > 
> > > > restricts FOO to module-only.
> > > > 
> > > > > In my firsta attempts to post about these tests my post ended up not on
> > > > > the mailing list but as a reply to Sam Ravnborg only, apologies for
> > > > > that...
> > > 
> > > This is obviously the right solution.
> > > Randy - we should document this somewhere together with more kconfig tips'n'tricks.
> > 
> > Agreed.
> 
> So that's one tip or trick... or common idiom.
> 
> > > A new document or do we extend kconfig-language?
> > 
> > I don't see a need for a separate document.  I would just extend
> > kconfig-language.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Another common idiom that we see (and sometimes have problems
> with) is this:
> 
> When B (module or subsystem) uses interfaces from A (module or
> subsystem), A can be linked statically into the kernel image or
> can be built as loadable module(s).   This limits how B can be
> built.  If A is linked statically into the kernel image, B can be
> built statically or as loadable module(s).  However, if A is built
> as loadable module(s), then B must be restricted to loadable
> module(s) also.  This can be expressed in kconfig language as:
> 
> config B
> 	depends on A = y || A = B
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> There's also a third issue:  symbols that are specific to a
> particular $arch, but they are in Kconfig files that are common
> to all arches, so kconfig complains about symbol A refers to
> unknown symbol B.  (and I'm just writing this from memory, not
> from testing it, so it could be off a bit.)  One example of this
> was PS3_PS3AV, as copied from an lkml email of 2007-feb-14:
> 
> drivers/video/Kconfig:1604:warning: 'select' used by config symbol 
> 'FB_PS3' refer to undefined symbol 'PS3_PS3AV'
> 
> Someone fixed this one by introducing an intermediate config symbol.
> I didn't follow the details of that fix, but we see this problem
> enough to warrant explaining how to handle it.  E.g., recently
> (from 2007-oct-14) on lkml:
> 
> $ make oldconfig >/dev/null
> drivers/macintosh/Kconfig:121:warning: 'select' used by config 
> symbol 'PMAC_APM_EMU' refers to undefined symbol 'APM_EMULATION'
> 
> 
> 
> Adrian, do you know of other items that should be listed here?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Continuing with real-life kconfig fun, here's a fourth item that
people need to be aware of.

The construct:

if ARCH_OMAP
	source "drivers/video/omap/Kconfig"
endif

does not prevent kconfig from reading drivers/video/omap/Kconfig.
Instead, it make all config symbols in that file be dependent upon
the ARCH_OMAP symbol.  Adding a config symbol dependency like this
is a common problem that causes config menus not to be displayed as
they should be (not indented or not subordinate as expected).


---
~Randy

  reply	other threads:[~2007-10-22  4:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-20 11:57 [PATCH] Kconfig bug Nick Warne
2007-10-20 12:42 ` tristate and bool not enogh for Kconfig anymore Henrik Carlqvist
2007-10-20 19:17   ` Sam Ravnborg
2007-10-20 21:56     ` Randy Dunlap
2007-10-21  4:47     ` Valdis.Kletnieks
2007-10-21 10:24       ` Henrik Carlqvist
2007-10-21 16:45         ` Randy Dunlap
2007-10-21 20:42           ` Henrik Carlqvist
2007-10-21 21:03           ` Sam Ravnborg
2007-10-22  0:47             ` Randy Dunlap
2007-10-22  3:14               ` Randy Dunlap
2007-10-22  4:42                 ` Randy Dunlap [this message]
2007-10-27 23:37                 ` Roman Zippel
2007-10-22 10:11   ` Christoph Hellwig
2007-10-22 10:32     ` Alexander E. Patrakov
2007-10-22 10:57       ` Christoph Hellwig
2007-10-22 11:27         ` Alexander E. Patrakov
2007-10-22 12:53           ` Christoph Hellwig
2007-10-22 13:18             ` Alexander E. Patrakov
2007-10-22 11:46   ` Helge Hafting
2007-10-22 21:50     ` Henrik Carlqvist
2007-10-27 12:26 ` [PATCH] Kconfig bug Nick Warne

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=20071021214229.b75e2c3d.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=bunk@stusta.de \
    --cc=hc1@poolhem.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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®