summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/migration-1.6.rst
blob: f95f45ec9f80e2ff120f3b77e90bf4ce3c1407f5 (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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
Moving to the Yocto Project 1.6 Release
=======================================

This section provides migration information for moving to the Yocto
Project 1.6 Release from the prior release.

.. _migration-1.6-archiver-class:

``archiver`` Class
------------------

The :ref:`archiver <ref-classes-archiver>` class has been rewritten
and its configuration has been simplified. For more details on the
source archiver, see the
":ref:`dev-manual/common-tasks:maintaining open source license compliance during your product's lifecycle`"
section in the Yocto Project Development Tasks Manual.

.. _migration-1.6-packaging-changes:

Packaging Changes
-----------------

The following packaging changes have been made:

-  The ``binutils`` recipe no longer produces a ``binutils-symlinks``
   package. ``update-alternatives`` is now used to handle the preferred
   ``binutils`` variant on the target instead.

-  The tc (traffic control) utilities have been split out of the main
   ``iproute2`` package and put into the ``iproute2-tc`` package.

-  The ``gtk-engines`` schemas have been moved to a dedicated
   ``gtk-engines-schemas`` package.

-  The ``armv7a`` with thumb package architecture suffix has changed.
   The suffix for these packages with the thumb optimization enabled is
   "t2" as it should be. Use of this suffix was not the case in the 1.5
   release. Architecture names will change within package feeds as a
   result.

.. _migration-1.6-bitbake:

BitBake
-------

The following changes have been made to :term:`BitBake`.

.. _migration-1.6-matching-branch-requirement-for-git-fetching:

Matching Branch Requirement for Git Fetching
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When fetching source from a Git repository using
:term:`SRC_URI`, BitBake will now validate the
:term:`SRCREV` value against the branch. You can specify
the branch using the following form:
::

      SRC_URI = "git://server.name/repository;branch=branchname"

If you do not specify a branch, BitBake looks in the default "master" branch.

Alternatively, if you need to bypass this check (e.g. if you are
fetching a revision corresponding to a tag that is not on any branch),
you can add ";nobranch=1" to the end of the URL within ``SRC_URI``.

.. _migration-1.6-bitbake-deps:

Python Definition substitutions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

BitBake had some previously deprecated Python definitions within its
``bb`` module removed. You should use their sub-module counterparts
instead:

-  ``bb.MalformedUrl``: Use ``bb.fetch.MalformedUrl``.

-  ``bb.encodeurl``: Use ``bb.fetch.encodeurl``.

-  ``bb.decodeurl``: Use ``bb.fetch.decodeurl``

-  ``bb.mkdirhier``: Use ``bb.utils.mkdirhier``.

-  ``bb.movefile``: Use ``bb.utils.movefile``.

-  ``bb.copyfile``: Use ``bb.utils.copyfile``.

-  ``bb.which``: Use ``bb.utils.which``.

-  ``bb.vercmp_string``: Use ``bb.utils.vercmp_string``.

-  ``bb.vercmp``: Use ``bb.utils.vercmp``.

.. _migration-1.6-bitbake-fetcher:

SVK Fetcher
~~~~~~~~~~~

The SVK fetcher has been removed from BitBake.

.. _migration-1.6-bitbake-console-output:

Console Output Error Redirection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The BitBake console UI will now output errors to ``stderr`` instead of
``stdout``. Consequently, if you are piping or redirecting the output of
``bitbake`` to somewhere else, and you wish to retain the errors, you
will need to add ``2>&1`` (or something similar) to the end of your
``bitbake`` command line.

.. _migration-1.6-task-taskname-overrides:

``task-``\ taskname Overrides
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``task-``\ taskname overrides have been adjusted so that tasks whose
names contain underscores have the underscores replaced by hyphens for
the override so that they now function properly. For example, the task
override for :ref:`ref-tasks-populate_sdk` is
``task-populate-sdk``.

.. _migration-1.6-variable-changes:

Changes to Variables
--------------------

The following variables have changed. For information on the
OpenEmbedded build system variables, see the ":doc:`ref-variables`" Chapter.

.. _migration-1.6-variable-changes-TMPDIR:

``TMPDIR``
~~~~~~~~~~

:term:`TMPDIR` can no longer be on an NFS mount. NFS does
not offer full POSIX locking and inode consistency and can cause
unexpected issues if used to store ``TMPDIR``.

The check for this occurs on startup. If ``TMPDIR`` is detected on an
NFS mount, an error occurs.

.. _migration-1.6-variable-changes-PRINC:

``PRINC``
~~~~~~~~~

The ``PRINC`` variable has been deprecated and triggers a warning if
detected during a build. For :term:`PR` increments on changes,
use the PR service instead. You can find out more about this service in
the ":ref:`dev-manual/common-tasks:working with a pr service`"
section in the Yocto Project Development Tasks Manual.

.. _migration-1.6-variable-changes-IMAGE_TYPES:

``IMAGE_TYPES``
~~~~~~~~~~~~~~~

The "sum.jffs2" option for :term:`IMAGE_TYPES` has
been replaced by the "jffs2.sum" option, which fits the processing
order.

.. _migration-1.6-variable-changes-COPY_LIC_MANIFEST:

``COPY_LIC_MANIFEST``
~~~~~~~~~~~~~~~~~~~~~

The :term:`COPY_LIC_MANIFEST` variable must now
be set to "1" rather than any value in order to enable it.

.. _migration-1.6-variable-changes-COPY_LIC_DIRS:

``COPY_LIC_DIRS``
~~~~~~~~~~~~~~~~~

The :term:`COPY_LIC_DIRS` variable must now be set
to "1" rather than any value in order to enable it.

.. _migration-1.6-variable-changes-PACKAGE_GROUP:

``PACKAGE_GROUP``
~~~~~~~~~~~~~~~~~

The ``PACKAGE_GROUP`` variable has been renamed to
:term:`FEATURE_PACKAGES` to more accurately
reflect its purpose. You can still use ``PACKAGE_GROUP`` but the
OpenEmbedded build system produces a warning message when it encounters
the variable.

.. _migration-1.6-variable-changes-variable-entry-behavior:

Preprocess and Post Process Command Variable Behavior
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following variables now expect a semicolon separated list of
functions to call and not arbitrary shell commands:

  - :term:`ROOTFS_PREPROCESS_COMMAND`
  - :term:`ROOTFS_POSTPROCESS_COMMAND`
  - :term:`SDK_POSTPROCESS_COMMAND`
  - :term:`POPULATE_SDK_POST_TARGET_COMMAND`
  - :term:`POPULATE_SDK_POST_HOST_COMMAND`
  - :term:`IMAGE_POSTPROCESS_COMMAND`
  - :term:`IMAGE_PREPROCESS_COMMAND`
  - :term:`ROOTFS_POSTUNINSTALL_COMMAND`
  - :term:`ROOTFS_POSTINSTALL_COMMAND`

For
migration purposes, you can simply wrap shell commands in a shell
function and then call the function. Here is an example: ::

   my_postprocess_function() {
      echo "hello" > ${IMAGE_ROOTFS}/hello.txt
   }
   ROOTFS_POSTPROCESS_COMMAND += "my_postprocess_function; "

.. _migration-1.6-package-test-ptest:

Package Test (ptest)
--------------------

Package Tests (ptest) are built but not installed by default. For
information on using Package Tests, see the
":ref:`dev-manual/common-tasks:testing packages with ptest`"
section in the Yocto Project Development Tasks Manual. For information on the
``ptest`` class, see the ":ref:`ptest.bbclass <ref-classes-ptest>`"
section.

.. _migration-1.6-build-changes:

Build Changes
-------------

Separate build and source directories have been enabled by default for
selected recipes where it is known to work (a whitelist) and for all
recipes that inherit the :ref:`cmake <ref-classes-cmake>` class. In
future releases the :ref:`autotools <ref-classes-autotools>` class
will enable a separate build directory by default as well. Recipes
building Autotools-based software that fails to build with a separate
build directory should be changed to inherit from the
:ref:`autotools-brokensep <ref-classes-autotools>` class instead of
the ``autotools`` or ``autotools_stage``\ classes.

.. _migration-1.6-building-qemu-native:

``qemu-native``
---------------

``qemu-native`` now builds without SDL-based graphical output support by
default. The following additional lines are needed in your
``local.conf`` to enable it:
::

   PACKAGECONFIG_pn-qemu-native = "sdl"
   ASSUME_PROVIDED += "libsdl-native"

.. note::

   The default ``local.conf`` contains these statements. Consequently, if you
   are building a headless system and using a default ``local.conf``
   file, you will need comment these two lines out.

.. _migration-1.6-core-image-basic:

``core-image-basic``
--------------------

``core-image-basic`` has been renamed to ``core-image-full-cmdline``.

In addition to ``core-image-basic`` being renamed,
``packagegroup-core-basic`` has been renamed to
``packagegroup-core-full-cmdline`` to match.

.. _migration-1.6-licensing:

Licensing
---------

The top-level ``LICENSE`` file has been changed to better describe the
license of the various components of :term:`OpenEmbedded-Core (OE-Core)`. However,
the licensing itself remains unchanged.

Normally, this change would not cause any side-effects. However, some
recipes point to this file within
:term:`LIC_FILES_CHKSUM` (as
``${COREBASE}/LICENSE``) and thus the accompanying checksum must be
changed from 3f40d7994397109285ec7b81fdeb3b58 to
4d92cd373abda3937c2bc47fbc49d690. A better alternative is to have
``LIC_FILES_CHKSUM`` point to a file describing the license that is
distributed with the source that the recipe is building, if possible,
rather than pointing to ``${COREBASE}/LICENSE``.

.. _migration-1.6-cflags-options:

``CFLAGS`` Options
------------------

The "-fpermissive" option has been removed from the default
:term:`CFLAGS` value. You need to take action on
individual recipes that fail when building with this option. You need to
either patch the recipes to fix the issues reported by the compiler, or
you need to add "-fpermissive" to ``CFLAGS`` in the recipes.

.. _migration-1.6-custom-images:

Custom Image Output Types
-------------------------

Custom image output types, as selected using
:term:`IMAGE_FSTYPES`, must declare their
dependencies on other image types (if any) using a new
:term:`IMAGE_TYPEDEP` variable.

.. _migration-1.6-do-package-write-task:

Tasks
-----

The ``do_package_write`` task has been removed. The task is no longer
needed.

.. _migration-1.6-update-alternatives-provider:

``update-alternative`` Provider
-------------------------------

The default ``update-alternatives`` provider has been changed from
``opkg`` to ``opkg-utils``. This change resolves some troublesome
circular dependencies. The runtime package has also been renamed from
``update-alternatives-cworth`` to ``update-alternatives-opkg``.

.. _migration-1.6-virtclass-overrides:

``virtclass`` Overrides
-----------------------

The ``virtclass`` overrides are now deprecated. Use the equivalent class
overrides instead (e.g. ``virtclass-native`` becomes ``class-native``.)

.. _migration-1.6-removed-renamed-recipes:

Removed and Renamed Recipes
---------------------------

The following recipes have been removed:

-  ``packagegroup-toolset-native`` - This recipe is largely unused.

-  ``linux-yocto-3.8`` - Support for the Linux yocto 3.8 kernel has been
   dropped. Support for the 3.10 and 3.14 kernels have been added with
   the ``linux-yocto-3.10`` and ``linux-yocto-3.14`` recipes.

-  ``ocf-linux`` - This recipe has been functionally replaced using
   ``cryptodev-linux``.

-  ``genext2fs`` - ``genext2fs`` is no longer used by the build system
   and is unmaintained upstream.

-  ``js`` - This provided an ancient version of Mozilla's javascript
   engine that is no longer needed.

-  ``zaurusd`` - The recipe has been moved to the ``meta-handheld``
   layer.

-  ``eglibc 2.17`` - Replaced by the ``eglibc 2.19`` recipe.

-  ``gcc 4.7.2`` - Replaced by the now stable ``gcc 4.8.2``.

-  ``external-sourcery-toolchain`` - this recipe is now maintained in
   the ``meta-sourcery`` layer.

-  ``linux-libc-headers-yocto 3.4+git`` - Now using version 3.10 of the
   ``linux-libc-headers`` by default.

-  ``meta-toolchain-gmae`` - This recipe is obsolete.

-  ``packagegroup-core-sdk-gmae`` - This recipe is obsolete.

-  ``packagegroup-core-standalone-gmae-sdk-target`` - This recipe is
   obsolete.

.. _migration-1.6-removed-classes:

Removed Classes
---------------

The following classes have become obsolete and have been removed:

-  ``module_strip``

-  ``pkg_metainfo``

-  ``pkg_distribute``

-  ``image-empty``

.. _migration-1.6-reference-bsps:

Reference Board Support Packages (BSPs)
---------------------------------------

The following reference BSPs changes occurred:

-  The BeagleBoard (``beagleboard``) ARM reference hardware has been
   replaced by the BeagleBone (``beaglebone``) hardware.

-  The RouterStation Pro (``routerstationpro``) MIPS reference hardware
   has been replaced by the EdgeRouter Lite (``edgerouter``) hardware.

The previous reference BSPs for the ``beagleboard`` and
``routerstationpro`` machines are still available in a new
``meta-yocto-bsp-old`` layer in the
:yocto_git:`Source Repositories <>` at
:yocto_git:`/meta-yocto-bsp-old/`.