Re: tristate and bool not enogh for Kconfig anymore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux