<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 1:04 PM, Robert P. J. Day <span dir="ltr"><<a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
oddly, in the current YP kernel dev manual, i don't see the phrase<br>
"is not set" explained anywhere in the entire doc, which is weird<br>
since it seems like it would be important.<br></blockquote><div><br></div><div>The manuals don't cover the mechanics of how the mainline kernel is configured.</div><div>Just the same way the don't cover the configuration language for any number</div><div>of packages in the system.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
first, just to confirm *i* know what it's used for, it's not just a<br>
comment -- it's used explicitly by the kernel config process to<br>
stipulate that we are aware of a kernel config setting, and we don't<br>
want it. that is, if we have a kernel .config file used as the basis<br>
of a "make *config" command, and there is no mention whatever of a<br>
reachable config variable, the config process will stop and ask us<br>
about it. am i right so far?<br></blockquote><div><br></div><div>Also correct. That's more upstream kernel configuration detail, not</div><div>something we duplicate.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
this means that, once the kernel config process completes and the<br>
.config file is generated, every single *available* and *settable*<br>
kernel config option should be listed in the .config file, to avoid<br>
being asked about it the next time we do a kernel configuration.<br>
<br>
oh, and about that "reachable" thing, we don't need a line regarding<br>
every single kernel config setting, just the ones that are available<br>
to be set given the current config settings. how am i doing so far?<br>
<br></blockquote><div><br></div><div>Yep, and that means the final .config varies quite a bit, based on very small</div><div>deltas in some config option.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
given all that, my understanding is that, when one is writing kernel<br>
config fragments, it is necessary to explicitly deselect ("# ... is<br>
not set") *only* those kernel config options that would be selected<br>
based on other config settings we selected. do i have that right?<br></blockquote><div><br></div><div>Nope.</div><div><br></div><div>If a Kconfig actually has "select FOO", you can't turn it off "FOO" no matter how</div><div>hard you try. You need to turn off the option that has the select itself, i.e. the</div><div>parent/containing option.</div><div><br></div><div>So you use # CONFIG_FOO is not set, to turn off your typical boolean or</div><div>tristate option, that may have a default 'y', or be otherwise enabled when you</div><div>don't want it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
for instance, here's kernel Kbuild file net/Kconfig:<br>
<br>
<br>
...<br>
menuconfig NETFILTER<br>
bool "Network packet filtering framework (Netfilter)"<br>
... snip ...<br>
if NETFILTER<br>
<br>
config NETFILTER_DEBUG<br>
bool "Network packet filtering debugging"<br>
depends on NETFILTER<br>
help<br>
You can say Y here if you want to get additional messages useful in<br>
debugging the netfilter code.<br>
<br>
<br>
as a test, i added a single-line frgament file:<br>
<br>
CONFIG_NETFILTER=y<br>
<br>
however, even though NETFILTER_DEBUG was then selectable, because it<br>
wasn't *explicitly* selected, what i got in my final .config file was:<br>
<br>
...<br>
CONFIG_NETFILTER=y<br>
# CONFIG_NETFILTER_DEBUG is not set<br>
...<br>
<br>
however, because the very next Kconfig stanza was "default y":<br>
<br>
config NETFILTER_ADVANCED<br>
bool "Advanced netfilter configuration"<br>
depends on NETFILTER<br>
default y<br>
<br>
i *did* get the line in the final .config:<br>
<br>
CONFIG_NETFILTER_ADVANCED=y<br>
<br>
does all this sound right? i always thought it was pretty<br>
straightforward, but i'm willing to be convinced i never really<br>
understood it.<br></blockquote><div><br></div><div>Those are some relatively simple examples, but yes, pretty straight forward. But no</div><div>one has ever claimed Kconfig to be simple or easy to fully grok.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
and it does seem odd that it's not described anywhere in the YP<br>
kernel dev manual.<br></blockquote><div><br></div><div>See above. We don't document what is already described in the mainline kernel's</div><div>Kconfig specification.</div><div><br></div><div>Bruce</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
rday<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<br>
========================================================================<br>
Robert P. J. Day Ottawa, Ontario, CANADA<br>
<a href="http://crashcourse.ca" rel="noreferrer" target="_blank">http://crashcourse.ca</a><br>
<br>
Twitter: <a href="http://twitter.com/rpjday" rel="noreferrer" target="_blank">http://twitter.com/rpjday</a><br>
LinkedIn: <a href="http://ca.linkedin.com/in/rpjday" rel="noreferrer" target="_blank">http://ca.linkedin.com/in/rpjday</a><br>
========================================================================<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>