Yocto override syntax change.
Hello,
TL;DR: There is a required change to all meta-layers by Wednesday August 11, 2021 at 1PM UTC. Any meta-layer not changed by that time may no longer compile.
There is a major change to the upstream Yocto syntax that requires use to do a modification to the majority of our recipes and Yocto config files. We will not be able to perform another Yocto upgrade until this work is complete on our part.
Yocto has an override syntax that is often used for machine and distro-specific variable modification. The previous syntax was something like:
PACKAGECONFIG_append_machine = " pkgfeature"
This is being changed so that colons are used as override separators instead of underscores:
PACKAGECONFIG:append:machine = " pkgfeature"
In the current bitbake we have in master there is support for both syntaxes, because the code simply does a s/:/_/ in variable processing, but the next bitbake/Yocto pull will remove support for the underscore syntax and all usage of it will be broken. Again, until we make this change, we cannot pick up Yocto updates because our current override syntax usage is no longer supported.
Upstream has provided a script to help facilitate this transition but I am finding that it does not catch every case and some additional help is needed.
---- Fix-up procedure and tips ----
The helper script is in the poky repository at:
scripts/contrib/convert-overrides.py
This can be obtained either by cloning or downloading directly:
$ git clone git://git.yoctoproject.org/poky
$ wget https://git.yoctoproject.org/cgit/cgit.cgi/poky/plain/scripts/contrib/convert-overrides.pyYou may then run this on your meta-layer:
$ path/to/convert-overrides.py meta-evb
After this, to find potential misses run the following grep:
$ git grep "_[a-z0-9_/-]*[ :]" -- meta-evb
In the meta-evb tree I observed a number of _evb-* and _u-boot* variables were missed. I fixed them like this:
$ git grep -l _evb -- meta-evb | xargs sed -i 's/_evb/:evb/'
$ git grep -l _u-boot -- meta-evb | xargs sed -i 's/_u-boot/:u-boot/'(There were a few other variables fixed up, but hopefully you get the pattern
after two.)
-----------------------------------
After this you will want to do a build of your machine(s). I would also recommend spot checking a few recipes with bitbake <recipe> -ne to ensure the overrides are applied as you expect.
I will be making changes to meta-evb, meta-aspeed, meta-phosphor, and meta-facebook shortly under the gerrit topic "override-syntax". Hopefully this gives a sufficient pattern for others to mimic over the next few days.
Signature · 1 line
Patrick Williams
On Fri, Aug 06, 2021 at 09:19:59AM -0500, Patrick Williams wrote:
A few more discoveries.
1. LAYERSERIES_COMPAT and BBFILE_PATTERN syntax still has an underscore.
LAYERSERIES_COMPAT_phosphor-layer <-- correct LAYERSERIES_COMPAT:phosphor-layer <-- incorrect.
If you were a little too aggressive at making this change (like me) you can fix it with:
$ git grep -l "LAYERSERIES_COMPAT:" meta-facebook | xargs sed -i 's/LAYERSERIES_COMPAT:/LAYERSERIES_COMPAT_/' $ git grep -l "BBFILE_PATTERN:" meta-facebook | xargs sed -i 's/BBFILE_PATTERN:/BBFILE_PATTERN_/'
2. local.conf.sample has changed slightly and CONF_VERSION needs to be incremented. The suggestion from upstream is to use your favorite diff-editor to compare the two such as:
$ vimdiff ./poky/meta-poky/conf/local.conf.sample meta-facebook/meta-tiogapass/conf/local.conf.sample
Except that we don't have this file updated until we do the subtree pull, so in the meantime you could compare against this version (use wget/curl):
http://git.yoctoproject.org/cgit/cgit.cgi/poky/plain/meta-poky/conf/local.conf.sample
3. LAYERSERIES_COMPAT will need "honister" added since that is the next Yocto release after hardknott.
Potential fixup:
$ git grep -l "LAYERSERIES_COMPAT_" meta-facebook | xargs sed -i 's/hardknott"/hardknott honister"/'
Signature · 1 line
Patrick Williams
I have the meta-layer fixes for aspeed, evb, phosphor, and facebook merged now and I think a few other companies have either merged their fixes or are close.
There are a few open commits in this seqeuence, but it should serve as a good base for further testing. You may cherry-pick your commit onto this one for local testing, but please don't push updates to it to Gerrit.
https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/45767
It looks like we need some minor fixes to meta-openpower/meta-ibm in order to get the bulk of the CI systems passing. We also need someone to do meta-nuvoton, which I don't think has been started, for a few others.
Feel free to add me to review on your meta changes (and add that 'override-syntax' topic) and I'll give them a quick review.
Signature · 1 line
Patrick Williams
Quoted 2 lines · Patrick Williams
TL;DR: There is a required change to all meta-layers by Wednesday August 11, 2021 at 1PM UTC. Any meta-layer not changed by that time may no longer compile.
This change is now merged into our branch. All of our machines listed in CI are able to build successfully. Many other machines have not yet been updated.
The following machines have had little to no effort since this email went out and do not even launch bitbake correctly anymore:
- centriq2400-rep
- dl360poc
- e3c246d4i
- ethanolx
- evb-zx3-pm3
- f0b
- fp5280g2
- g220a
- hr630
- hr855xg2
- kudo
- lanyang
- mtjade
- neptune
- nicole
- olympus
- olympus-nuvoton
- on6263m5
- quanta-q71l
- s2600wf
- stardragon4800-rep2
- thor
- x11spi
Any machine not updated by October 15, 2021, I will assume is unused and unsupported and will create commits for removal.
Signature · 1 line
Patrick Williams
Quoted 36 lines · Patrick Williams
Quoted 2 lines · Patrick Williams
TL;DR: There is a required change to all meta-layers by Wednesday August 11, 2021 at 1PM UTC. Any meta-layer not changed by that time may no longer compile.
This change is now merged into our branch. All of our machines listed in CI are able to build successfully. Many other machines have not yet been updated.
The following machines have had little to no effort since this email went out and do not even launch bitbake correctly anymore:
- centriq2400-rep
- dl360poc
- e3c246d4i
- ethanolx
- evb-zx3-pm3
- f0b
- fp5280g2
- g220a
- hr630
- hr855xg2
- kudo
- lanyang
- mtjade
- neptune
- nicole
- olympus
- olympus-nuvoton
- on6263m5
- quanta-q71l
- s2600wf
- stardragon4800-rep2
- thor
- x11spi
Quoted 5 lines
Any machine not updated by October 15, 2021, I will assume is unused and unsupported and will create commits for removal.
--
Patrick Williams
g220a is updated now
Signature · 2 lines
BRs, Lei YU
As previously communicated, the following list of machines are unbuildable and have been for 2 months now. The deadline for someone to fix them has elapsed and so I've now staged commits that will delete the following machines:
- centriq2400-req
- evb-zx3-pm3
- hr630
- hr855xg2
- lanyang
- neptune
- olympus
- stardragon4800-rep2
- thor
- x11spi
I will keep these commits open until October 18th and unless there is opposition to any of these commits will merge them after that. The commits can be found with the 'unbuildable-machine' hashtag in Gerrit:
https://gerrit.openbmc-project.xyz/q/hashtag:%2522unbuildable-machine%2522+status:open
Any machine not on the above list appears to have already been cleaned up.
Quoted 40 lines · Patrick Williams
Quoted 2 lines · Patrick Williams
TL;DR: There is a required change to all meta-layers by Wednesday August 11, 2021 at 1PM UTC. Any meta-layer not changed by that time may no longer compile.
This change is now merged into our branch. All of our machines listed in CI are able to build successfully. Many other machines have not yet been updated.
The following machines have had little to no effort since this email went out and do not even launch bitbake correctly anymore:
- centriq2400-rep
- dl360poc
- e3c246d4i
- ethanolx
- evb-zx3-pm3
- f0b
- fp5280g2
- g220a
- hr630
- hr855xg2
- kudo
- lanyang
- mtjade
- neptune
- nicole
- olympus
- olympus-nuvoton
- on6263m5
- quanta-q71l
- s2600wf
- stardragon4800-rep2
- thor
- x11spiAny machine not updated by October 15, 2021, I will assume is unused and unsupported and will create commits for removal.
Signature · 1 line
Patrick Williams
Signature · 1 line
Patrick Williams