All of lore.kernel.org
 help / color / mirror / Atom feed
* how can i tell which default kernel config OE started with?
@ 2016-05-03 10:53 Robert P. J. Day
  2016-05-03 12:28 ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2016-05-03 10:53 UTC (permalink / raw)
  To: OE Core mailing list


  (actually, working in wind river linux but i suspect the answer will
be the same.)

  i've defined a target board and, rather than supplying a full
"defconfig" file as a starting point for kernel configuration, my BSP
layer starts by applying a "kernel_baseline.cfg" file which contains
only a couple hundred settings that i am particularly interested in.

  so, given that, how can i tell what OE chose as a starting point for
a .config file before beginning to apply my kernel config fragments?
i'm poking around in the log files of the build, but i can't seem to
see where the "configme" process selects a starting point. am i just
missing the obvious? i want to see the .config file *before* any of my
fragments are applied.

rday

-- 

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

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can i tell which default kernel config OE started with?
  2016-05-03 10:53 how can i tell which default kernel config OE started with? Robert P. J. Day
@ 2016-05-03 12:28 ` Bruce Ashfield
  2016-05-03 13:12   ` Robert P. J. Day
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Ashfield @ 2016-05-03 12:28 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]

On Tue, May 3, 2016 at 6:53 AM, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

>
>   (actually, working in wind river linux but i suspect the answer will
> be the same.)
>
>   i've defined a target board and, rather than supplying a full
> "defconfig" file as a starting point for kernel configuration, my BSP
> layer starts by applying a "kernel_baseline.cfg" file which contains
> only a couple hundred settings that i am particularly interested in.
>
>   so, given that, how can i tell what OE chose as a starting point for
> a .config file before beginning to apply my kernel config fragments?
> i'm poking around in the log files of the build, but i can't seem to
> see where the "configme" process selects a starting point. am i just
> missing the obvious? i want to see the .config file *before* any of my
> fragments are applied.
>

If you haven't specified a defconfig (in-tree, or in your layer), and are
only using fragments, then it will
be the first fragment. There's no logic to go out and find a baseline,
since it would almost always not
be what someone wanted.

Cheers,

Bruce


>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 3107 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can i tell which default kernel config OE started with?
  2016-05-03 12:28 ` Bruce Ashfield
@ 2016-05-03 13:12   ` Robert P. J. Day
  2016-05-03 14:39     ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2016-05-03 13:12 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: OE Core mailing list

