ref-features.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  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 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
  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. <ulink url='&YOCTO_DOCS_REF_URL;#var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></ulink>
  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. </para></listitem>
  141. <listitem><para><emphasis>bluetooth:</emphasis> Include
  142. bluetooth support (integrated BT only).</para></listitem>
  143. <listitem><para><emphasis>bluez5:</emphasis> Include
  144. BlueZ Version 5, which provides core Bluetooth layers and
  145. protocols support.
  146. <note>
  147. The default value for the
  148. <link linkend='var-DISTRO_FEATURES'><filename>DISTRO FEATURES</filename></link>
  149. variable includes "bluetooth", which causes bluez5
  150. to be backfilled in for bluetooth support.
  151. If you do not want bluez5 backfilled and would rather
  152. use bluez4, you need to use the
  153. <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
  154. variable as follows:
  155. <literallayout class='monospaced'>
  156. DISTRO_FEATURES_BACKFILL_CONSIDERED = "bluez5"
  157. </literallayout>
  158. Setting this variable tells the OpenEmbedded build
  159. system that you have considered but ruled
  160. out using the bluez5 feature and that bluez4 will be
  161. used.
  162. </note>
  163. </para></listitem>
  164. <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
  165. support.</para></listitem>
  166. <listitem><para><emphasis>directfb:</emphasis>
  167. Include DirectFB support.
  168. </para></listitem>
  169. <listitem><para><emphasis>ext2:</emphasis> Include tools for
  170. supporting for devices with internal HDD/Microdrive for
  171. storing files (instead of Flash only devices).
  172. </para></listitem>
  173. <listitem><para><emphasis>ipsec:</emphasis> Include IPSec
  174. support.</para></listitem>
  175. <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
  176. </para></listitem>
  177. <listitem><para><emphasis>irda:</emphasis> Include IrDA support.
  178. </para></listitem>
  179. <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
  180. support (e.g. keymaps will be loaded during boot).
  181. </para></listitem>
  182. <listitem><para><emphasis>nfs:</emphasis> Include NFS client
  183. support (for mounting NFS exports on device).
  184. </para></listitem>
  185. <listitem><para><emphasis>opengl:</emphasis>
  186. Include the Open Graphics Library, which is a
  187. cross-language, multi-platform application programming
  188. interface used for rendering two and three-dimensional
  189. graphics.</para></listitem>
  190. <listitem><para><emphasis>pci:</emphasis> Include PCI bus
  191. support.</para></listitem>
  192. <listitem><para><emphasis>pcmcia:</emphasis> Include
  193. PCMCIA/CompactFlash support.</para></listitem>
  194. <listitem><para><emphasis>ppp:</emphasis> Include PPP dialup
  195. support.</para></listitem>
  196. <listitem><para><emphasis>ptest:</emphasis> Enables building
  197. the package tests where supported by individual recipes.
  198. For more information on package tests, see the
  199. "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
  200. section in the Yocto Project Development Manual.
  201. </para></listitem>
  202. <listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
  203. client support (for mounting Samba/Microsoft Windows shares
  204. on device).</para></listitem>
  205. <listitem><para><emphasis>systemd:</emphasis> Include support
  206. for this <filename>init</filename> manager, which is a full
  207. replacement of for <filename>init</filename> with parallel
  208. starting of services, reduced shell overhead, and other
  209. features.
  210. This <filename>init</filename> manager is used by many
  211. distributions.</para></listitem>
  212. <listitem><para><emphasis>usbgadget:</emphasis> Include USB
  213. Gadget Device support (for USB networking/serial/storage).
  214. </para></listitem>
  215. <listitem><para><emphasis>usbhost:</emphasis> Include USB Host
  216. support (allows to connect external keyboard, mouse,
  217. storage, network etc).</para></listitem>
  218. <listitem><para><emphasis>wayland:</emphasis> Include the
  219. Wayland display server protocol and the library that
  220. supports it.</para></listitem>
  221. <listitem><para><emphasis>wifi:</emphasis> Include WiFi support
  222. (integrated only).</para></listitem>
  223. <listitem><para><emphasis>x11:</emphasis> Include the X server
  224. and libraries.</para></listitem>
  225. </itemizedlist>
  226. </para>
  227. </section>
  228. <section id='ref-features-image'>
  229. <title>Image Features</title>
  230. <para>
  231. The contents of images generated by the OpenEmbedded build system
  232. can be controlled by the
  233. <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
  234. and
  235. <link linkend='var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></link>
  236. variables that you typically configure in your image recipes.
  237. Through these variables, you can add several different
  238. predefined packages such as development utilities or packages with
  239. debug information needed to investigate application problems or
  240. profile applications.
  241. </para>
  242. <para>
  243. The following image features are available for all images:
  244. <itemizedlist>
  245. <listitem><para><emphasis>allow-empty-password:</emphasis>
  246. Allows Dropbear and OpenSSH to accept root logins
  247. and logins from accounts having an empty password string.
  248. </para></listitem>
  249. <listitem><para><emphasis>dbg-pkgs:</emphasis>
  250. Installs debug symbol packages for all packages installed
  251. in a given image.
  252. </para></listitem>
  253. <listitem><para><emphasis>debug-tweaks:</emphasis>
  254. Makes an image suitable for development (e.g.
  255. allows root logins without passwords and enables
  256. post-installation logging).
  257. See the 'allow-empty-password', 'empty-root-password',
  258. and 'post-install-logging' features in this list for
  259. additional information.
  260. </para></listitem>
  261. <listitem><para><emphasis>dev-pkgs:</emphasis>
  262. Installs development packages (headers and extra library
  263. links) for all packages installed in a given image.
  264. </para></listitem>
  265. <listitem><para><emphasis>doc-pkgs:</emphasis> Installs
  266. documentation packages for all packages installed in a
  267. given image.
  268. </para></listitem>
  269. <listitem><para><emphasis>empty-root-password:</emphasis>
  270. Sets the root password to an empty string, which allows
  271. logins with a blank password.
  272. </para></listitem>
  273. <listitem><para><emphasis>package-management:</emphasis>
  274. Installs package management tools and preserves the package
  275. manager database.
  276. </para></listitem>
  277. <listitem><para><emphasis>post-install-logging:</emphasis>
  278. Enables logging postinstall script runs to
  279. the <filename>/var/log/postinstall.log</filename> file
  280. on first boot of the image on the target system.
  281. </para></listitem>
  282. <listitem><para><emphasis>ptest-pkgs:</emphasis>
  283. Installs ptest packages for all ptest-enabled recipes.
  284. </para></listitem>
  285. <listitem><para><emphasis>read-only-rootfs:</emphasis>
  286. Creates an image whose root filesystem is read-only.
  287. See the
  288. "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
  289. section in the Yocto Project Development Manual for more
  290. information.
  291. </para></listitem>
  292. <listitem><para><emphasis>splash:</emphasis>
  293. Enables showing a splash screen during boot.
  294. By default, this screen is provided by
  295. <filename>psplash</filename>, which does allow
  296. customization.
  297. If you prefer to use an alternative splash screen package,
  298. you can do so by setting the <filename>SPLASH</filename>
  299. variable to a different package name (or names) within the
  300. image recipe or at the distro configuration level.
  301. </para></listitem>
  302. <listitem><para><emphasis>staticdev-pkgs:</emphasis>
  303. Installs static development packages, which are
  304. static libraries (i.e. <filename>*.a</filename> files), for
  305. all packages installed in a given image.
  306. </para></listitem>
  307. </itemizedlist>
  308. </para>
  309. <para>
  310. Some image features are available only when you inherit the
  311. <link linkend='ref-classes-core-image'><filename>core-image</filename></link>
  312. class.
  313. The current list of these valid features is as follows:
  314. <itemizedlist>
  315. <listitem><para><emphasis>eclipse-debug:</emphasis> Provides
  316. Eclipse remote debugging support.
  317. </para></listitem>
  318. <listitem><para><emphasis>hwcodecs:</emphasis> Installs
  319. hardware acceleration codecs.
  320. </para></listitem>
  321. <listitem><para><emphasis>nfs-server:</emphasis>
  322. Installs an NFS server.
  323. </para></listitem>
  324. <listitem><para><emphasis>perf:</emphasis>
  325. Installs profiling tools such as
  326. <filename>perf</filename>, <filename>systemtap</filename>,
  327. and <filename>LTTng</filename>.
  328. For general information on user-space tools, see the
  329. <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
  330. </para></listitem>
  331. <listitem><para><emphasis>ssh-server-dropbear:</emphasis>
  332. Installs the Dropbear minimal SSH server.
  333. </para></listitem>
  334. <listitem><para><emphasis>ssh-server-openssh:</emphasis>
  335. Installs the OpenSSH SSH server, which is more
  336. full-featured than Dropbear.
  337. Note that if both the OpenSSH SSH server and the Dropbear
  338. minimal SSH server are present in
  339. <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
  340. precedence and Dropbear will not be installed.
  341. </para></listitem>
  342. <listitem><para><emphasis>tools-debug:</emphasis>
  343. Installs debugging tools such as
  344. <filename>strace</filename> and <filename>gdb</filename>.
  345. For information on GDB, see the
  346. "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
  347. section in the Yocto Project Development Manual.
  348. For information on tracing and profiling, see the
  349. <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
  350. </para></listitem>
  351. <listitem><para><emphasis>tools-sdk:</emphasis>
  352. Installs a full SDK that runs on the device.
  353. </para></listitem>
  354. <listitem><para><emphasis>tools-testapps:</emphasis>
  355. Installs device testing tools (e.g. touchscreen debugging).
  356. </para></listitem>
  357. <listitem><para><emphasis>x11:</emphasis>
  358. Installs the X server.
  359. </para></listitem>
  360. <listitem><para><emphasis>x11-base:</emphasis>
  361. Installs the X server with a minimal environment.
  362. </para></listitem>
  363. <listitem><para><emphasis>x11-sato:</emphasis>
  364. Installs the OpenedHand Sato environment.
  365. </para></listitem>
  366. </itemizedlist>
  367. </para>
  368. </section>
  369. <section id='ref-features-backfill'>
  370. <title>Feature Backfilling</title>
  371. <para>
  372. Sometimes it is necessary in the OpenEmbedded build system to extend
  373. <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
  374. or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
  375. to control functionality that was previously enabled and not able
  376. to be disabled.
  377. For these cases, we need to add an
  378. additional feature item to appear in one of these variables,
  379. but we do not want to force developers who have existing values
  380. of the variables in their configuration to add the new feature
  381. in order to retain the same overall level of functionality.
  382. Thus, the OpenEmbedded build system has a mechanism to
  383. automatically "backfill" these added features into existing
  384. distro or machine configurations.
  385. You can see the list of features for which this is done by
  386. finding the
  387. <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
  388. and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
  389. variables in the <filename>meta/conf/bitbake.conf</filename> file.
  390. </para>
  391. <para>
  392. Because such features are backfilled by default into all
  393. configurations as described in the previous paragraph, developers
  394. who wish to disable the new features need to be able to selectively
  395. prevent the backfilling from occurring.
  396. They can do this by adding the undesired feature or features to the
  397. <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
  398. or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
  399. variables for distro features and machine features respectively.
  400. </para>
  401. <para>
  402. Here are two examples to help illustrate feature backfilling:
  403. <itemizedlist>
  404. <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
  405. Previously, PulseAudio support was enabled within the Qt and
  406. GStreamer frameworks.
  407. Because of this, the feature is backfilled and thus
  408. enabled for all distros through the
  409. <filename>DISTRO_FEATURES_BACKFILL</filename>
  410. variable in the <filename>meta/conf/bitbake.conf</filename> file.
  411. However, your distro needs to disable the feature.
  412. You can disable the feature without affecting
  413. other existing distro configurations that need PulseAudio support
  414. by adding "pulseaudio" to
  415. <filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
  416. in your distro's <filename>.conf</filename> file.
  417. Adding the feature to this variable when it also
  418. exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
  419. variable prevents the build system from adding the feature to
  420. your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
  421. the feature for that particular distro.</para></listitem>
  422. <listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
  423. Previously, real time clock (RTC) support was enabled for all
  424. target devices.
  425. Because of this, the feature is backfilled and thus enabled
  426. for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
  427. variable in the <filename>meta/conf/bitbake.conf</filename> file.
  428. However, your target device does not have this capability.
  429. You can disable RTC support for your device without
  430. affecting other machines that need RTC support
  431. by adding the feature to your machine's
  432. <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
  433. list in the machine's <filename>.conf</filename> file.
  434. Adding the feature to this variable when it also
  435. exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
  436. variable prevents the build system from adding the feature to
  437. your configuration's <filename>MACHINE_FEATURES</filename>, effectively
  438. disabling RTC support for that particular machine.</para></listitem>
  439. </itemizedlist>
  440. </para>
  441. </section>
  442. </chapter>
  443. <!--
  444. vim: expandtab tw=80 ts=4 spell spelllang=en_gb
  445. -->