ref-features.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='ref-features'>
  5. <title>Features</title>
  6. <para>
  7. This chapter provides a reference of shipped machine and distro features
  8. you can include as part of your image, a reference on image features you can
  9. select, and a reference on feature backfilling.
  10. </para>
  11. <para>
  12. Features provide a mechanism for working out which packages
  13. should be included in the generated images.
  14. Distributions can select which features they want to support through the
  15. <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
  16. variable, which is set or appended to in a distribution's configuration file such as
  17. <filename>poky.conf</filename>,
  18. <filename>poky-tiny.conf</filename>,
  19. <filename>poky-lsb.conf</filename> and so forth.
  20. Machine features are set in the
  21. <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
  22. variable, which is set in the machine configuration file and
  23. specifies the hardware features for a given machine.
  24. </para>
  25. <para>
  26. These two variables combine to work out which kernel modules,
  27. utilities, and other packages to include.
  28. A given distribution can support a selected subset of features so some machine features might not
  29. be included if the distribution itself does not support them.
  30. </para>
  31. <para>
  32. One method you can use to determine which recipes are checking to see if a
  33. particular feature is contained or not is to <filename>grep</filename> through
  34. the <link linkend='metadata'>Metadata</link>
  35. for the feature.
  36. Here is an example that discovers the recipes whose build is potentially
  37. changed based on a given feature:
  38. <literallayout class='monospaced'>
  39. $ cd poky
  40. $ git grep 'contains.*MACHINE_FEATURES.*<replaceable>feature</replaceable>'
  41. </literallayout>
  42. </para>
  43. <section id='ref-features-machine'>
  44. <title>Machine Features</title>
  45. <para>
  46. The items below are features you can use with
  47. <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
  48. Features do not have a one-to-one correspondence to packages, and they can
  49. go beyond simply controlling the installation of a package or packages.
  50. Sometimes a feature can influence how certain recipes are built.
  51. For example, a feature might determine whether a particular configure option
  52. is specified within the
  53. <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
  54. task for a particular recipe.
  55. </para>
  56. <para>
  57. This feature list only represents features as shipped with the Yocto Project metadata:
  58. <itemizedlist>
  59. <listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
  60. </para></listitem>
  61. <listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
  62. </para></listitem>
  63. <listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
  64. </para></listitem>
  65. <listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
  66. </para></listitem>
  67. <listitem><para><emphasis>efi:</emphasis> Support for booting through EFI
  68. </para></listitem>
  69. <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
  70. </para></listitem>
  71. <listitem><para><emphasis>irda:</emphasis> Hardware has IrDA support
  72. </para></listitem>
  73. <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
  74. </para></listitem>
  75. <listitem><para><emphasis>pcbios:</emphasis> Support for booting through BIOS
  76. </para></listitem>
  77. <listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
  78. </para></listitem>
  79. <listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
  80. </para></listitem>
  81. <listitem><para><emphasis>phone:</emphasis> Mobile phone (voice) support
  82. </para></listitem>
  83. <listitem><para><emphasis>qvga:</emphasis> Machine has a QVGA (320x240) display
  84. </para></listitem>
  85. <listitem><para><emphasis>rtc:</emphasis> Machine has a Real-Time Clock
  86. </para></listitem>
  87. <listitem><para><emphasis>screen:</emphasis> Hardware has a screen
  88. </para></listitem>
  89. <listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
  90. </para></listitem>
  91. <listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
  92. </para></listitem>
  93. <listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
  94. </para></listitem>
  95. <listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
  96. </para></listitem>
  97. <listitem><para><emphasis>vfat:</emphasis> FAT file system support
  98. </para></listitem>
  99. <listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
  100. </para></listitem>
  101. </itemizedlist>
  102. </para>
  103. </section>
  104. <section id='ref-features-distro'>
  105. <title>Distro Features</title>
  106. <para>
  107. The items below are features you can use with
  108. <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
  109. to enable features across your distribution.
  110. Features do not have a one-to-one correspondence to packages,
  111. and they can go beyond simply controlling the installation of a
  112. package or packages.
  113. In most cases, the presence or absence of a feature translates to
  114. the appropriate option supplied to the configure script during the
  115. <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
  116. task for the recipes that optionally
  117. support the feature.
  118. </para>
  119. <para>
  120. Some distro features are also machine features.
  121. These select features make sense to be controlled both at
  122. the machine and distribution configuration level.
  123. See the
  124. <link linkend='var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></link>
  125. variable for more information.
  126. </para>
  127. <para>
  128. This list only represents features as shipped with the Yocto Project metadata:
  129. <itemizedlist>
  130. <listitem><para><emphasis>alsa:</emphasis> Include ALSA support
  131. (OSS compatibility kernel modules installed if available).
  132. </para></listitem>
  133. <listitem><para><emphasis>api-documentation:</emphasis>
  134. Enables generation of API documentation during recipe
  135. builds.
  136. The resulting documentation is added to SDK tarballs
  137. when the
  138. <filename>bitbake -c populate_sdk</filename> command
  139. is used.
  140. See the
  141. "<ulink url='&YOCTO_DOCS_SDK_URL;#adding-api-documentation-to-the-standard-sdk'>Adding API Documentation to the Standard SDK</ulink>"
  142. section in the Yocto Project Application Development and
  143. the Extensible Software Development Kit (eSDK) manual.
  144. </para></listitem>
  145. <listitem><para><emphasis>bluetooth:</emphasis> Include
  146. bluetooth support (integrated BT only).</para></listitem>
  147. <listitem><para><emphasis>bluez5:</emphasis> Include
  148. BlueZ Version 5, which provides core Bluetooth layers and
  149. protocols support.
  150. <note>
  151. The default value for the
  152. <filename>DISTRO FEATURES</filename> variable includes
  153. "bluetooth", which causes bluez5 to be backfilled in
  154. for bluetooth support.
  155. If you do not want bluez5 backfilled and would rather
  156. use bluez4, you need to use the
  157. <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
  158. variable as follows:
  159. <literallayout class='monospaced'>
  160. DISTRO_FEATURES_BACKFILL_CONSIDERED = "bluez5"
  161. </literallayout>
  162. Setting this variable tells the OpenEmbedded build
  163. system that you have considered but ruled
  164. out using the bluez5 feature and that bluez4 will be
  165. used.
  166. </note>
  167. </para></listitem>
  168. <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
  169. support.</para></listitem>
  170. <listitem><para><emphasis>directfb:</emphasis>
  171. Include DirectFB support.
  172. </para></listitem>
  173. <listitem><para><emphasis>ext2:</emphasis> Include tools for
  174. supporting for devices with internal HDD/Microdrive for
  175. storing files (instead of Flash only devices).
  176. </para></listitem>
  177. <listitem><para><emphasis>ipsec:</emphasis> Include IPSec
  178. support.</para></listitem>
  179. <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
  180. </para></listitem>
  181. <listitem><para><emphasis>irda:</emphasis> Include IrDA support.
  182. </para></listitem>
  183. <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
  184. support (e.g. keymaps will be loaded during boot).
  185. </para></listitem>
  186. <listitem><para><emphasis>ldconfig:</emphasis>
  187. Include support for ldconfig and
  188. <filename>ld.so.conf</filename> on the target.
  189. </para></listitem>
  190. <listitem><para><emphasis>nfs:</emphasis> Include NFS client
  191. support (for mounting NFS exports on device).
  192. </para></listitem>
  193. <listitem><para><emphasis>opengl:</emphasis>
  194. Include the Open Graphics Library, which is a
  195. cross-language, multi-platform application programming
  196. interface used for rendering two and three-dimensional
  197. graphics.</para></listitem>
  198. <listitem><para><emphasis>pci:</emphasis> Include PCI bus
  199. support.</para></listitem>
  200. <listitem><para><emphasis>pcmcia:</emphasis> Include
  201. PCMCIA/CompactFlash support.</para></listitem>
  202. <listitem><para><emphasis>ppp:</emphasis> Include PPP dialup
  203. support.</para></listitem>
  204. <listitem><para><emphasis>ptest:</emphasis> Enables building
  205. the package tests where supported by individual recipes.
  206. For more information on package tests, see the
  207. "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
  208. section in the Yocto Project Development Tasks Manual.
  209. </para></listitem>
  210. <listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
  211. client support (for mounting Samba/Microsoft Windows shares
  212. on device).</para></listitem>
  213. <listitem><para><emphasis>systemd:</emphasis> Include support
  214. for this <filename>init</filename> manager, which is a full
  215. replacement of for <filename>init</filename> with parallel
  216. starting of services, reduced shell overhead, and other
  217. features.
  218. This <filename>init</filename> manager is used by many
  219. distributions.</para></listitem>
  220. <listitem><para><emphasis>usbgadget:</emphasis> Include USB
  221. Gadget Device support (for USB networking/serial/storage).
  222. </para></listitem>
  223. <listitem><para><emphasis>usbhost:</emphasis> Include USB Host
  224. support (allows to connect external keyboard, mouse,
  225. storage, network etc).</para></listitem>
  226. <listitem><para><emphasis>wayland:</emphasis> Include the
  227. Wayland display server protocol and the library that
  228. supports it.</para></listitem>
  229. <listitem><para><emphasis>wifi:</emphasis> Include WiFi support
  230. (integrated only).</para></listitem>
  231. <listitem><para><emphasis>x11:</emphasis> Include the X server
  232. and libraries.</para></listitem>
  233. </itemizedlist>
  234. </para>
  235. </section>
  236. <section id='ref-features-image'>
  237. <title>Image Features</title>
  238. <para>
  239. The contents of images generated by the OpenEmbedded build system
  240. can be controlled by the
  241. <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
  242. and
  243. <link linkend='var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></link>
  244. variables that you typically configure in your image recipes.
  245. Through these variables, you can add several different
  246. predefined packages such as development utilities or packages with
  247. debug information needed to investigate application problems or
  248. profile applications.
  249. </para>
  250. <para>
  251. The following image features are available for all images:
  252. <itemizedlist>
  253. <listitem><para><emphasis>allow-empty-password:</emphasis>
  254. Allows Dropbear and OpenSSH to accept root logins
  255. and logins from accounts having an empty password string.
  256. </para></listitem>
  257. <listitem><para><emphasis>dbg-pkgs:</emphasis>
  258. Installs debug symbol packages for all packages installed
  259. in a given image.
  260. </para></listitem>
  261. <listitem><para><emphasis>debug-tweaks:</emphasis>
  262. Makes an image suitable for development (e.g.
  263. allows root logins without passwords and enables
  264. post-installation logging).
  265. See the 'allow-empty-password', 'empty-root-password',
  266. and 'post-install-logging' features in this list for
  267. additional information.
  268. </para></listitem>
  269. <listitem><para><emphasis>dev-pkgs:</emphasis>
  270. Installs development packages (headers and extra library
  271. links) for all packages installed in a given image.
  272. </para></listitem>
  273. <listitem><para><emphasis>doc-pkgs:</emphasis> Installs
  274. documentation packages for all packages installed in a
  275. given image.
  276. </para></listitem>
  277. <listitem><para><emphasis>empty-root-password:</emphasis>
  278. Sets the root password to an empty string, which allows
  279. logins with a blank password.
  280. </para></listitem>
  281. <listitem><para><emphasis>package-management:</emphasis>
  282. Installs package management tools and preserves the package
  283. manager database.
  284. </para></listitem>
  285. <listitem><para><emphasis>post-install-logging:</emphasis>
  286. Enables logging postinstall script runs to
  287. the <filename>/var/log/postinstall.log</filename> file
  288. on first boot of the image on the target system.
  289. <note>
  290. To make the <filename>/var/log</filename> directory
  291. on the target persistent, use the
  292. <link linkend='var-VOLATILE_LOG_DIR'><filename>VOLATILE_LOG_DIR</filename></link>
  293. variable by setting it to "no".
  294. </note>
  295. </para></listitem>
  296. <listitem><para><emphasis>ptest-pkgs:</emphasis>
  297. Installs ptest packages for all ptest-enabled recipes.
  298. </para></listitem>
  299. <listitem><para><emphasis>read-only-rootfs:</emphasis>
  300. Creates an image whose root filesystem is read-only.
  301. See the
  302. "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
  303. section in the Yocto Project Development Tasks Manual for
  304. more information.
  305. </para></listitem>
  306. <listitem><para><emphasis>splash:</emphasis>
  307. Enables showing a splash screen during boot.
  308. By default, this screen is provided by
  309. <filename>psplash</filename>, which does allow
  310. customization.
  311. If you prefer to use an alternative splash screen package,
  312. you can do so by setting the <filename>SPLASH</filename>
  313. variable to a different package name (or names) within the
  314. image recipe or at the distro configuration level.
  315. </para></listitem>
  316. <listitem><para><emphasis>staticdev-pkgs:</emphasis>
  317. Installs static development packages, which are
  318. static libraries (i.e. <filename>*.a</filename> files), for
  319. all packages installed in a given image.
  320. </para></listitem>
  321. </itemizedlist>
  322. </para>
  323. <para>
  324. Some image features are available only when you inherit the
  325. <link linkend='ref-classes-core-image'><filename>core-image</filename></link>
  326. class.
  327. The current list of these valid features is as follows:
  328. <itemizedlist>
  329. <listitem><para><emphasis>eclipse-debug:</emphasis> Provides
  330. Eclipse remote debugging support.
  331. </para></listitem>
  332. <listitem><para><emphasis>hwcodecs:</emphasis> Installs
  333. hardware acceleration codecs.
  334. </para></listitem>
  335. <listitem><para><emphasis>nfs-server:</emphasis>
  336. Installs an NFS server.
  337. </para></listitem>
  338. <listitem><para><emphasis>perf:</emphasis>
  339. Installs profiling tools such as
  340. <filename>perf</filename>, <filename>systemtap</filename>,
  341. and <filename>LTTng</filename>.
  342. For general information on user-space tools, see the
  343. <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
  344. manual.
  345. </para></listitem>
  346. <listitem><para><emphasis>ssh-server-dropbear:</emphasis>
  347. Installs the Dropbear minimal SSH server.
  348. </para></listitem>
  349. <listitem><para><emphasis>ssh-server-openssh:</emphasis>
  350. Installs the OpenSSH SSH server, which is more
  351. full-featured than Dropbear.
  352. Note that if both the OpenSSH SSH server and the Dropbear
  353. minimal SSH server are present in
  354. <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
  355. precedence and Dropbear will not be installed.
  356. </para></listitem>
  357. <listitem><para><emphasis>tools-debug:</emphasis>
  358. Installs debugging tools such as
  359. <filename>strace</filename> and <filename>gdb</filename>.
  360. For information on GDB, see the
  361. "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
  362. section in the Yocto Project Development Tasks Manual.
  363. For information on tracing and profiling, see the
  364. <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
  365. </para></listitem>
  366. <listitem><para><emphasis>tools-sdk:</emphasis>
  367. Installs a full SDK that runs on the device.
  368. </para></listitem>
  369. <listitem><para><emphasis>tools-testapps:</emphasis>
  370. Installs device testing tools (e.g. touchscreen debugging).
  371. </para></listitem>
  372. <listitem><para><emphasis>x11:</emphasis>
  373. Installs the X server.
  374. </para></listitem>
  375. <listitem><para><emphasis>x11-base:</emphasis>
  376. Installs the X server with a minimal environment.
  377. </para></listitem>
  378. <listitem><para><emphasis>x11-sato:</emphasis>
  379. Installs the OpenedHand Sato environment.
  380. </para></listitem>
  381. </itemizedlist>
  382. </para>
  383. </section>
  384. <section id='ref-features-backfill'>
  385. <title>Feature Backfilling</title>
  386. <para>
  387. Sometimes it is necessary in the OpenEmbedded build system to extend
  388. <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
  389. or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
  390. to control functionality that was previously enabled and not able
  391. to be disabled.
  392. For these cases, we need to add an
  393. additional feature item to appear in one of these variables,
  394. but we do not want to force developers who have existing values
  395. of the variables in their configuration to add the new feature
  396. in order to retain the same overall level of functionality.
  397. Thus, the OpenEmbedded build system has a mechanism to
  398. automatically "backfill" these added features into existing
  399. distro or machine configurations.
  400. You can see the list of features for which this is done by
  401. finding the
  402. <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
  403. and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
  404. variables in the <filename>meta/conf/bitbake.conf</filename> file.
  405. </para>
  406. <para>
  407. Because such features are backfilled by default into all
  408. configurations as described in the previous paragraph, developers
  409. who wish to disable the new features need to be able to selectively
  410. prevent the backfilling from occurring.
  411. They can do this by adding the undesired feature or features to the
  412. <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
  413. or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
  414. variables for distro features and machine features respectively.
  415. </para>
  416. <para>
  417. Here are two examples to help illustrate feature backfilling:
  418. <itemizedlist>
  419. <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
  420. Previously, PulseAudio support was enabled within the Qt and
  421. GStreamer frameworks.
  422. Because of this, the feature is backfilled and thus
  423. enabled for all distros through the
  424. <filename>DISTRO_FEATURES_BACKFILL</filename>
  425. variable in the <filename>meta/conf/bitbake.conf</filename> file.
  426. However, your distro needs to disable the feature.
  427. You can disable the feature without affecting
  428. other existing distro configurations that need PulseAudio support
  429. by adding "pulseaudio" to
  430. <filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
  431. in your distro's <filename>.conf</filename> file.
  432. Adding the feature to this variable when it also
  433. exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
  434. variable prevents the build system from adding the feature to
  435. your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
  436. the feature for that particular distro.</para></listitem>
  437. <listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
  438. Previously, real time clock (RTC) support was enabled for all
  439. target devices.
  440. Because of this, the feature is backfilled and thus enabled
  441. for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
  442. variable in the <filename>meta/conf/bitbake.conf</filename> file.
  443. However, your target device does not have this capability.
  444. You can disable RTC support for your device without
  445. affecting other machines that need RTC support
  446. by adding the feature to your machine's
  447. <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
  448. list in the machine's <filename>.conf</filename> file.
  449. Adding the feature to this variable when it also
  450. exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
  451. variable prevents the build system from adding the feature to
  452. your configuration's <filename>MACHINE_FEATURES</filename>, effectively
  453. disabling RTC support for that particular machine.</para></listitem>
  454. </itemizedlist>
  455. </para>
  456. </section>
  457. </chapter>
  458. <!--
  459. vim: expandtab tw=80 ts=4 spell spelllang=en_gb
  460. -->