Yocto override syntax change.
Patrick Williams
patrick at stwcx.xyz
Sat Aug 7 00:19:59 AEST 2021
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.py
You 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.
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20210806/12d9a3c6/attachment-0001.sig>
More information about the openbmc
mailing list