The Yocto Project has made critical changes in the Honister release (3.4). This post details two changes that impact a FoundriesFactory:
- Override syntax
- Directory structure for tune files.
A future Linux microPlatform version will be released based on Honister. These changes do not impact the current version (v85). By knowing what to expect in future Linux microPlatform versions, plans can be made to ease the transition.
Yocto Linux Recipies: Override Syntax
The syntax of the override operation from underline (_
) to a colon (:
) This way, an override operation is visually differentiated from a variable created with a mix of uppercase and lowercase separated by one character.
Tip: When using the new override syntax, make sure to use CONF_VERSION = "2"
in <build-dir>/conf/local.conf
.
The table below shows some common use cases for overrides, with their syntactical change.
Before | After |
---|---|
SRC_URI_append | SRC_URI:append |
SRC_URI_remove | SRC_URI:remove |
SRC_URI_prepend | SRC_URI:prepend |
SRC_URI_machine | SRC_URI:machine |
EXTRA_OEMAKE_machine | EXTRA_OEMAKE:machine |
FILESEXTRAPATHS_prepend | FILESEXTRAPATHS:prepend |
It also applies to the append
of a function from a .bbappend file. For example:
Before | After |
---|---|
do_install_append() { //instructions } | do_install:append() { //instructions } |
The community provides a script to help with the migration, available in the openembedded-core
repository. The instructions on howto use the script is shown in the following command lines:
cd <factory>/layers
./openembedded-core/scripts/contrib/convert-overrides.py meta-subscriber-overrides/
cd meta-subscriber-overrides/
git diff --word-diff
The script should be used to ease the migration process, but remember to review the changes and perform tests to make sure there is no abnormal behavior. The script may not convert a line when there are two overrides, for example PREFERRED_PROVIDER_virtual/kernel:<machine>:lmp
, another example is SRC_URI:append:<my-machine>
.
In instances where a variable name has mixed case and underline, for example SRC_URI_extra
is a new variable and not an override. This variable is in use when a package requires a fetch from two or more sources, where it is common to create a new variable for them.
Tip: Search for any _machine
occurrence in your FoundriesFactory to make sure the needed ones are converted to :machine
instead (replacing machine
with your machine name).
Some terms to search during the convert process:
_append
,append_
_prepend
,prepend_
_<machine>
,<machine>_
_<soc-family>
,<soc-family>_
_sota
,sota_
_lmp
,lmp_
Yocto's Effect on Core Tune Files
The tune files were reorganized into a directory structure where the files are organized by architecture. It impacts any machine defined in a FoundriesFactory which includes a tune file.
When using the old file location, a BitBake error message, ParseError
is printed, with a Could not include required file
log. It is only a matter of finding the new directory for that file. For example, the file tune-cortexa53.inc
has changed from openembedded-core/meta/conf/machine/include/tune-cortexa53.inc
to openembedded-core/meta/conf/machine/include/arm/armv8a/tune-cortexa53.inc
Yocto Effect's on User Password Definition
Starting with Honister, it is not possible to assign a plain text password to a user (the parameter --clear-password
does not work). When using LmP, the variable LMP_PASSWORD
is set in the file meta-lmp-base/conf/distro/include/lmp.inc
.
To define a different password, from the build host:
mkpasswd -m sha512crypt password
It is important to escape any $
characters from the generated hash, and the sha512crypt
method is recommended. In case another method is preferred, the appropriate library must be installed to the image.
Yocto Release & Recipe References
Email with the proposal for the syntax override change: https://lists.openembedded.org/g/openembedded-architecture/message/1279
The BitBake commit for the syntax override change: https://github.com/openembedded/bitbake/commit/7dcf317cc141dc980634f8c18bfa84f83e57206a
The BitBake description, before and after the change:
Conditional Syntax Overrides https://docs.yoctoproject.org/bitbake/1.52/bitbake-user-manual/bitbake-user-manual-metadata.html#conditional-syntax-overrides
Migration information for moving to honister https://docs.yoctoproject.org/migration-guides/migration-3.4.html
Script to help with the conversion is included by this commit: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/scripts/contrib/convert-overrides.py?id=82c1581e4824a778915c1e1fed23851b84fd7cd3
Change of the tune files: http://cgit.openembedded.org/openembedded-core/commit/meta/conf/machine/include/arm?id=b6f15209bcfff953cce69da97a93f9ddff141ced
The support for clear password being dropped: http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/shadow?id=759df7395908f18b3b68f28d043ac9ebd42dd0c8