Scope of the build parameters #systemd
Hi everyone,
I'm wondering how to figure out the scope of a set of parameters. Example. I have an Image (my-core-image-minimal.bb) recipe containing the following parameters
Quoted 13 lines
###########
# systemd # ########### inherit s ystemd DISTRO_FEATURES_append = " systemd " DISTRO_FEATURES_BACKFILL_CONSIDERED += " sysvinit " VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains(" DISTRO_FEATURES ", " systemd ", " + 4096 ", "" ,d)}"
SystemD isn't deployed in my image as the init_manager. Now, I put the parameters into local.conf
Quoted 13 lines
###########
# systemd # ########### INHERIT += " systemd " DISTRO_FEATURES_append = " systemd " DISTRO_FEATURES_BACKFILL_CONSIDERED += " sysvinit " VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains(" DISTRO_FEATURES ", " systemd ", " + 4096 ", "" ,d)}"
It works!!!!
I'm confused because my comprehension is when I run bitbake my-core-image-minimal , the parameters defined in this image are defined at the top level of the bitbake configuration parameters no?
Seriously, I have a lots of difficulties understanding the scope of a parameter, where to put it. At the limit, my comprehension is that I can have two recipes:
* my-core-image-minimal-sysvinit.bb
* my-core-image-minimal-systemd.bb
The systemd one define the systemd parameters, the sysvinit doesn't implement anything else.
What does I miss?
Thank you all :)
Martin
Hi Martin,
its Yocto chant #1: "Recipe data is local, configuration data is global."
Means: whatever happens in a recipe, other recipes can't see it. Whatever happens in a configuration file (local, machine, distro), it is visible everywhere. An image is just a recipe, in the end - so whatever you do there, it cannot affect the distribution. In a nutshell: you can't set DISTRO_FEATURES in an image.
Greetz
Quoted 68 lines · Martin Leduc via lists.yoctoproject.org
Hi everyone,
I'm wondering how to figure out the scope of a set of parameters. Example. I have an Image (my-core-image-minimal.bb) recipe containing the following parameters
###########
# systemd # ########### inherit systemd DISTRO_FEATURES_append = " systemd " DISTRO_FEATURES_BACKFILL_CONSIDERED += " sysvinit " VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "" ,d)}"SystemD isn't deployed in my image as the
init_manager. Now, I put the parameters into local.conf###########
# systemd # ########### INHERIT += " systemd " DISTRO_FEATURES_append = " systemd " DISTRO_FEATURES_BACKFILL_CONSIDERED += " sysvinit " VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "" ,d)}"It works!!!!
I'm confused because my comprehension is when I run bitbake my-core-image-minimal , the parameters defined in this image are defined at the top level of the bitbake configuration parameters no?
Seriously, I have a lots of difficulties understanding the scope of a parameter, where to put it. At the limit, my comprehension is that I can have two recipes:
- my-core-image-minimal-sysvinit.bb
- my-core-image-minimal-systemd.bbThe systemd one define the systemd parameters, the sysvinit doesn't implement anything else.
What does I miss?
Thank you all :)
Martin-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
You automatically follow any topics you start or reply to. View/Reply Online (#58477):
https://lists.yoctoproject.org/g/yocto/message/58477
Mute This Topic: https://lists.yoctoproject.org/mt/94791874/4689568
Mute #systemd:https://lists.yoctoproject.org/g/yocto/mutehashtag/systemd Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Private: Re: [yocto] Scope of the build parameters #systemd
Re-adding list, as I think this is valid information for all Yocto users.
Quoted 2 lines · martin.leduc via lists.yoctoproject.org
Ok, I get that. If
DISTRO_FEATURESis settable only into local.conf, what are the other variables valid into the local.conf only?
No, thats not how it works. Its like this:
- if the variable is supposed to only have an effect within the very bb file that you are looking at then it can stay in the recipe
- if the variable is supposed to affect something else, it needs to go into a configuration file.
This is is not tied to specific variable names or such. It is purely about the visibility.
Greetz,
Josef
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Private: Re: [yocto] Private: Re: [yocto] Scope of the build parameters #systemd
Again re-adding list....
Quoted 7 lines · martin.leduc via lists.yoctoproject.org
Per example, in poky/meta... I found the core-image-minimal.bb (bitbake core-image-minimal), pulling on the core-image.bbclass, pulling on images.bbclass by using the inherit keyword.
Then, I will have a bigIMAGE_INSTALLvariable content to build and their dependencies from local.conf + all the other image/bbclass recipes joined by the inherit keyword is that correct?.
I encourage you to look at and understand the evaluation for yourself by issuing "bitbake-getvar -r core-image-minimal IMAGE_INSTALL"
Greetz,
Josef