Yocto Project Discussions
 help / color / mirror / Atom feed
* Question on the sequence conf file parsing.  #yocto
@ 2024-09-26  3:09 Guo, Yanmei
  2024-09-26  3:16 ` [yocto] " Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Guo, Yanmei @ 2024-09-26  3:09 UTC (permalink / raw)
  To: yocto

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

Hi Yoctoers,

Trying to understand the sequence of conf file parsing when bitbake is running a build.
As a typical yocto project, we generally have local.conf, bblayers.conf, multiconfig/xxx.conf and distro.conf etc,
serving for different purposes. Is there a defined sequence in terms of which conf file is parsed first, which is last?
Especally, I am interested to know if `BBLAYERS` can be appended conditionally depending on a variable defined in a multiconfig file.

Thanks very much!

-May

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

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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-09-26  3:09 Question on the sequence conf file parsing. #yocto Guo, Yanmei
@ 2024-09-26  3:16 ` Khem Raj
  2024-09-26  7:55 ` Matthias Schoepfer
  2024-09-26  9:49 ` Alexander Kanavin
  2 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2024-09-26  3:16 UTC (permalink / raw)
  To: yocto, yanmei.guo

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

Do

Bitbake -e busybox >& log

And look into log file it will show you the order

On Wed, Sep 25, 2024 at 8:09 PM Guo, Yanmei via lists.yoctoproject.org
<yanmei.guo=boeing.com@lists.yoctoproject.org> wrote:

> Hi Yoctoers,
>
> Trying to understand the sequence of conf file parsing when bitbake is
> running a build.
> As a typical yocto project, we generally have local.conf, bblayers.conf,
> multiconfig/xxx.conf and distro.conf etc,
> serving for different purposes. Is there a defined sequence in terms of
> which conf file is parsed first, which is last?
> Especally, I am interested to know if `BBLAYERS` can be appended
> conditionally depending on a variable defined in a multiconfig file.
>
> Thanks very much!
>
> -May
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#63887):
> https://lists.yoctoproject.org/g/yocto/message/63887
> Mute This Topic: https://lists.yoctoproject.org/mt/108661552/1997914
> Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

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

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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-09-26  3:09 Question on the sequence conf file parsing. #yocto Guo, Yanmei
  2024-09-26  3:16 ` [yocto] " Khem Raj
@ 2024-09-26  7:55 ` Matthias Schoepfer
  2024-09-26  9:49 ` Alexander Kanavin
  2 siblings, 0 replies; 9+ messages in thread
From: Matthias Schoepfer @ 2024-09-26  7:55 UTC (permalink / raw)
  To: yocto

Hi May,

maybe dynamic layers are a solution to your problem:

https://docs.yoctoproject.org/ref-manual/variables.html?highlight=bbfiles_dynamic#term-BBFILES_DYNAMIC

Regards,

    Matthias

On 9/26/24 05:09, Guo, Yanmei via lists.yoctoproject.org wrote:
> Hi Yoctoers,
> Trying to understand the sequence of conf file parsing when bitbake is 
> running a build.
> As a typical yocto project, we generally have local.conf, 
> bblayers.conf, multiconfig/xxx.conf and distro.conf etc,
> serving for different purposes. Is there a defined sequence in terms 
> of which conf file is parsed first, which is last?
> Especally, I am interested to know if `BBLAYERS` can be appended 
> conditionally depending on a variable defined in a multiconfig file.
> Thanks very much!
> -May
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#63887): https://lists.yoctoproject.org/g/yocto/message/63887
> Mute This Topic: https://lists.yoctoproject.org/mt/108661552/3618420
> Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [matthias.schoepfer@googlemail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-09-26  3:09 Question on the sequence conf file parsing. #yocto Guo, Yanmei
  2024-09-26  3:16 ` [yocto] " Khem Raj
  2024-09-26  7:55 ` Matthias Schoepfer
@ 2024-09-26  9:49 ` Alexander Kanavin
  2024-09-27  2:59   ` Guo, Yanmei
  2024-10-10  3:45   ` Guo, Yanmei
  2 siblings, 2 replies; 9+ messages in thread
From: Alexander Kanavin @ 2024-09-26  9:49 UTC (permalink / raw)
  To: yocto, yanmei.guo

On Thu, 26 Sept 2024 at 05:09, Guo, Yanmei via lists.yoctoproject.org
<yanmei.guo=boeing.com@lists.yoctoproject.org> wrote:
> Trying to understand the sequence of conf file parsing when bitbake is running a build.
> As a typical yocto project, we generally have local.conf, bblayers.conf, multiconfig/xxx.conf and distro.conf etc,
> serving for different purposes. Is there a defined sequence in terms of which conf file is parsed first, which is last?
> Especally, I am interested to know if `BBLAYERS` can be appended conditionally depending on a variable defined in a multiconfig file.

It cannot. Perhaps it would help if you explain the use case. Why do
you need to include a layer (or not) depending on some variable? What
would happen if you simply always include it? Can you create two
separate build configurations, one with the layer, and another
without?

Generally it's a sign of badly written layer if merely including it
causes unwanted side effects, and that's the problem that should be
addressed.

Alex


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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-09-26  9:49 ` Alexander Kanavin
@ 2024-09-27  2:59   ` Guo, Yanmei
  2024-09-27  3:20     ` ChenQi
  2024-10-10  3:45   ` Guo, Yanmei
  1 sibling, 1 reply; 9+ messages in thread
