7

I am building image for NXP board using yocto. I could see different distros say "x11, wayland, fb, directfb" etc.

In the conf files for these distros I could see "DISTRO_FEATURES_remove" of other distros. Say in x11 distro conf file "DISTRO_FEATURES_remove="wayland"" is there.

I need to check what features provided by each distro. Say I need to check the features provided by wayland and x11 distros.

Can you guide to check in yocto source folder for the features provided by these distros.

Ravi A
  • 421
  • 2
  • 9
  • 21

1 Answers1

14

I think you are asking, "how do I know what's in DISTRO_FEATURES for a given distro?" If so, DISTRO_FEATURES is a variable that is set in a configuration and loaded/overloaded as needed to drive contents you want to add to your system. Various recipes check the contents of DISTRO_FEATURES to enable/disable different features. You can do the same to test as needed.

For example, some recipes may use the following to check to see if the configuration has enabled a features. Our custom linux kernel recipe uses the following to specify specific configuration files for the recipe.

{@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'file://bluetooth.cfg', '', d)} \

Generically, you turn features on or off by specifying contents for DISTRO_FEATURES on your own.

https://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html#var-DISTRO_FEATURES

If you need to see the contents of DISTRO_FEATURES from the command line

bitbake -e imagename | grep "^DISTRO_FEATURES"
Peter Buelow
  • 448
  • 3
  • 10
  • Thanks for the reply. If we want to enable a feature for the distro then how we will know the feature name? Say the feature name is "bluetooth" or "bluez5". If we want to select a feature for the distro then that should be supported by yocto. How to know that the feature is alreary supported so that I can select that feature for the distro? – Ravi A Aug 27 '18 at 12:35
  • I guess it depends on what you are adding. However, DISTRO_FEATURES is just a space separated list of strings. It is used by querying the list for a string your recipe or another recipe or class would then use to enable/disable some specific part of that recipe or class. Usage depends on need here. – Peter Buelow Aug 27 '18 at 12:38
  • Minor thing that tripped me up briefly - that `{@bb.utils...` line probably should have a leading `$` - i.e. `${@bb.utils...` if used in `SRC_URI`. – davidA Sep 29 '22 at 21:36