[-- Attachment #1: Type: text/plain, Size: 2762 bytes --]

On Tue, 3 May 2016, Bruce Ashfield wrote:

>
>
> On Tue, May 3, 2016 at 6:53 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>         (actually, working in wind river linux but i suspect the answer will
>       be the same.)
>
>         i've defined a target board and, rather than supplying a full
>       "defconfig" file as a starting point for kernel configuration, my BSP
>       layer starts by applying a "kernel_baseline.cfg" file which contains
>       only a couple hundred settings that i am particularly interested in.
>
>         so, given that, how can i tell what OE chose as a starting point for
>       a .config file before beginning to apply my kernel config fragments?
>       i'm poking around in the log files of the build, but i can't seem to
>       see where the "configme" process selects a starting point. am i just
>       missing the obvious? i want to see the .config file *before* any of my
>       fragments are applied.
>
>
> If you haven't specified a defconfig (in-tree, or in your layer),
> and are only using fragments, then it will be the first fragment.
> There's no logic to go out and find a baseline, since it would
> almost always not be what someone wanted.

  ok, i'm going to ask a few follow-up questions since i clearly don't
totally understand the full kernel configuration process.

  i have a BSP layer for a target board that first specifies a
"kernel_baseline.cfg" fragment file which contains just those kernel
config settings i want to make sure are set, and that file is just
over 200 lines long. i also drag in a few other *very* short .cfg
files. but in the end, the .config file generated under
.../linux-windriver/4.1-r0/linux-cxii-standard-build/ is almost 2,200
lines long. where did all that extra content come from?

  i'm assuming (and i could be wrong here) that since i'm using the
line:

TARGET_SUPPORTED_KTYPES = "standard"

i'm automatically incorporating "standard"-related content under
.../kernel-meta/ktypes/standard? as in, the files:

  * standard.cfg
  * standard.scc

or am i mistaken? from where comes all that additional content that
ends up in the final .config?  is there a record of it in a log file
somewhere?

  couple more kernel config-related questions coming shortly ...

rday

-- 

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

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can i tell which default kernel config OE started with?
  2016-05-03 13:12   ` Robert P. J. Day
@ 2016-05-03 14:39     ` Bruce Ashfield
  2016-05-03 15:13       ` Robert P. J. Day
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Ashfield @ 2016-05-03 14:39 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

[-- Attachment #1: Type: text/plain, Size: 3902 bytes --]

On Tue, May 3, 2016 at 9:12 AM, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

> On Tue, 3 May 2016, Bruce Ashfield wrote:
>
> >
> >
> > On Tue, May 3, 2016 at 6:53 AM, Robert P. J. Day <rpjday@crashcourse.ca>
> wrote:
> >
> >         (actually, working in wind river linux but i suspect the answer
> will
> >       be the same.)
> >
> >         i've defined a target board and, rather than supplying a full
> >       "defconfig" file as a starting point for kernel configuration, my
> BSP
> >       layer starts by applying a "kernel_baseline.cfg" file which
> contains
> >       only a couple hundred settings that i am particularly interested
> in.
> >
> >         so, given that, how can i tell what OE chose as a starting point
> for
> >       a .config file before beginning to apply my kernel config
> fragments?
> >       i'm poking around in the log files of the build, but i can't seem
> to
> >       see where the "configme" process selects a starting point. am i
> just
> >       missing the obvious? i want to see the .config file *before* any
> of my
> >       fragments are applied.
> >
> >
> > If you haven't specified a defconfig (in-tree, or in your layer),
> > and are only using fragments, then it will be the first fragment.
> > There's no logic to go out and find a baseline, since it would
> > almost always not be what someone wanted.
>
>   ok, i'm going to ask a few follow-up questions since i clearly don't
> totally understand the full kernel configuration process.
>
>
That's because it varies a bit, based on the kernel and options :)


>   i have a BSP layer for a target board that first specifies a
> "kernel_baseline.cfg" fragment file which contains just those kernel
> config settings i want to make sure are set, and that file is just
> over 200 lines long. i also drag in a few other *very* short .cfg
> files. but in the end, the .config file generated under
> .../linux-windriver/4.1-r0/linux-cxii-standard-build/ is almost 2,200
> lines long. where did all that extra content come from?
>


The .config is always the setting for all reachable kernel options. Some
are set in fragments, or defconfigs, others are the result of  'select'
and defaults by the kernel itself, etc.

If you run savedefconfig, you can see the non default options that were
set.


>
>   i'm assuming (and i could be wrong here) that since i'm using the
> line:
>
> TARGET_SUPPORTED_KTYPES = "standard"
>
> i'm automatically incorporating "standard"-related content under
> .../kernel-meta/ktypes/standard? as in, the files:
>
>   * standard.cfg
>   * standard.scc
>
> or am i mistaken? from where comes all that additional content that
> ends up in the final .config?  is there a record of it in a log file
> somewhere?
>

If you are not supplying a defconfig, and are inheriting the standard
kernel options, then yes, you'd be getting those fragments as well.

You can look in the work-shared/ .. kernel-source/.kernel-meta/ directory
for the meta-series (if using linux-yocto derived kernels), and that will
reference
everything that was used to configure and patch the kernel. If it isn't in
there,
it was a default or select by the kernel itself.

Bruce


>
>   couple more kernel config-related questions coming shortly ...
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
>


-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 5941 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can i tell which default kernel config OE started with?
  2016-05-03 14:39     ` Bruce Ashfield
@ 2016-05-03 15:13       ` Robert P. J. Day
  2016-05-03 15:19         ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2016-05-03 15:13 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: OE Core mailing list

On Tue, 3 May 2016, Bruce Ashfield wrote:

> If you are not supplying a defconfig, and are inheriting the
> standard kernel options, then yes, you'd be getting those fragments
> as well.

  ah, this actually leads me into my next question -- what is magic
about a "defconfig" file that changes the normal processing?

  in the YP kernel dev manual, section 2.2.3, one reads:

"If you have a complete, working Linux kernel .config file you want to
use for the configuration, as before, copy that file to the
appropriate ${PN} directory in your layer's recipes-kernel/linux
directory, and rename the copied file to "defconfig". Then, add the
following lines to the linux-yocto .bbappend file in your layer:

     FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
     SRC_URI += "file://defconfig"

so the idea here is that a "defconfig" file is, in some sense, a
"complete, working" config file that requires no extra processing, is
that correct? does that mean that if you explicitly use a SRC_URI
"defconfig" reference, all that extra normal processing won't be done?

  also, that same section in the YP manual is slightly confusing -- if
your SRC_URI refers to a defconfig file *and* some .cfg fragment
files, is it necessarily true that the defconfig file is consulted
first (no matter where it shows up in SRC_URI), after which all .cfg
files are applied on top of that in order? it's not entirely clear
from the manual if that's what happens.

  predictably, a couple more kernel config questions coming ...

rday

-- 

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

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can i tell which default kernel config OE started with?
  2016-05-03 15:13       ` Robert P. J. Day
@ 2016-05-03 15:19         ` Bruce Ashfield
  2016-05-03 15:36           ` Robert P. J. Day
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Ashfield @ 2016-05-03 15:19 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

[-- Attachment #1: Type: text/plain, Size: 3189 bytes --]

On Tue, May 3, 2016 at 11:13 AM, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

> On Tue, 3 May 2016, Bruce Ashfield wrote:
>
> > If you are not supplying a defconfig, and are inheriting the
> > standard kernel options, then yes, you'd be getting those fragments
> > as well.
>
>   ah, this actually leads me into my next question -- what is magic
> about a "defconfig" file that changes the normal processing?\
>

It's the existing kernel.bbclass mechanism, and a well known convention
used in the kernel. So it is used to trigger the core kernel configuration,
and when I was extending things for kernel fragments it was similarly used
as a sentinel value.


>
>   in the YP kernel dev manual, section 2.2.3, one reads:
>
> "If you have a complete, working Linux kernel .config file you want to
> use for the configuration, as before, copy that file to the
> appropriate ${PN} directory in your layer's recipes-kernel/linux
> directory, and rename the copied file to "defconfig". Then, add the
> following lines to the linux-yocto .bbappend file in your layer:
>
>      FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>      SRC_URI += "file://defconfig"
>
> so the idea here is that a "defconfig" file is, in some sense, a
> "complete, working" config file that requires no extra processing, is
> that correct? does that mean that if you explicitly use a SRC_URI
> "defconfig" reference, all that extra normal processing won't be done?
>

Nope. Everything is still processed, the kernel version you are using,
patches, etc, all make a difference to what ends up in the .config. The
phrasing there is to point out that it is what the mainline kernel considers
a defconfig, and it is typically a complete configuration of the kernel
(that
is expected to boot your target).


>
>   also, that same section in the YP manual is slightly confusing -- if
> your SRC_URI refers to a defconfig file *and* some .cfg fragment
> files, is it necessarily true that the defconfig file is consulted
> first (no matter where it shows up in SRC_URI), after which all .cfg
> files are applied on top of that in order? it's not entirely clear
> from the manual if that's what happens.
>

Yep. If you mix the two techniques, the defconfig is first (and taken
as the settings), and then fragments are applied on top.

Note: There are some changes in defconfig that are related to features
I'm doing for the fall 2.2 release, but nothing that changes the basic
processing (so compatibility is maintained).

Bruce


>
>   predictably, a couple more kernel config questions coming ...
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
>


-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 4730 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can i tell which default kernel config OE started with?
  2016-05-03 15:19         ` Bruce Ashfield
@ 2016-05-03 15:36           ` Robert P. J. Day
  0 siblings, 0 replies; 7+ messages in thread
From: Robert P. J. Day @ 2016-05-03 15:36 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: OE Core mailing list

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

On Tue, 3 May 2016, Bruce Ashfield wrote:

> On Tue, May 3, 2016 at 11:13 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>         also, that same section in the YP manual is slightly
>       confusing -- if your SRC_URI refers to a defconfig file *and*
>       some .cfg fragment files, is it necessarily true that the
>       defconfig file is consulted first (no matter where it shows up
>       in SRC_URI), after which all .cfg files are applied on top of
>       that in order? it's not entirely clear from the manual if
>       that's what happens.
>
>
> Yep. If you mix the two techniques, the defconfig is first (and
> taken as the settings), and then fragments are applied on top.

  yeah, that's not terrifically clear from that section in the manual,
Section 2.2.3, in the Note therein:

"The build system applies the configurations from the defconfig file
before applying any subsequent configuration fragments."
                    ^^^^^^^^^^

  the use of the word "subsequent" suggests an ordering and is
potentially misleading.

rday

-- 

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-03 15:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03 10:53 how can i tell which default kernel config OE started with? Robert P. J. Day
2016-05-03 12:28 ` Bruce Ashfield
2016-05-03 13:12   ` Robert P. J. Day
2016-05-03 14:39     ` Bruce Ashfield
2016-05-03 15:13       ` Robert P. J. Day
2016-05-03 15:19         ` Bruce Ashfield
2016-05-03 15:36           ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.