1*4882a593Smuzhiyun.. SPDX-License-Identifier: CC-BY-SA-2.0-UK 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun******** 4*4882a593SmuzhiyunFeatures 5*4882a593Smuzhiyun******** 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis chapter provides a reference of shipped machine and distro features 8*4882a593Smuzhiyunyou can include as part of your image, a reference on image features you 9*4882a593Smuzhiyuncan select, and a reference on feature backfilling. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunFeatures provide a mechanism for working out which packages should be 12*4882a593Smuzhiyunincluded in the generated images. Distributions can select which 13*4882a593Smuzhiyunfeatures they want to support through the :term:`DISTRO_FEATURES` variable, 14*4882a593Smuzhiyunwhich is set or appended to in a distribution's configuration file such 15*4882a593Smuzhiyunas ``poky.conf``, ``poky-tiny.conf``, ``poky-lsb.conf`` and so forth. 16*4882a593SmuzhiyunMachine features are set in the :term:`MACHINE_FEATURES` variable, which is 17*4882a593Smuzhiyunset in the machine configuration file and specifies the hardware 18*4882a593Smuzhiyunfeatures for a given machine. 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunThese two variables combine to work out which kernel modules, utilities, 21*4882a593Smuzhiyunand other packages to include. A given distribution can support a 22*4882a593Smuzhiyunselected subset of features so some machine features might not be 23*4882a593Smuzhiyunincluded if the distribution itself does not support them. 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunOne method you can use to determine which recipes are checking to see if 26*4882a593Smuzhiyuna particular feature is contained or not is to ``grep`` through the 27*4882a593Smuzhiyun:term:`Metadata` for the feature. Here is an example that 28*4882a593Smuzhiyundiscovers the recipes whose build is potentially changed based on a 29*4882a593Smuzhiyungiven feature:: 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun $ cd poky 32*4882a593Smuzhiyun $ git grep 'contains.*MACHINE_FEATURES.*feature' 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun.. _ref-features-machine: 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunMachine Features 37*4882a593Smuzhiyun================ 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunThe items below are features you can use with 40*4882a593Smuzhiyun:term:`MACHINE_FEATURES`. Features do not have a 41*4882a593Smuzhiyunone-to-one correspondence to packages, and they can go beyond simply 42*4882a593Smuzhiyuncontrolling the installation of a package or packages. Sometimes a 43*4882a593Smuzhiyunfeature can influence how certain recipes are built. For example, a 44*4882a593Smuzhiyunfeature might determine whether a particular configure option is 45*4882a593Smuzhiyunspecified within the :ref:`ref-tasks-configure` task 46*4882a593Smuzhiyunfor a particular recipe. 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunThis feature list only represents features as shipped with the Yocto 49*4882a593SmuzhiyunProject metadata: 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun- *acpi:* Hardware has ACPI (x86/x86_64 only) 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun- *alsa:* Hardware has ALSA audio drivers 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun- *apm:* Hardware uses APM (or APM emulation) 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun- *bluetooth:* Hardware has integrated BT 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun- *efi:* Support for booting through EFI 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun- *ext2:* Hardware HDD or Microdrive 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun- *keyboard:* Hardware has a keyboard 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun- *numa:* Hardware has non-uniform memory access 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun- *pcbios:* Support for booting through BIOS 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun- *pci:* Hardware has a PCI bus 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun- *pcmcia:* Hardware has PCMCIA or CompactFlash sockets 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun- *phone:* Mobile phone (voice) support 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun- *qvga:* Machine has a QVGA (320x240) display 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun- *rtc:* Machine has a Real-Time Clock 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun- *screen:* Hardware has a screen 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun- *serial:* Hardware has serial support (usually RS232) 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun- *touchscreen:* Hardware has a touchscreen 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun- *usbgadget:* Hardware is USB gadget device capable 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun- *usbhost:* Hardware is USB Host capable 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun- *vfat:* FAT file system support 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun- *wifi:* Hardware has integrated WiFi 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun.. _ref-features-distro: 94*4882a593Smuzhiyun 95*4882a593SmuzhiyunDistro Features 96*4882a593Smuzhiyun=============== 97*4882a593Smuzhiyun 98*4882a593SmuzhiyunThe items below are features you can use with 99*4882a593Smuzhiyun:term:`DISTRO_FEATURES` to enable features across 100*4882a593Smuzhiyunyour distribution. Features do not have a one-to-one correspondence to 101*4882a593Smuzhiyunpackages, and they can go beyond simply controlling the installation of 102*4882a593Smuzhiyuna package or packages. In most cases, the presence or absence of a 103*4882a593Smuzhiyunfeature translates to the appropriate option supplied to the configure 104*4882a593Smuzhiyunscript during the :ref:`ref-tasks-configure` task for 105*4882a593Smuzhiyunthe recipes that optionally support the feature. 106*4882a593Smuzhiyun 107*4882a593SmuzhiyunSome distro features are also machine features. These select features 108*4882a593Smuzhiyunmake sense to be controlled both at the machine and distribution 109*4882a593Smuzhiyunconfiguration level. See the 110*4882a593Smuzhiyun:term:`COMBINED_FEATURES` variable for more 111*4882a593Smuzhiyuninformation. 112*4882a593Smuzhiyun 113*4882a593SmuzhiyunThis list only represents features as shipped with the Yocto Project 114*4882a593Smuzhiyunmetadata: 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun- *alsa:* Include ALSA support (OSS compatibility kernel modules 117*4882a593Smuzhiyun installed if available). 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun- *api-documentation:* Enables generation of API documentation during 120*4882a593Smuzhiyun recipe builds. The resulting documentation is added to SDK tarballs 121*4882a593Smuzhiyun when the ``bitbake -c populate_sdk`` command is used. See the 122*4882a593Smuzhiyun ":ref:`sdk-manual/appendix-customizing-standard:adding api documentation to the standard sdk`" 123*4882a593Smuzhiyun section in the Yocto Project Application Development and the 124*4882a593Smuzhiyun Extensible Software Development Kit (eSDK) manual. 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun- *bluetooth:* Include bluetooth support (integrated BT only). 127*4882a593Smuzhiyun 128*4882a593Smuzhiyun- *cramfs:* Include CramFS support. 129*4882a593Smuzhiyun 130*4882a593Smuzhiyun- *directfb:* Include DirectFB support. 131*4882a593Smuzhiyun 132*4882a593Smuzhiyun- *ext2:* Include tools for supporting for devices with internal 133*4882a593Smuzhiyun HDD/Microdrive for storing files (instead of Flash only devices). 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun- *ipsec:* Include IPSec support. 136*4882a593Smuzhiyun 137*4882a593Smuzhiyun- *ipv6:* Include IPv6 support. 138*4882a593Smuzhiyun 139*4882a593Smuzhiyun- *keyboard:* Include keyboard support (e.g. keymaps will be loaded 140*4882a593Smuzhiyun during boot). 141*4882a593Smuzhiyun 142*4882a593Smuzhiyun- *ldconfig:* Include support for ldconfig and ``ld.so.conf`` on the 143*4882a593Smuzhiyun target. 144*4882a593Smuzhiyun 145*4882a593Smuzhiyun- *nfs:* Include NFS client support (for mounting NFS exports on 146*4882a593Smuzhiyun device). 147*4882a593Smuzhiyun 148*4882a593Smuzhiyun- *opengl:* Include the Open Graphics Library, which is a 149*4882a593Smuzhiyun cross-language, multi-platform application programming interface used 150*4882a593Smuzhiyun for rendering two and three-dimensional graphics. 151*4882a593Smuzhiyun 152*4882a593Smuzhiyun- *pci:* Include PCI bus support. 153*4882a593Smuzhiyun 154*4882a593Smuzhiyun- *pcmcia:* Include PCMCIA/CompactFlash support. 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun- *ppp:* Include PPP dialup support. 157*4882a593Smuzhiyun 158*4882a593Smuzhiyun- *ptest:* Enables building the package tests where supported by 159*4882a593Smuzhiyun individual recipes. For more information on package tests, see the 160*4882a593Smuzhiyun ":ref:`dev-manual/common-tasks:testing packages with ptest`" section 161*4882a593Smuzhiyun in the Yocto Project Development Tasks Manual. 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun- *smbfs:* Include SMB networks client support (for mounting 164*4882a593Smuzhiyun Samba/Microsoft Windows shares on device). 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun- *systemd:* Include support for this ``init`` manager, which is a full 167*4882a593Smuzhiyun replacement of for ``init`` with parallel starting of services, 168*4882a593Smuzhiyun reduced shell overhead, and other features. This ``init`` manager is 169*4882a593Smuzhiyun used by many distributions. 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun- *usbgadget:* Include USB Gadget Device support (for USB 172*4882a593Smuzhiyun networking/serial/storage). 173*4882a593Smuzhiyun 174*4882a593Smuzhiyun- *usbhost:* Include USB Host support (allows to connect external 175*4882a593Smuzhiyun keyboard, mouse, storage, network etc). 176*4882a593Smuzhiyun 177*4882a593Smuzhiyun- *usrmerge:* Merges the ``/bin``, ``/sbin``, ``/lib``, and ``/lib64`` 178*4882a593Smuzhiyun directories into their respective counterparts in the ``/usr`` 179*4882a593Smuzhiyun directory to provide better package and application compatibility. 180*4882a593Smuzhiyun 181*4882a593Smuzhiyun- *wayland:* Include the Wayland display server protocol and the 182*4882a593Smuzhiyun library that supports it. 183*4882a593Smuzhiyun 184*4882a593Smuzhiyun- *wifi:* Include WiFi support (integrated only). 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun- *x11:* Include the X server and libraries. 187*4882a593Smuzhiyun 188*4882a593Smuzhiyun.. _ref-features-image: 189*4882a593Smuzhiyun 190*4882a593SmuzhiyunImage Features 191*4882a593Smuzhiyun============== 192*4882a593Smuzhiyun 193*4882a593SmuzhiyunThe contents of images generated by the OpenEmbedded build system can be 194*4882a593Smuzhiyuncontrolled by the :term:`IMAGE_FEATURES` and 195*4882a593Smuzhiyun:term:`EXTRA_IMAGE_FEATURES` variables that 196*4882a593Smuzhiyunyou typically configure in your image recipes. Through these variables, 197*4882a593Smuzhiyunyou can add several different predefined packages such as development 198*4882a593Smuzhiyunutilities or packages with debug information needed to investigate 199*4882a593Smuzhiyunapplication problems or profile applications. 200*4882a593Smuzhiyun 201*4882a593SmuzhiyunHere are the image features available for all images: 202*4882a593Smuzhiyun 203*4882a593Smuzhiyun- *allow-empty-password:* Allows Dropbear and OpenSSH to accept root 204*4882a593Smuzhiyun logins and logins from accounts having an empty password string. 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun- *dbg-pkgs:* Installs debug symbol packages for all packages installed 207*4882a593Smuzhiyun in a given image. 208*4882a593Smuzhiyun 209*4882a593Smuzhiyun- *debug-tweaks:* Makes an image suitable for development (e.g. allows 210*4882a593Smuzhiyun root logins without passwords and enables post-installation logging). 211*4882a593Smuzhiyun See the 'allow-empty-password', 'empty-root-password', and 212*4882a593Smuzhiyun 'post-install-logging' features in this list for additional 213*4882a593Smuzhiyun information. 214*4882a593Smuzhiyun 215*4882a593Smuzhiyun- *dev-pkgs:* Installs development packages (headers and extra library 216*4882a593Smuzhiyun links) for all packages installed in a given image. 217*4882a593Smuzhiyun 218*4882a593Smuzhiyun- *doc-pkgs:* Installs documentation packages for all packages 219*4882a593Smuzhiyun installed in a given image. 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun- *empty-root-password:* Sets the root password to an empty string, 222*4882a593Smuzhiyun which allows logins with a blank password. 223*4882a593Smuzhiyun 224*4882a593Smuzhiyun- *overlayfs-etc:* Configures the ``/etc`` directory to be in ``overlayfs``. 225*4882a593Smuzhiyun This allows to store device specific information elsewhere, especially 226*4882a593Smuzhiyun if the root filesystem is configured to be read-only. 227*4882a593Smuzhiyun 228*4882a593Smuzhiyun- *package-management:* Installs package management tools and preserves 229*4882a593Smuzhiyun the package manager database. 230*4882a593Smuzhiyun 231*4882a593Smuzhiyun- *post-install-logging:* Enables logging postinstall script runs to 232*4882a593Smuzhiyun the ``/var/log/postinstall.log`` file on first boot of the image on 233*4882a593Smuzhiyun the target system. 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun .. note:: 236*4882a593Smuzhiyun 237*4882a593Smuzhiyun To make the ``/var/log`` directory on the target persistent, use the 238*4882a593Smuzhiyun :term:`VOLATILE_LOG_DIR` variable by setting it to "no". 239*4882a593Smuzhiyun 240*4882a593Smuzhiyun- *ptest-pkgs:* Installs ptest packages for all ptest-enabled recipes. 241*4882a593Smuzhiyun 242*4882a593Smuzhiyun- *read-only-rootfs:* Creates an image whose root filesystem is 243*4882a593Smuzhiyun read-only. See the 244*4882a593Smuzhiyun ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`" 245*4882a593Smuzhiyun section in the Yocto Project Development Tasks Manual for more 246*4882a593Smuzhiyun information. 247*4882a593Smuzhiyun 248*4882a593Smuzhiyun- *splash:* Enables showing a splash screen during boot. By default, 249*4882a593Smuzhiyun this screen is provided by ``psplash``, which does allow 250*4882a593Smuzhiyun customization. If you prefer to use an alternative splash screen 251*4882a593Smuzhiyun package, you can do so by setting the ``SPLASH`` variable to a 252*4882a593Smuzhiyun different package name (or names) within the image recipe or at the 253*4882a593Smuzhiyun distro configuration level. 254*4882a593Smuzhiyun 255*4882a593Smuzhiyun- *staticdev-pkgs:* Installs static development packages, which are 256*4882a593Smuzhiyun static libraries (i.e. ``*.a`` files), for all packages installed in 257*4882a593Smuzhiyun a given image. 258*4882a593Smuzhiyun 259*4882a593SmuzhiyunSome image features are available only when you inherit the 260*4882a593Smuzhiyun:ref:`core-image <ref-classes-core-image>` class. The current list of 261*4882a593Smuzhiyunthese valid features is as follows: 262*4882a593Smuzhiyun 263*4882a593Smuzhiyun- *hwcodecs:* Installs hardware acceleration codecs. 264*4882a593Smuzhiyun 265*4882a593Smuzhiyun- *nfs-server:* Installs an NFS server. 266*4882a593Smuzhiyun 267*4882a593Smuzhiyun- *perf:* Installs profiling tools such as ``perf``, ``systemtap``, and 268*4882a593Smuzhiyun ``LTTng``. For general information on user-space tools, see the 269*4882a593Smuzhiyun :doc:`/sdk-manual/index` manual. 270*4882a593Smuzhiyun 271*4882a593Smuzhiyun- *ssh-server-dropbear:* Installs the Dropbear minimal SSH server. 272*4882a593Smuzhiyun 273*4882a593Smuzhiyun- *ssh-server-openssh:* Installs the OpenSSH SSH server, which is more 274*4882a593Smuzhiyun full-featured than Dropbear. Note that if both the OpenSSH SSH server 275*4882a593Smuzhiyun and the Dropbear minimal SSH server are present in 276*4882a593Smuzhiyun :term:`IMAGE_FEATURES`, then OpenSSH will take precedence and Dropbear 277*4882a593Smuzhiyun will not be installed. 278*4882a593Smuzhiyun 279*4882a593Smuzhiyun- *tools-debug:* Installs debugging tools such as ``strace`` and 280*4882a593Smuzhiyun ``gdb``. For information on GDB, see the 281*4882a593Smuzhiyun ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section 282*4882a593Smuzhiyun in the Yocto Project Development Tasks Manual. For information on 283*4882a593Smuzhiyun tracing and profiling, see the :doc:`/profile-manual/index`. 284*4882a593Smuzhiyun 285*4882a593Smuzhiyun- *tools-sdk:* Installs a full SDK that runs on the device. 286*4882a593Smuzhiyun 287*4882a593Smuzhiyun- *tools-testapps:* Installs device testing tools (e.g. touchscreen 288*4882a593Smuzhiyun debugging). 289*4882a593Smuzhiyun 290*4882a593Smuzhiyun- *x11:* Installs the X server. 291*4882a593Smuzhiyun 292*4882a593Smuzhiyun- *x11-base:* Installs the X server with a minimal environment. 293*4882a593Smuzhiyun 294*4882a593Smuzhiyun- *x11-sato:* Installs the OpenedHand Sato environment. 295*4882a593Smuzhiyun 296*4882a593Smuzhiyun.. _ref-features-backfill: 297*4882a593Smuzhiyun 298*4882a593SmuzhiyunFeature Backfilling 299*4882a593Smuzhiyun=================== 300*4882a593Smuzhiyun 301*4882a593SmuzhiyunSometimes it is necessary in the OpenEmbedded build system to extend 302*4882a593Smuzhiyun:term:`MACHINE_FEATURES` or 303*4882a593Smuzhiyun:term:`DISTRO_FEATURES` to control functionality 304*4882a593Smuzhiyunthat was previously enabled and not able to be disabled. For these 305*4882a593Smuzhiyuncases, we need to add an additional feature item to appear in one of 306*4882a593Smuzhiyunthese variables, but we do not want to force developers who have 307*4882a593Smuzhiyunexisting values of the variables in their configuration to add the new 308*4882a593Smuzhiyunfeature in order to retain the same overall level of functionality. 309*4882a593SmuzhiyunThus, the OpenEmbedded build system has a mechanism to automatically 310*4882a593Smuzhiyun"backfill" these added features into existing distro or machine 311*4882a593Smuzhiyunconfigurations. You can see the list of features for which this is done 312*4882a593Smuzhiyunby finding the 313*4882a593Smuzhiyun:term:`DISTRO_FEATURES_BACKFILL` and 314*4882a593Smuzhiyun:term:`MACHINE_FEATURES_BACKFILL` 315*4882a593Smuzhiyunvariables in the ``meta/conf/bitbake.conf`` file. 316*4882a593Smuzhiyun 317*4882a593SmuzhiyunBecause such features are backfilled by default into all configurations 318*4882a593Smuzhiyunas described in the previous paragraph, developers who wish to disable 319*4882a593Smuzhiyunthe new features need to be able to selectively prevent the backfilling 320*4882a593Smuzhiyunfrom occurring. They can do this by adding the undesired feature or 321*4882a593Smuzhiyunfeatures to the 322*4882a593Smuzhiyun:term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` 323*4882a593Smuzhiyunor 324*4882a593Smuzhiyun:term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` 325*4882a593Smuzhiyunvariables for distro features and machine features respectively. 326*4882a593Smuzhiyun 327*4882a593SmuzhiyunHere are two examples to help illustrate feature backfilling: 328*4882a593Smuzhiyun 329*4882a593Smuzhiyun- *The "pulseaudio" distro feature option*: Previously, PulseAudio 330*4882a593Smuzhiyun support was enabled within the Qt and GStreamer frameworks. Because 331*4882a593Smuzhiyun of this, the feature is backfilled and thus enabled for all distros 332*4882a593Smuzhiyun through the :term:`DISTRO_FEATURES_BACKFILL` variable in the 333*4882a593Smuzhiyun ``meta/conf/bitbake.conf`` file. However, your distro needs to 334*4882a593Smuzhiyun disable the feature. You can disable the feature without affecting 335*4882a593Smuzhiyun other existing distro configurations that need PulseAudio support by 336*4882a593Smuzhiyun adding "pulseaudio" to :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` in 337*4882a593Smuzhiyun your distro's ``.conf`` file. Adding the feature to this variable 338*4882a593Smuzhiyun when it also exists in the :term:`DISTRO_FEATURES_BACKFILL` variable 339*4882a593Smuzhiyun prevents the build system from adding the feature to your 340*4882a593Smuzhiyun configuration's :term:`DISTRO_FEATURES`, effectively disabling the 341*4882a593Smuzhiyun feature for that particular distro. 342*4882a593Smuzhiyun 343*4882a593Smuzhiyun- *The "rtc" machine feature option*: Previously, real time clock (RTC) 344*4882a593Smuzhiyun support was enabled for all target devices. Because of this, the 345*4882a593Smuzhiyun feature is backfilled and thus enabled for all machines through the 346*4882a593Smuzhiyun :term:`MACHINE_FEATURES_BACKFILL` variable in the 347*4882a593Smuzhiyun ``meta/conf/bitbake.conf`` file. However, your target device does not 348*4882a593Smuzhiyun have this capability. You can disable RTC support for your device 349*4882a593Smuzhiyun without affecting other machines that need RTC support by adding the 350*4882a593Smuzhiyun feature to your machine's :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` 351*4882a593Smuzhiyun list in the machine's ``.conf`` file. Adding the feature to this 352*4882a593Smuzhiyun variable when it also exists in the :term:`MACHINE_FEATURES_BACKFILL` 353*4882a593Smuzhiyun variable prevents the build system from adding the feature to your 354*4882a593Smuzhiyun configuration's :term:`MACHINE_FEATURES`, effectively disabling RTC 355*4882a593Smuzhiyun support for that particular machine. 356