Question on the sequence conf file parsing. #yocto
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
Do
Bitbake -e busybox >& log
And look into log file it will show you the order
Quoted 28 lines · Yanmei via lists.yoctoproject.org
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.confand 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 ifBBLAYERScan 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: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi May,
maybe dynamic layers are a solution to your problem:
Regards,
Matthias
Quoted 17 lines · Yanmei via lists.yoctoproject.org
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.confand 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 ifBBLAYERScan 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: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 4 lines · Yanmei via lists.yoctoproject.org
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.confand 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 ifBBLAYERScan 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
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?
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
Quoted 12 lines · Yanmei via lists.yoctoproject.org
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: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
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.
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
Quoted 4 lines · Yanmei via Lists.Yoctoproject.Org
Can you explain a bit more on separate build configurations?
We are using multi-config to separate the build configuration. However the
local.confandbblayers.confare 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.
Quoted 1 line
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