From: Guo, Yanmei @ 2024-09-27  2:59 UTC (permalink / raw)
  To: Alexander Kanavin, yocto

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

We use multiconfig as our seperate build management so that we can reuse some build component but have different configurations.

It looks like BBLAYERS can't be appended in multconfig.conf?   So between multiconfigurations, they have to share the same BBLAYERS?

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

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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-09-27  2:59   ` Guo, Yanmei
@ 2024-09-27  3:20     ` ChenQi
  2024-10-10  3:48       ` Guo, Yanmei
  0 siblings, 1 reply; 9+ messages in thread
From: ChenQi @ 2024-09-27  3:20 UTC (permalink / raw)
  To: yocto, yanmei.guo, Alexander Kanavin

Merely adding layers to BBLAYERS changes nothing as long as those layers 
are yocto compliant. See yocto-check-layer-wrapper. In such case, 
sharing the same BBLAYERS should have no negative impact. If that's not 
the case, use yocto-check-layer-wrapper and fix the layer.

Regards,
Qi

On 9/27/24 10:59, Guo, Yanmei via lists.yoctoproject.org wrote:
> We use multiconfig as our seperate build management so that we can 
> reuse some build component but have different configurations.
> It looks like BBLAYERS can't be appended in multconfig.conf?  So 
> between multiconfigurations, they have to share the same BBLAYERS?
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#63900): https://lists.yoctoproject.org/g/yocto/message/63900
> Mute This Topic: https://lists.yoctoproject.org/mt/108661552/7304865
> Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [Qi.Chen@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>



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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-09-26  9:49 ` Alexander Kanavin
  2024-09-27  2:59   ` Guo, Yanmei
@ 2024-10-10  3:45   ` Guo, Yanmei
  2024-10-10 11:38     ` Alexander Kanavin
  1 sibling, 1 reply; 9+ messages in thread
From: Guo, Yanmei @ 2024-10-10  3:45 UTC (permalink / raw)
  To: Alexander Kanavin, yocto

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

Hi Alex,

Can you explain a bit more on separate build configurations?

We are using multi-config to separate the build configuration. However the `local.conf` and `bblayers.conf` are shared across.
unless you are suggesting complete new build (new local.conf and bblayers) not sharing anything in common.

In addition, is there a recommended way to manage debug/release build in which case they share common configurations but also varies in lots of areas.

Thanks,
Mei

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

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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-09-27  3:20     ` ChenQi
@ 2024-10-10  3:48       ` Guo, Yanmei
  0 siblings, 0 replies; 9+ messages in thread
From: Guo, Yanmei @ 2024-10-10  3:48 UTC (permalink / raw)
  To: Chen Qi, yocto

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

Adding layer can cause some unintended effects.
Taken recipes-kernel for example, if some layers being added eg meta-virtualization, bbappend will be applied to the kernel.
We might end up with some unexpected kernel feature being switched on.

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

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

* Re: [yocto] Question on the sequence conf file parsing. #yocto
  2024-10-10  3:45   ` Guo, Yanmei
@ 2024-10-10 11:38     ` Alexander Kanavin
  0 siblings, 0 replies; 9+ messages in thread
From: Alexander Kanavin @ 2024-10-10 11:38 UTC (permalink / raw)
  To: yanmei.guo; +Cc: yocto

On Thu, 10 Oct 2024 at 05:45, Guo, Yanmei via Lists.Yoctoproject.Org
<yanmei.guo=boeing.com@lists.yoctoproject.org> wrote:
> Can you explain a bit more on separate build configurations?
>
> We are using multi-config to separate the build configuration. However the `local.conf` and `bblayers.conf` are shared across.
> unless you are suggesting complete new build (new local.conf and bblayers) not sharing anything in common.

Yes, I'm suggesting exactly that. There are standard mechanisms
(configuration templates) that allow you to save and maintain these
files directly inside the layers, and initialize the build/ directory
using them.

> In addition, is there a recommended way to manage debug/release build in which case they share common configurations but also varies in lots of areas.

First, you should carefully consider if you need separate
debug/release builds at all. What would differ between them? Can you
achieve the same thing in a single build by having different image
recipes with their own set of packages and image tweaks? Can you
configure your software to make those decisions at runtime when it
starts (e.g. decide to run 'debug' or 'release' mode depending on what
is written into a target configuration file)?

If you do need two different builds (which will double the load on
your CI), then you should make two different distributions. They need
not be entirely separate: they can share almost everything in a common
.inc, and only a few tweaks in the top level distro.conf file. Then
local.conf only needs to set DISTRO to choose one or the other.

Alex


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

end of thread, other threads:[~2024-10-10 11:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26  3:09 Question on the sequence conf file parsing. #yocto Guo, Yanmei
2024-09-26  3:16 ` [yocto] " Khem Raj
2024-09-26  7:55 ` Matthias Schoepfer
2024-09-26  9:49 ` Alexander Kanavin
2024-09-27  2:59   ` Guo, Yanmei
2024-09-27  3:20     ` ChenQi
2024-10-10  3:48       ` Guo, Yanmei
2024-10-10  3:45   ` Guo, Yanmei
2024-10-10 11:38     ` Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox