Skip to main content
Version: scarthgap_2-x

Flavours features cross-check

In flavours layers, to avoid mis-configuration with the customization, there will be a file called *-features.conf, where * is the special character meaning that any file ending with -features.conf is accepted. This file it's used to cross-check the configuration set in local.conf to avoid issues with flavours. This action is executed after the local.conf has been populated with all of the settings configured and customized.

There are 4 scenarios:

  1. a variable is set in local.conf and not set in *-features.conf: no actions are taken.
  2. a variable is not set in local.conf and set in *-features.conf: no actions are taken.
  3. a variable is set in both local.conf and *-features.conf with the same value: the variable is removed from local.conf and preserved in *-features.conf and a warning is raised.
  4. a variable is set in both local.conf and *-features.conf with different values: the configurator throws an error as there is a configuration that is not correct for the selected flavour.

The content of a *-features.conf file is a list of Yocto variables (comments are allowed). For example:

# CleaOS Things flavour mandatory settings
TEST = "var"
VAR = "test"
...

As an example, assume that the user is building for Seco E09 with Things flavour. The feature file in meta-seco-clea-os-things is called clea-os-things-features.conf and the content (only for example purpose) is:

# CleaOS Things flavour mandatory settings
BB_NICE_LEVEL = "1"

By default, the build environment is create setting in the local.conf BB_NICE_LEVEL = "1". In this case the variable in local.conf is removed and a warning is raised:

yoctouser@09e7c6ca7847:~/workdir/migration-to-scarthgap-clean$ . ./seco-setup.sh -c
WARNING: no CONFIG_CLOUD_ASTARTE-URL found in the configuration.
WARNING: no CONFIG_CLOUD_ASTARTE-REALM found in the configuration.
WARNING: no CONFIG_CLOUD_ASTARTE-PAIRING-TOKEN found in the configuration.
WARNING: no RAUC found in the configuration.
Feature variable: 'BB_NICE_LEVEL' already exists with the same value in the flavour's features file.
Removing the variable from the local.conf.

Welcome to SECO BSP

The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
http://www.openembedded.org/


Your build environment has been configured with:

MACHINE=seco-rk3568-e09
SDKMACHINE=i686
DISTRO=clea-os-fb-things
EULA=

No post-script has been found in the layer meta-seco-clea-os-things.
No post-script has been found in the layer meta-seco-rk.
yoctouser@09e7c6ca7847:~/workdir/migration-to-scarthgap-clean/build_e09$

Changing the value of the variable in clea-os-things-features.conf to:

# CleaOS Things flavour mandatory settings
BB_NICE_LEVEL = "2"

recreating the build environment raises an error:

yoctouser@09e7c6ca7847:~/workdir/migration-to-scarthgap-clean$ rm -rf build_e09/
yoctouser@09e7c6ca7847:~/workdir/migration-to-scarthgap-clean$ . ./seco-setup.sh -c
WARNING: no CONFIG_CLOUD_ASTARTE-URL found in the configuration.
WARNING: no CONFIG_CLOUD_ASTARTE-REALM found in the configuration.
WARNING: no CONFIG_CLOUD_ASTARTE-PAIRING-TOKEN found in the configuration.
WARNING: no RAUC found in the configuration.
Feature mismatch: 'BB_NICE_LEVEL' exists in both local.conf and flavour's features file with different values: '1' (local.conf) vs. '2' (features file).
ERROR: build configurator failed.

Traceback (most recent call last):
File "/home/yoctouser/workdir/migration-to-scarthgap-clean/layers/base/seco-build-configurator/src/seco_setup.py", line 89, in main
sse.environment_manager(args.cwd,
File "/home/yoctouser/workdir/migration-to-scarthgap-clean/layers/base/seco-build-configurator/src/seco_setup_environment.py", line 421, in environment_manager
ssc.local_conf_sanity_check(build_dir)
File "/home/yoctouser/workdir/migration-to-scarthgap-clean/layers/base/seco-build-configurator/src/seco_setup_conf.py", line 327, in local_conf_sanity_check
sys.exit(1)
SystemExit: 1

No post-script has been found in the layer meta-seco-clea-os-things.
No post-script has been found in the layer meta-seco-rk.