summaryrefslogtreecommitdiffstats
path: root/documentation/poky-ref-manual/ref-features.xml
blob: 8c3304aa72f43661df74743c0d81b8620a5ba6bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >

<chapter id='ref-features'>
    <title>Reference: Features</title>

    <para>
        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
        <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
        variable, which is set in the <filename>poky.conf</filename> distribution configuration file.
        Machine features are set in the
        <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
        variable, which is set in the machine configuration file and
        specifies the hardware features for a given machine.
    </para>

    <para>
        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.
    </para>

    <section id='ref-features-distro'>
        <title>Distro</title>

        <para>
            The items below are valid options for 
            <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>:
            <itemizedlist>
                <listitem><para><emphasis>alsa:</emphasis> ALSA support will be included (OSS compatibility 
                    kernel modules will be installed if available).</para></listitem>
                <listitem><para><emphasis>bluetooth:</emphasis> Include bluetooth support (integrated BT only)
                    </para></listitem>
                <listitem><para><emphasis>ext2:</emphasis> Include tools for supporting for devices with internal
                    HDD/Microdrive for storing files (instead of Flash only devices)
                    </para></listitem>
                <listitem><para><emphasis>irda:</emphasis> Include Irda support
                    </para></listitem>
                <listitem><para><emphasis>keyboard:</emphasis> Include keyboard support (e.g. keymaps will be 
                    loaded during boot).
                    </para></listitem>
                <listitem><para><emphasis>pci:</emphasis> Include PCI bus support
                    </para></listitem>
                <listitem><para><emphasis>pcmcia:</emphasis> Include PCMCIA/CompactFlash support
                    </para></listitem>
                <listitem><para><emphasis>usbgadget:</emphasis> USB Gadget Device support (for USB
                    networking/serial/storage)
                    </para></listitem>
                <listitem><para><emphasis>usbhost:</emphasis> USB Host support (allows to connect external
                    keyboard, mouse, storage, network etc)
                    </para></listitem>
                <listitem><para><emphasis>wifi:</emphasis> WiFi support (integrated only)
                    </para></listitem>
                <listitem><para><emphasis>cramfs:</emphasis> CramFS support
                    </para></listitem>
                <listitem><para><emphasis>ipsec:</emphasis> IPSec support
                    </para></listitem>
                <listitem><para><emphasis>ipv6:</emphasis> IPv6 support
                    </para></listitem>
                <listitem><para><emphasis>nfs:</emphasis> NFS client support (for mounting NFS exports on
                    device)</para></listitem>
                <listitem><para><emphasis>ppp:</emphasis> PPP dialup support</para></listitem>
                <listitem><para><emphasis>smbfs:</emphasis> SMB networks client support (for mounting
                    Samba/Microsoft Windows shares on device)</para></listitem>
            </itemizedlist>
        </para>
    </section>

    <section id='ref-features-machine'>
        <title>Machine</title>

        <para>
            The items below are valid options for 
            <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>:
            <itemizedlist>
                <listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
                    </para></listitem>
                <listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
                    </para></listitem>
                <listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
                    </para></listitem>
                <listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
                    </para></listitem>
                <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
                    </para></listitem>
                <listitem><para><emphasis>irda:</emphasis> Hardware has Irda support
                    </para></listitem>
                <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
                    </para></listitem>
                <listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
                    </para></listitem>
                <listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
                    </para></listitem>
                <listitem><para><emphasis>screen:</emphasis> Hardware has a screen
                    </para></listitem>
                <listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
                    </para></listitem>
                <listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
                    </para></listitem>
                <listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
                    </para></listitem>
                <listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
                    </para></listitem>
                <listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
                    </para></listitem>
            </itemizedlist>
        </para>
    </section>

    <section id='ref-features-image'>
        <title>Images</title>

        <para>
            The contents of images generated by the OpenEmbedded build system can be controlled by the 
            <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
            and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
            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.
        </para>

        <para>
            Current list of 
            <filename>IMAGE_FEATURES</filename> contains the following:
            <itemizedlist>
                <listitem><para><emphasis>splash:</emphasis> Enables showing a splash screen during boot. 
                    By default, this screen is provided by <filename>psplash</filename>, which does 
                    allow customization. 
                    If you prefer to use an alternative splash screen package, you can do so by 
                    setting the <filename>SPLASH</filename> variable
                    to a different package name (or names) within the image recipe or at the distro
                    configuration level.</para></listitem>
                <listitem><para><emphasis>ssh-server-dropbear:</emphasis> Installs the Dropbear minimal 
                    SSH server.
                    </para></listitem>
                <listitem><para><emphasis>ssh-server-openssh:</emphasis> 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 <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
                    precedence and Dropbear will not be installed.</para></listitem>
                <listitem><para><emphasis>x11:</emphasis> Installs the X server</para></listitem>
                <listitem><para><emphasis>x11-base:</emphasis> Installs the X server with a 
                    minimal environment.</para></listitem>
                <listitem><para><emphasis>x11-sato:</emphasis> Installs the OpenedHand Sato environment.
                    </para></listitem>
                <listitem><para><emphasis>tools-sdk:</emphasis> Installs a full SDK that runs on the device.
                    </para></listitem>
                <listitem><para><emphasis>tools-debug:</emphasis> Installs debugging tools such as 
                    <filename>strace</filename> and <filename>gdb</filename>.
                    </para></listitem>
                <listitem><para><emphasis>tools-profile:</emphasis> Installs profiling tools such as 
                    <filename>oprofile</filename>, <filename>exmap</filename>, and 
                    <filename>LTTng</filename>.</para></listitem>
                <listitem><para><emphasis>tools-testapps:</emphasis> Installs device testing tools (e.g.
                    touchscreen debugging).</para></listitem>
                <listitem><para><emphasis>nfs-server:</emphasis> Installs an NFS server.</para></listitem>
                <listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and 
                    extra library links) for all packages installed in a given image.</para></listitem>
                <listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development 
                    packages (i.e. static libraries containing <filename>*.a</filename> files) for all 
                    packages installed in a given image.</para></listitem>
                <listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages 
                    installed in a given image.</para></listitem>
                <listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages 
                    installed in a given image.</para></listitem>
            </itemizedlist>
        </para>
    </section>

    <section id='ref-features-backfill'>
        <title>Feature Backfilling</title>

        <para>
            Sometimes it is necessary to add a new feature option to the 
            <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
            or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
            lists and have it affect all configurations.
            For example, suppose new functionality is developed and it must be enabled
            by default for all configurations.
        </para>

        <para>
            Sometimes it is also necessary to disable (remove) a feature
            option, which has been previously enabled by default, from the machine or distro lists. 
            For example, perhaps a mandatory distro feature becomes optional.
            How can you remove the feature option from the 
            <filename>DISTRO_FEATURES</filename> list
            without disturbing all the existing configurations that still 
            might need the feature?
            Feature backfilling allows you "backfill" the feature into all the 
            configurations and then lets you selectively prevent the feature from 
            being added to <filename>MACHINE_FEATURES</filename> and 
            <filename>DISTRO_FEATURES</filename> lists.
        </para>      

        <para>
            Here are two examples to help illustrate feature backfilling:
            <itemizedlist>
                <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>: 
                    Previously, PulseAudio support was enabled within the Qt and 
                    GStreamer frameworks.
                    However, you might need to disable the feature for your 
                    distro.
                    You can disable the feature without affecting 
                    other existing distro configurations that need PulseAudio support
                    by doing the following:
                    <itemizedlist>
                        <listitem><para>Add "pulseaudio" to 
                            <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
                            within your <filename>meta/conf/bitbake.conf</filename> file.
                            Adding the feature option causes the build process 
                            to automatically add "pulseaudio" to 
                            <filename>DISTRO_FEATURES</filename> without the need to 
                            update any distro configurations.
                            This step by itself enables the feature
                            for all distros and consequently ensures that existing 
                            configurations that still need the feature are 
                            undisturbed.</para></listitem>
                        <listitem><para>Add "pulseaudio" to
                            <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
                            in your distro's <filename>.conf</filename> file.
                            Adding the feature option to this variable when it also
                            exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
                            variable prevents the build system from adding the feature option to 
                            <filename>DISTRO_FEATURES</filename>, effectively disabling
                            the feature for that particular distro.</para></listitem>
                    </itemizedlist></para></listitem>
                <listitem><para><emphasis>The "rtc" machine feature option</emphasis>: 
                    Previously, real time clock (RTC) support was enabled for all 
                    target devices.
                    However, your target device does not have this capability.
                    You can disable RTC support for your device without 
                    affecting other machines where RTC support should remain enabled
                    by doing the following:
                    <itemizedlist>
                        <listitem><para>Add "rtc" to <filename>MACHINE_FEATURES_BACKFILL</filename>
                            within your <filename>meta/conf/bitbake.conf</filename>.
                            Adding the feature option causes the build process 
                            to automatically add "rtc" to 
                            <filename>MACHINE_FEATURES</filename> without the need to
                            update any machine configurations.
                            This step by itself enables RTC support for all machines
                            and consequently ensures that existing configurations
                            that still need the feature are undisturbed.</para></listitem>
                        <listitem><para>Add "rtc" to
                            <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
                            in your machine's <filename>.conf</filename> file.
                            Adding the feature option to this variable when it also
                            exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
                            variable prevents the build system from adding the feature option to 
                            <filename>MACHINE_FEATURES</filename>, effectively disabling
                            RTC support for feature that particular machine.</para></listitem>
                    </itemizedlist></para></listitem>
            </itemizedlist>
        </para>
    </section>
</chapter>

<!-- 
vim: expandtab tw=80 ts=4 spell spelllang=en_gb
-->