This chapter provides a reference of shipped machine and distro features you can include as part of your image, a reference on image features you can select, and a reference on feature backfilling.
Features provide a mechanism for working out which packages should be
included in the generated images. Distributions can select which
features they want to support through the DISTRO_FEATURES variable,
which is set or appended to in a distribution’s configuration file such
poky-lsb.conf and so forth.
Machine features are set in the MACHINE_FEATURES variable, which is
set in the machine configuration file and specifies the hardware
features for a given machine.
These two variables combine to work out which kernel modules, utilities, and other packages to include. A given distribution can support a selected subset of features so some machine features might not be included if the distribution itself does not support them.
One method you can use to determine which recipes are checking to see if
a particular feature is contained or not is to
grep through the
Metadata for the feature. Here is an example that
discovers the recipes whose build is potentially changed based on a
$ cd poky $ git grep 'contains.*MACHINE_FEATURES.*feature'
11.1 Machine Features
The items below are features you can use with MACHINE_FEATURES. Features do not have a one-to-one correspondence to packages, and they can go beyond simply controlling the installation of a package or packages. Sometimes a feature can influence how certain recipes are built. For example, a feature might determine whether a particular configure option is specified within the do_configure task for a particular recipe.
This feature list only represents features as shipped with the Yocto Project metadata:
acpi: Hardware has ACPI (x86/x86_64 only)
alsa: Hardware has ALSA audio drivers
apm: Hardware uses APM (or APM emulation)
bluetooth: Hardware has integrated BT
efi: Support for booting through EFI
ext2: Hardware HDD or Microdrive
keyboard: Hardware has a keyboard
numa: Hardware has non-uniform memory access
pcbios: Support for booting through BIOS
pci: Hardware has a PCI bus
pcmcia: Hardware has PCMCIA or CompactFlash sockets
phone: Mobile phone (voice) support
qemu-usermode: QEMU can support user-mode emulation for this machine
qvga: Machine has a QVGA (320x240) display
rtc: Machine has a Real-Time Clock
screen: Hardware has a screen
serial: Hardware has serial support (usually RS232)
touchscreen: Hardware has a touchscreen
usbgadget: Hardware is USB gadget device capable
usbhost: Hardware is USB Host capable
vfat: FAT file system support
wifi: Hardware has integrated WiFi
11.2 Distro Features
The items below are features you can use with DISTRO_FEATURES to enable features across your distribution. Features do not have a one-to-one correspondence to packages, and they can go beyond simply controlling the installation of a package or packages. In most cases, the presence or absence of a feature translates to the appropriate option supplied to the configure script during the do_configure task for the recipes that optionally support the feature. Appropriate options must be supplied, and enabling/disabling PACKAGECONFIG for the concerned packages is one way of supplying such options.
Some distro features are also machine features. These select features make sense to be controlled both at the machine and distribution configuration level. See the COMBINED_FEATURES variable for more information.
DISTRO_FEATURES is normally independent of kernel configuration, so if a feature specified in DISTRO_FEATURES also relies on support in the kernel, you will also need to ensure that support is enabled in the kernel configuration.
This list only represents features as shipped with the Yocto Project metadata, as extra layers can define their own:
3g: Include support for cellular data.
acl: Include Access Control List support.
alsa: Include Advanced Linux Sound Architecture support (OSS compatibility kernel modules installed if available).
api-documentation: Enables generation of API documentation during recipe builds. The resulting documentation is added to SDK tarballs when the
bitbake -c populate_sdkcommand is used. See the “Adding API Documentation to the Standard SDK” section in the Yocto Project Application Development and the Extensible Software Development Kit (eSDK) manual.
bluetooth: Include bluetooth support (integrated BT only).
cramfs: Include CramFS support.
debuginfod: Include support for getting ELF debugging information through a debuginfod server.
directfb: Include DirectFB support.
ext2: Include tools for supporting for devices with internal HDD/Microdrive for storing files (instead of Flash only devices).
gobject-introspection-data: Include data to support GObject Introspection.
ipsec: Include IPSec support.
ipv4: Include IPv4 support.
ipv6: Include IPv6 support.
keyboard: Include keyboard support (e.g. keymaps will be loaded during boot).
multiarch: Enable building applications with multiple architecture support.
ld-is-gold: Use the gold linker instead of the standard GCC linker (bfd).
ldconfig: Include support for ldconfig and
ld.so.confon the target.
lto: Enable Link-Time Optimisation.
nfc: Include support for Near Field Communication.
nfs: Include NFS client support (for mounting NFS exports on device).
nls: Include National Language Support (NLS).
opengl: Include the Open Graphics Library, which is a cross-language, multi-platform application programming interface used for rendering two and three-dimensional graphics.
overlayfs: Include OverlayFS support.
pam: Include Pluggable Authentication Module (PAM) support.
pci: Include PCI bus support.
pcmcia: Include PCMCIA/CompactFlash support.
polkit: Include Polkit support.
ppp: Include PPP dialup support.
ptest: Enables building the package tests where supported by individual recipes. For more information on package tests, see the “Testing Packages With ptest” section in the Yocto Project Development Tasks Manual.
pulseaudio: Include support for PulseAudio.
selinux: Include support for Security-Enhanced Linux (SELinux) (requires meta-selinux).
seccomp: Enables building applications with seccomp support, to allow them to strictly restrict the system calls that they are allowed to invoke.
smbfs: Include SMB networks client support (for mounting Samba/Microsoft Windows shares on device).
systemd: Include support for this
initmanager, which is a full replacement of for
initwith parallel starting of services, reduced shell overhead, and other features. This
initmanager is used by many distributions.
usbgadget: Include USB Gadget Device support (for USB networking/serial/storage).
usbhost: Include USB Host support (allows to connect external keyboard, mouse, storage, network etc).
usrmerge: Merges the
/lib64directories into their respective counterparts in the
/usrdirectory to provide better package and application compatibility.
vfat: Include FAT filesystem support.
vulkan: Include support for the Vulkan API.
wayland: Include the Wayland display server protocol and the library that supports it.
wifi: Include WiFi support (integrated only).
x11: Include the X server and libraries.
xattr: Include support for extended file attributes.
zeroconf: Include support for zero configuration networking.
11.3 Image Features
The contents of images generated by the OpenEmbedded build system can be controlled by the IMAGE_FEATURES and EXTRA_IMAGE_FEATURES variables that you typically configure in your image recipes. Through these variables, you can add several different predefined packages such as development utilities or packages with debug information needed to investigate application problems or profile applications.
Here are the image features available for all images:
allow-empty-password: Allows Dropbear and OpenSSH to accept logins from accounts having an empty password string.
allow-root-login: Allows Dropbear and OpenSSH to accept root logins.
dbg-pkgs: Installs debug symbol packages for all packages installed in a given image.
debug-tweaks: Makes an image suitable for development (e.g. allows root logins, logins without passwords —including root ones, and enables post-installation logging). See the
post-install-loggingfeatures in this list for additional information.
dev-pkgs: Installs development packages (headers and extra library links) for all packages installed in a given image.
doc-pkgs: Installs documentation packages for all packages installed in a given image.
empty-root-password: This feature or
debug-tweaksis required if you want to allow root login with an empty password. If these features are not present in IMAGE_FEATURES, a non-empty password is forced in
/etc/shadowif such files exist.
empty-root-passworddoesn’t set an empty root password by itself. You get an initial empty root password thanks to the base-passwd and shadow recipes, and the presence of
debug-tweaksjust disables the mechanism which forces an non-empty password for the root user.
lic-pkgs: Installs license packages for all packages installed in a given image.
overlayfs-etc: Configures the
/etcdirectory to be in
overlayfs. This allows to store device specific information elsewhere, especially if the root filesystem is configured to be read-only.
package-management: Installs package management tools and preserves the package manager database.
post-install-logging: Enables logging postinstall script runs to the
/var/log/postinstall.logfile on first boot of the image on the target system.
To make the
/var/logdirectory on the target persistent, use the VOLATILE_LOG_DIR variable by setting it to “no”.
ptest-pkgs: Installs ptest packages for all ptest-enabled recipes.
read-only-rootfs: Creates an image whose root filesystem is read-only. See the “Creating a Read-Only Root Filesystem” section in the Yocto Project Development Tasks Manual for more information.
read-only-rootfs-delayed-postinsts: when specified in conjunction with
read-only-rootfs, specifies that post-install scripts are still permitted (this assumes that the root filesystem will be made writeable for the first boot; this feature does not do anything to ensure that - it just disables the check for post-install scripts.)
serial-autologin-root: when specified in conjunction with
empty-root-passwordwill automatically login as root on the serial console. This of course opens up a security hole if the serial console is potentially accessible to an attacker, so use with caution.
splash: Enables showing a splash screen during boot. By default, this screen is provided by
psplash, which does allow customization. If you prefer to use an alternative splash screen package, you can do so by setting the
SPLASHvariable to a different package name (or names) within the image recipe or at the distro configuration level.
stateless-rootfs:: specifies that the image should be created as stateless - when using
systemctl-nativewill not be run on the image, leaving the image for population at runtime by systemd.
staticdev-pkgs: Installs static development packages, which are static libraries (i.e.
*.afiles), for all packages installed in a given image.
Some image features are available only when you inherit the core-image class. The current list of these valid features is as follows:
hwcodecs: Installs hardware acceleration codecs.
nfs-server: Installs an NFS server.
perf: Installs profiling tools such as
LTTng. For general information on user-space tools, see the Yocto Project Application Development and the Extensible Software Development Kit (eSDK) manual.
ssh-server-dropbear: Installs the Dropbear minimal SSH server.
As of the 4.1 release, the
ssh-server-dropbearfeature also recommends the
openssh-sftp-serverpackage, which by default will be pulled into the image. This is because recent versions of the OpenSSH
scpclient now use the SFTP protocol, and thus require an SFTP server to be present to connect to. However, if you wish to use the Dropbear ssh server without the SFTP server installed, you can either remove
dropbearto IMAGE_INSTALL instead, or alternatively still use the feature but set BAD_RECOMMENDATIONS as follows:
BAD_RECOMMENDATIONS += "openssh-sftp-server"
ssh-server-openssh: Installs the OpenSSH SSH server, which is more full-featured than Dropbear. Note that if both the OpenSSH SSH server and the Dropbear minimal SSH server are present in IMAGE_FEATURES, then OpenSSH will take precedence and Dropbear will not be installed.
tools-debug: Installs debugging tools such as
gdb. For information on GDB, see the “Debugging With the GNU Project Debugger (GDB) Remotely” section in the Yocto Project Development Tasks Manual. For information on tracing and profiling, see the Yocto Project Profiling and Tracing Manual.
tools-sdk: Installs a full SDK that runs on the device.
tools-testapps: Installs device testing tools (e.g. touchscreen debugging).
weston: Installs Weston (reference Wayland environment).
x11: Installs the X server.
x11-base: Installs the X server with a minimal environment.
x11-sato: Installs the OpenedHand Sato environment.
11.4 Feature Backfilling
Sometimes it is necessary in the OpenEmbedded build system to extend
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
variables in the
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.conffile. 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
.conffile. 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.conffile. 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
.conffile. 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.