[OE-core] clarifying details about "is not set" lines in kernel config fragment files

Robert P. J. Day rpjday at crashcourse.ca
Tue May 3 17:04:24 UTC 2016


  oddly, in the current YP kernel dev manual, i don't see the phrase
"is not set" explained anywhere in the entire doc, which is weird
since it seems like it would be important.

  first, just to confirm *i* know what it's used for, it's not just a
comment -- it's used explicitly by the kernel config process to
stipulate that we are aware of a kernel config setting, and we don't
want it. that is, if we have a kernel .config file used as the basis
of a "make *config" command, and there is no mention whatever of a
reachable config variable, the config process will stop and ask us
about it. am i right so far?

  this means that, once the kernel config process completes and the
.config file is generated, every single *available* and *settable*
kernel config option should be listed in the .config file, to avoid
being asked about it the next time we do a kernel configuration.

  oh, and about that "reachable" thing, we don't need a line regarding
every single kernel config setting, just the ones that are available
to be set given the current config settings. how am i doing so far?

  given all that, my understanding is that, when one is writing kernel
config fragments, it is necessary to explicitly deselect ("# ... is
not set") *only* those kernel config options that would be selected
based on other config settings we selected. do i have that right?

  for instance, here's kernel Kbuild file net/Kconfig:


    ...
    menuconfig NETFILTER
        bool "Network packet filtering framework (Netfilter)"
        ... snip ...
    if NETFILTER

    config NETFILTER_DEBUG
        bool "Network packet filtering debugging"
        depends on NETFILTER
        help
          You can say Y here if you want to get additional messages useful in
          debugging the netfilter code.


as a test, i added a single-line frgament file:

  CONFIG_NETFILTER=y

however, even though NETFILTER_DEBUG was then selectable, because it
wasn't *explicitly* selected, what i got in my final .config file was:

    ...
    CONFIG_NETFILTER=y
    # CONFIG_NETFILTER_DEBUG is not set
    ...

however, because the very next Kconfig stanza was "default y":

    config NETFILTER_ADVANCED
        bool "Advanced netfilter configuration"
        depends on NETFILTER
        default y

i *did* get the line in the final .config:

    CONFIG_NETFILTER_ADVANCED=y

does all this sound right? i always thought it was pretty
straightforward, but i'm willing to be convinced i never really
understood it.

  and it does seem odd that it's not described anywhere in the YP
kernel dev manual.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the Openembedded-core mailing list