Sometimes it is necessary in the OpenEmbedded build system to extend
MACHINE_FEATURES
or DISTRO_FEATURES
to control functionality that was previously enabled and not able
to be disabled.
For these cases, we need to add an
additional feature item to appear in one of these variables,
but we do not want to force developers who have existing values
of the variables in their configuration to add the new feature
in order to retain the same overall level of functionality.
Thus, the OpenEmbedded build system has a mechanism to
automatically "backfill" these added features into existing
distro or machine configurations.
You can see the list of features for which this is done by
finding the
DISTRO_FEATURES_BACKFILL
and MACHINE_FEATURES_BACKFILL
variables in the meta/conf/bitbake.conf
file.
Because such features are backfilled by default into all
configurations as described in the previous paragraph, developers
who wish to disable the new features need to be able to selectively
prevent the backfilling from occurring.
They can do this by adding the undesired feature or features to the
DISTRO_FEATURES_BACKFILL_CONSIDERED
or MACHINE_FEATURES_BACKFILL_CONSIDERED
variables for distro features and machine features respectively.
Here are two examples to help illustrate feature backfilling:
The "pulseaudio" distro feature option:
Previously, PulseAudio support was enabled within the Qt and
GStreamer frameworks.
Because of this, the feature is backfilled and thus
enabled for all distros through the
DISTRO_FEATURES_BACKFILL
variable in the meta/conf/bitbake.conf
file.
However, your distro needs to disable the feature.
You can disable the feature without affecting
other existing distro configurations that need PulseAudio support
by adding "pulseaudio" to
DISTRO_FEATURES_BACKFILL_CONSIDERED
in your distro's .conf
file.
Adding the feature to this variable when it also
exists in the DISTRO_FEATURES_BACKFILL
variable prevents the build system from adding the feature to
your configuration's DISTRO_FEATURES
, effectively disabling
the feature for that particular distro.
The "rtc" machine feature option:
Previously, real time clock (RTC) support was enabled for all
target devices.
Because of this, the feature is backfilled and thus enabled
for all machines through the MACHINE_FEATURES_BACKFILL
variable in the meta/conf/bitbake.conf
file.
However, your target device does not have this capability.
You can disable RTC support for your device without
affecting other machines that need RTC support
by adding the feature to your machine's
MACHINE_FEATURES_BACKFILL_CONSIDERED
list in the machine's .conf
file.
Adding the feature to this variable when it also
exists in the MACHINE_FEATURES_BACKFILL
variable prevents the build system from adding the feature to
your configuration's MACHINE_FEATURES
, effectively
disabling RTC support for that particular machine.