summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/migration.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/ref-manual/migration.rst')
-rw-r--r--documentation/ref-manual/migration.rst5081
1 files changed, 5081 insertions, 0 deletions
diff --git a/documentation/ref-manual/migration.rst b/documentation/ref-manual/migration.rst
new file mode 100644
index 0000000000..6ddfa93833
--- /dev/null
+++ b/documentation/ref-manual/migration.rst
@@ -0,0 +1,5081 @@
1******************************************
2Migrating to a Newer Yocto Project Release
3******************************************
4
5This chapter provides information you can use to migrate work to a newer
6Yocto Project release. You can find the same information in the release
7notes for a given release.
8
9General Migration Considerations
10================================
11
12Some considerations are not tied to a specific Yocto Project release.
13This section presents information you should consider when migrating to
14any new Yocto Project release.
15
16- *Dealing with Customized Recipes*: Issues could arise if you take
17 older recipes that contain customizations and simply copy them
18 forward expecting them to work after you migrate to new Yocto Project
19 metadata. For example, suppose you have a recipe in your layer that
20 is a customized version of a core recipe copied from the earlier
21 release, rather than through the use of an append file. When you
22 migrate to a newer version of Yocto Project, the metadata (e.g.
23 perhaps an include file used by the recipe) could have changed in a
24 way that would break the build. Say, for example, a function is
25 removed from an include file and the customized recipe tries to call
26 that function.
27
28 You could "forward-port" all your customizations in your recipe so
29 that everything works for the new release. However, this is not the
30 optimal solution as you would have to repeat this process with each
31 new release if changes occur that give rise to problems.
32
33 The better solution (where practical) is to use append files
34 (``*.bbappend``) to capture any customizations you want to make to a
35 recipe. Doing so, isolates your changes from the main recipe making
36 them much more manageable. However, sometimes it is not practical to
37 use an append file. A good example of this is when introducing a
38 newer or older version of a recipe in another layer.
39
40- *Updating Append Files*: Since append files generally only contain
41 your customizations, they often do not need to be adjusted for new
42 releases. However, if the ``.bbappend`` file is specific to a
43 particular version of the recipe (i.e. its name does not use the %
44 wildcard) and the version of the recipe to which it is appending has
45 changed, then you will at a minimum need to rename the append file to
46 match the name of the recipe file. A mismatch between an append file
47 and its corresponding recipe file (``.bb``) will trigger an error
48 during parsing.
49
50 Depending on the type of customization the append file applies, other
51 incompatibilities might occur when you upgrade. For example, if your
52 append file applies a patch and the recipe to which it is appending
53 is updated to a newer version, the patch might no longer apply. If
54 this is the case and assuming the patch is still needed, you must
55 modify the patch file so that it does apply.
56
57Moving to the Yocto Project 1.3 Release
58=======================================
59
60This section provides migration information for moving to the Yocto
61Project 1.3 Release from the prior release.
62
63.. _1.3-local-configuration:
64
65Local Configuration
66-------------------
67
68Differences include changes for
69```SSTATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__ and ``bblayers.conf``.
70
71.. _migration-1.3-sstate-mirrors:
72
73SSTATE_MIRRORS
74~~~~~~~~~~~~~~
75
76The shared state cache (sstate-cache), as pointed to by
77```SSTATE_DIR`` <#var-SSTATE_DIR>`__, by default now has two-character
78subdirectories to prevent issues arising from too many files in the same
79directory. Also, native sstate-cache packages, which are built to run on
80the host system, will go into a subdirectory named using the distro ID
81string. If you copy the newly structured sstate-cache to a mirror
82location (either local or remote) and then point to it in
83```SSTATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__, you need to append "PATH"
84to the end of the mirror URL so that the path used by BitBake before the
85mirror substitution is appended to the path used to access the mirror.
86Here is an example: SSTATE_MIRRORS = "file://.\*
87http://someserver.tld/share/sstate/PATH"
88
89.. _migration-1.3-bblayers-conf:
90
91bblayers.conf
92~~~~~~~~~~~~~
93
94The ``meta-yocto`` layer consists of two parts that correspond to the
95Poky reference distribution and the reference hardware Board Support
96Packages (BSPs), respectively: ``meta-yocto`` and ``meta-yocto-bsp``.
97When running BitBake for the first time after upgrading, your
98``conf/bblayers.conf`` file will be updated to handle this change and
99you will be asked to re-run or restart for the changes to take effect.
100
101.. _1.3-recipes:
102
103Recipes
104-------
105
106Differences include changes for the following:
107
108- Python function whitespace
109
110- ``proto=`` in ``SRC_URI``
111
112- ``nativesdk``
113
114- Task recipes
115
116- ``IMAGE_FEATURES``
117
118- Removed recipes
119
120.. _migration-1.3-python-function-whitespace:
121
122Python Function Whitespace
123~~~~~~~~~~~~~~~~~~~~~~~~~~
124
125All Python functions must now use four spaces for indentation.
126Previously, an inconsistent mix of spaces and tabs existed, which made
127extending these functions using ``_append`` or ``_prepend`` complicated
128given that Python treats whitespace as syntactically significant. If you
129are defining or extending any Python functions (e.g.
130``populate_packages``, ``do_unpack``, ``do_patch`` and so forth) in
131custom recipes or classes, you need to ensure you are using consistent
132four-space indentation.
133
134.. _migration-1.3-proto=-in-src-uri:
135
136proto= in SRC_URI
137~~~~~~~~~~~~~~~~~
138
139Any use of ``proto=`` in ```SRC_URI`` <#var-SRC_URI>`__ needs to be
140changed to ``protocol=``. In particular, this applies to the following
141URIs:
142
143- ``svn://``
144
145- ``bzr://``
146
147- ``hg://``
148
149- ``osc://``
150
151Other URIs were already using ``protocol=``. This change improves
152consistency.
153
154.. _migration-1.3-nativesdk:
155
156nativesdk
157~~~~~~~~~
158
159The suffix ``nativesdk`` is now implemented as a prefix, which
160simplifies a lot of the packaging code for ``nativesdk`` recipes. All
161custom ``nativesdk`` recipes, which are relocatable packages that are
162native to ```SDK_ARCH`` <#var-SDK_ARCH>`__, and any references need to
163be updated to use ``nativesdk-*`` instead of ``*-nativesdk``.
164
165.. _migration-1.3-task-recipes:
166
167Task Recipes
168~~~~~~~~~~~~
169
170"Task" recipes are now known as "Package groups" and have been renamed
171from ``task-*.bb`` to ``packagegroup-*.bb``. Existing references to the
172previous ``task-*`` names should work in most cases as there is an
173automatic upgrade path for most packages. However, you should update
174references in your own recipes and configurations as they could be
175removed in future releases. You should also rename any custom ``task-*``
176recipes to ``packagegroup-*``, and change them to inherit
177``packagegroup`` instead of ``task``, as well as taking the opportunity
178to remove anything now handled by ``packagegroup.bbclass``, such as
179providing ``-dev`` and ``-dbg`` packages, setting
180```LIC_FILES_CHKSUM`` <#var-LIC_FILES_CHKSUM>`__, and so forth. See the
181"```packagegroup.bbclass`` <#ref-classes-packagegroup>`__" section for
182further details.
183
184.. _migration-1.3-image-features:
185
186IMAGE_FEATURES
187~~~~~~~~~~~~~~
188
189Image recipes that previously included "apps-console-core" in
190```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ should now include "splash"
191instead to enable the boot-up splash screen. Retaining
192"apps-console-core" will still include the splash screen but generates a
193warning. The "apps-x11-core" and "apps-x11-games" ``IMAGE_FEATURES``
194features have been removed.
195
196.. _migration-1.3-removed-recipes:
197
198Removed Recipes
199~~~~~~~~~~~~~~~
200
201The following recipes have been removed. For most of them, it is
202unlikely that you would have any references to them in your own
203`Metadata <#metadata>`__. However, you should check your metadata
204against this list to be sure:
205
206- *``libx11-trim``*: Replaced by ``libx11``, which has a negligible
207 size difference with modern Xorg.
208
209- *``xserver-xorg-lite``*: Use ``xserver-xorg``, which has a negligible
210 size difference when DRI and GLX modules are not installed.
211
212- *``xserver-kdrive``*: Effectively unmaintained for many years.
213
214- *``mesa-xlib``*: No longer serves any purpose.
215
216- *``galago``*: Replaced by telepathy.
217
218- *``gail``*: Functionality was integrated into GTK+ 2.13.
219
220- *``eggdbus``*: No longer needed.
221
222- *``gcc-*-intermediate``*: The build has been restructured to avoid
223 the need for this step.
224
225- *``libgsmd``*: Unmaintained for many years. Functionality now
226 provided by ``ofono`` instead.
227
228- *contacts, dates, tasks, eds-tools*: Largely unmaintained PIM
229 application suite. It has been moved to ``meta-gnome`` in
230 ``meta-openembedded``.
231
232In addition to the previously listed changes, the ``meta-demoapps``
233directory has also been removed because the recipes in it were not being
234maintained and many had become obsolete or broken. Additionally, these
235recipes were not parsed in the default configuration. Many of these
236recipes are already provided in an updated and maintained form within
237the OpenEmbedded community layers such as ``meta-oe`` and
238``meta-gnome``. For the remainder, you can now find them in the
239``meta-extras`` repository, which is in the Yocto Project `Source
240Repositories <&YOCTO_DOCS_OM_URL;#source-repositories>`__.
241
242.. _1.3-linux-kernel-naming:
243
244Linux Kernel Naming
245-------------------
246
247The naming scheme for kernel output binaries has been changed to now
248include ```PE`` <#var-PE>`__ as part of the filename:
249KERNEL_IMAGE_BASE_NAME ?=
250"${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
251
252Because the ``PE`` variable is not set by default, these binary files
253could result with names that include two dash characters. Here is an
254example:
255bzImage--3.10.9+git0+cd502a8814_7144bcc4b8-r0-qemux86-64-20130830085431.bin
256
257Moving to the Yocto Project 1.4 Release
258=======================================
259
260This section provides migration information for moving to the Yocto
261Project 1.4 Release from the prior release.
262
263.. _migration-1.4-bitbake:
264
265BitBake
266-------
267
268Differences include the following:
269
270- *Comment Continuation:* If a comment ends with a line continuation
271 (\) character, then the next line must also be a comment. Any
272 instance where this is not the case, now triggers a warning. You must
273 either remove the continuation character, or be sure the next line is
274 a comment.
275
276- *Package Name Overrides:* The runtime package specific variables
277 ```RDEPENDS`` <#var-RDEPENDS>`__,
278 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__,
279 ```RSUGGESTS`` <#var-RSUGGESTS>`__,
280 ```RPROVIDES`` <#var-RPROVIDES>`__,
281 ```RCONFLICTS`` <#var-RCONFLICTS>`__,
282 ```RREPLACES`` <#var-RREPLACES>`__, ```FILES`` <#var-FILES>`__,
283 ```ALLOW_EMPTY`` <#var-ALLOW_EMPTY>`__, and the pre, post, install,
284 and uninstall script functions ``pkg_preinst``, ``pkg_postinst``,
285 ``pkg_prerm``, and ``pkg_postrm`` should always have a package name
286 override. For example, use ``RDEPENDS_${PN}`` for the main package
287 instead of ``RDEPENDS``. BitBake uses more strict checks when it
288 parses recipes.
289
290.. _migration-1.4-build-behavior:
291
292Build Behavior
293--------------
294
295Differences include the following:
296
297- *Shared State Code:* The shared state code has been optimized to
298 avoid running unnecessary tasks. For example, the following no longer
299 populates the target sysroot since that is not necessary: $ bitbake
300 -c rootfs some-image Instead, the system just needs to extract the
301 output package contents, re-create the packages, and construct the
302 root filesystem. This change is unlikely to cause any problems unless
303 you have missing declared dependencies.
304
305- *Scanning Directory Names:* When scanning for files in
306 ```SRC_URI`` <#var-SRC_URI>`__, the build system now uses
307 ```FILESOVERRIDES`` <#var-FILESOVERRIDES>`__ instead of
308 ```OVERRIDES`` <#var-OVERRIDES>`__ for the directory names. In
309 general, the values previously in ``OVERRIDES`` are now in
310 ``FILESOVERRIDES`` as well. However, if you relied upon an additional
311 value you previously added to ``OVERRIDES``, you might now need to
312 add it to ``FILESOVERRIDES`` unless you are already adding it through
313 the ```MACHINEOVERRIDES`` <#var-MACHINEOVERRIDES>`__ or
314 ```DISTROOVERRIDES`` <#var-DISTROOVERRIDES>`__ variables, as
315 appropriate. For more related changes, see the
316 "`Variables <#migration-1.4-variables>`__" section.
317
318.. _migration-1.4-proxies-and-fetching-source:
319
320Proxies and Fetching Source
321---------------------------
322
323A new ``oe-git-proxy`` script has been added to replace previous methods
324of handling proxies and fetching source from Git. See the
325``meta-yocto/conf/site.conf.sample`` file for information on how to use
326this script.
327
328.. _migration-1.4-custom-interfaces-file-netbase-change:
329
330Custom Interfaces File (netbase change)
331---------------------------------------
332
333If you have created your own custom ``etc/network/interfaces`` file by
334creating an append file for the ``netbase`` recipe, you now need to
335create an append file for the ``init-ifupdown`` recipe instead, which
336you can find in the `Source Directory <#source-directory>`__ at
337``meta/recipes-core/init-ifupdown``. For information on how to use
338append files, see the "`Using .bbappend
339Files <&YOCTO_DOCS_DEV_URL;#using-bbappend-files>`__" section in the
340Yocto Project Development Tasks Manual.
341
342.. _migration-1.4-remote-debugging:
343
344Remote Debugging
345----------------
346
347Support for remote debugging with the Eclipse IDE is now separated into
348an image feature (``eclipse-debug``) that corresponds to the
349``packagegroup-core-eclipse-debug`` package group. Previously, the
350debugging feature was included through the ``tools-debug`` image
351feature, which corresponds to the ``packagegroup-core-tools-debug``
352package group.
353
354.. _migration-1.4-variables:
355
356Variables
357---------
358
359The following variables have changed:
360
361- *``SANITY_TESTED_DISTROS``:* This variable now uses a distribution
362 ID, which is composed of the host distributor ID followed by the
363 release. Previously,
364 ```SANITY_TESTED_DISTROS`` <#var-SANITY_TESTED_DISTROS>`__ was
365 composed of the description field. For example, "Ubuntu 12.10"
366 becomes "Ubuntu-12.10". You do not need to worry about this change if
367 you are not specifically setting this variable, or if you are
368 specifically setting it to "".
369
370- *``SRC_URI``:* The ``${``\ ```PN`` <#var-PN>`__\ ``}``,
371 ``${``\ ```PF`` <#var-PF>`__\ ``}``,
372 ``${``\ ```P`` <#var-P>`__\ ``}``, and ``FILE_DIRNAME`` directories
373 have been dropped from the default value of the
374 ```FILESPATH`` <#var-FILESPATH>`__ variable, which is used as the
375 search path for finding files referred to in
376 ```SRC_URI`` <#var-SRC_URI>`__. If you have a recipe that relied upon
377 these directories, which would be unusual, then you will need to add
378 the appropriate paths within the recipe or, alternatively, rearrange
379 the files. The most common locations are still covered by ``${BP}``,
380 ``${BPN}``, and "files", which all remain in the default value of
381 ```FILESPATH`` <#var-FILESPATH>`__.
382
383.. _migration-target-package-management-with-rpm:
384
385Target Package Management with RPM
386----------------------------------
387
388If runtime package management is enabled and the RPM backend is
389selected, Smart is now installed for package download, dependency
390resolution, and upgrades instead of Zypper. For more information on how
391to use Smart, run the following command on the target: smart --help
392
393.. _migration-1.4-recipes-moved:
394
395Recipes Moved
396-------------
397
398The following recipes were moved from their previous locations because
399they are no longer used by anything in the OpenEmbedded-Core:
400
401- *``clutter-box2d``:* Now resides in the ``meta-oe`` layer.
402
403- *``evolution-data-server``:* Now resides in the ``meta-gnome`` layer.
404
405- *``gthumb``:* Now resides in the ``meta-gnome`` layer.
406
407- *``gtkhtml2``:* Now resides in the ``meta-oe`` layer.
408
409- *``gupnp``:* Now resides in the ``meta-multimedia`` layer.
410
411- *``gypsy``:* Now resides in the ``meta-oe`` layer.
412
413- *``libcanberra``:* Now resides in the ``meta-gnome`` layer.
414
415- *``libgdata``:* Now resides in the ``meta-gnome`` layer.
416
417- *``libmusicbrainz``:* Now resides in the ``meta-multimedia`` layer.
418
419- *``metacity``:* Now resides in the ``meta-gnome`` layer.
420
421- *``polkit``:* Now resides in the ``meta-oe`` layer.
422
423- *``zeroconf``:* Now resides in the ``meta-networking`` layer.
424
425.. _migration-1.4-removals-and-renames:
426
427Removals and Renames
428--------------------
429
430The following list shows what has been removed or renamed:
431
432- *``evieext``:* Removed because it has been removed from ``xserver``
433 since 2008.
434
435- *Gtk+ DirectFB:* Removed support because upstream Gtk+ no longer
436 supports it as of version 2.18.
437
438- *``libxfontcache / xfontcacheproto``:* Removed because they were
439 removed from the Xorg server in 2008.
440
441- *``libxp / libxprintapputil / libxprintutil / printproto``:* Removed
442 because the XPrint server was removed from Xorg in 2008.
443
444- *``libxtrap / xtrapproto``:* Removed because their functionality was
445 broken upstream.
446
447- *linux-yocto 3.0 kernel:* Removed with linux-yocto 3.8 kernel being
448 added. The linux-yocto 3.2 and linux-yocto 3.4 kernels remain as part
449 of the release.
450
451- *``lsbsetup``:* Removed with functionality now provided by
452 ``lsbtest``.
453
454- *``matchbox-stroke``:* Removed because it was never more than a
455 proof-of-concept.
456
457- *``matchbox-wm-2 / matchbox-theme-sato-2``:* Removed because they are
458 not maintained. However, ``matchbox-wm`` and ``matchbox-theme-sato``
459 are still provided.
460
461- *``mesa-dri``:* Renamed to ``mesa``.
462
463- *``mesa-xlib``:* Removed because it was no longer useful.
464
465- *``mutter``:* Removed because nothing ever uses it and the recipe is
466 very old.
467
468- *``orinoco-conf``:* Removed because it has become obsolete.
469
470- *``update-modules``:* Removed because it is no longer used. The
471 kernel module ``postinstall`` and ``postrm`` scripts can now do the
472 same task without the use of this script.
473
474- *``web``:* Removed because it is not maintained. Superseded by
475 ``web-webkit``.
476
477- *``xf86bigfontproto``:* Removed because upstream it has been disabled
478 by default since 2007. Nothing uses ``xf86bigfontproto``.
479
480- *``xf86rushproto``:* Removed because its dependency in ``xserver``
481 was spurious and it was removed in 2005.
482
483- *``zypper / libzypp / sat-solver``:* Removed and been functionally
484 replaced with Smart (``python-smartpm``) when RPM packaging is used
485 and package management is enabled on the target.
486
487Moving to the Yocto Project 1.5 Release
488=======================================
489
490This section provides migration information for moving to the Yocto
491Project 1.5 Release from the prior release.
492
493.. _migration-1.5-host-dependency-changes:
494
495Host Dependency Changes
496-----------------------
497
498The OpenEmbedded build system now has some additional requirements on
499the host system:
500
501- Python 2.7.3+
502
503- Tar 1.24+
504
505- Git 1.7.8+
506
507- Patched version of Make if you are using 3.82. Most distributions
508 that provide Make 3.82 use the patched version.
509
510If the Linux distribution you are using on your build host does not
511provide packages for these, you can install and use the Buildtools
512tarball, which provides an SDK-like environment containing them.
513
514For more information on this requirement, see the "`Required Git, tar,
515Python and gcc Versions <#required-git-tar-python-and-gcc-versions>`__"
516section.
517
518.. _migration-1.5-atom-pc-bsp:
519
520``atom-pc`` Board Support Package (BSP)
521---------------------------------------
522
523The ``atom-pc`` hardware reference BSP has been replaced by a
524``genericx86`` BSP. This BSP is not necessarily guaranteed to work on
525all x86 hardware, but it will run on a wider range of systems than the
526``atom-pc`` did.
527
528.. note::
529
530 Additionally, a
531 genericx86-64
532 BSP has been added for 64-bit Atom systems.
533
534.. _migration-1.5-bitbake:
535
536BitBake
537-------
538
539The following changes have been made that relate to BitBake:
540
541- BitBake now supports a ``_remove`` operator. The addition of this
542 operator means you will have to rename any items in recipe space
543 (functions, variables) whose names currently contain ``_remove_`` or
544 end with ``_remove`` to avoid unexpected behavior.
545
546- BitBake's global method pool has been removed. This method is not
547 particularly useful and led to clashes between recipes containing
548 functions that had the same name.
549
550- The "none" server backend has been removed. The "process" server
551 backend has been serving well as the default for a long time now.
552
553- The ``bitbake-runtask`` script has been removed.
554
555- ``${``\ ```P`` <#var-P>`__\ ``}`` and
556 ``${``\ ```PF`` <#var-PF>`__\ ``}`` are no longer added to
557 ```PROVIDES`` <#var-PROVIDES>`__ by default in ``bitbake.conf``.
558 These version-specific ``PROVIDES`` items were seldom used.
559 Attempting to use them could result in two versions being built
560 simultaneously rather than just one version due to the way BitBake
561 resolves dependencies.
562
563.. _migration-1.5-qa-warnings:
564
565QA Warnings
566-----------
567
568The following changes have been made to the package QA checks:
569
570- If you have customized ```ERROR_QA`` <#var-ERROR_QA>`__ or
571 ```WARN_QA`` <#var-WARN_QA>`__ values in your configuration, check
572 that they contain all of the issues that you wish to be reported.
573 Previous Yocto Project versions contained a bug that meant that any
574 item not mentioned in ``ERROR_QA`` or ``WARN_QA`` would be treated as
575 a warning. Consequently, several important items were not already in
576 the default value of ``WARN_QA``. All of the possible QA checks are
577 now documented in the "```insane.bbclass`` <#ref-classes-insane>`__"
578 section.
579
580- An additional QA check has been added to check if
581 ``/usr/share/info/dir`` is being installed. Your recipe should delete
582 this file within ```do_install`` <#ref-tasks-install>`__ if "make
583 install" is installing it.
584
585- If you are using the buildhistory class, the check for the package
586 version going backwards is now controlled using a standard QA check.
587 Thus, if you have customized your ``ERROR_QA`` or ``WARN_QA`` values
588 and still wish to have this check performed, you should add
589 "version-going-backwards" to your value for one or the other
590 variables depending on how you wish it to be handled. See the
591 documented QA checks in the
592 "```insane.bbclass`` <#ref-classes-insane>`__" section.
593
594.. _migration-1.5-directory-layout-changes:
595
596Directory Layout Changes
597------------------------
598
599The following directory changes exist:
600
601- Output SDK installer files are now named to include the image name
602 and tuning architecture through the ```SDK_NAME`` <#var-SDK_NAME>`__
603 variable.
604
605- Images and related files are now installed into a directory that is
606 specific to the machine, instead of a parent directory containing
607 output files for multiple machines. The
608 ```DEPLOY_DIR_IMAGE`` <#var-DEPLOY_DIR_IMAGE>`__ variable continues
609 to point to the directory containing images for the current
610 ```MACHINE`` <#var-MACHINE>`__ and should be used anywhere there is a
611 need to refer to this directory. The ``runqemu`` script now uses this
612 variable to find images and kernel binaries and will use BitBake to
613 determine the directory. Alternatively, you can set the
614 ``DEPLOY_DIR_IMAGE`` variable in the external environment.
615
616- When buildhistory is enabled, its output is now written under the
617 `Build Directory <#build-directory>`__ rather than
618 ```TMPDIR`` <#var-TMPDIR>`__. Doing so makes it easier to delete
619 ``TMPDIR`` and preserve the build history. Additionally, data for
620 produced SDKs is now split by ```IMAGE_NAME`` <#var-IMAGE_NAME>`__.
621
622- The ``pkgdata`` directory produced as part of the packaging process
623 has been collapsed into a single machine-specific directory. This
624 directory is located under ``sysroots`` and uses a machine-specific
625 name (i.e. ``tmp/sysroots/machine/pkgdata``).
626
627.. _migration-1.5-shortened-git-srcrev-values:
628
629Shortened Git ``SRCREV`` Values
630-------------------------------
631
632BitBake will now shorten revisions from Git repositories from the normal
63340 characters down to 10 characters within ```SRCPV`` <#var-SRCPV>`__
634for improved usability in path and file names. This change should be
635safe within contexts where these revisions are used because the chances
636of spatially close collisions is very low. Distant collisions are not a
637major issue in the way the values are used.
638
639.. _migration-1.5-image-features:
640
641``IMAGE_FEATURES``
642------------------
643
644The following changes have been made that relate to
645```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__:
646
647- The value of ``IMAGE_FEATURES`` is now validated to ensure invalid
648 feature items are not added. Some users mistakenly add package names
649 to this variable instead of using
650 ```IMAGE_INSTALL`` <#var-IMAGE_INSTALL>`__ in order to have the
651 package added to the image, which does not work. This change is
652 intended to catch those kinds of situations. Valid ``IMAGE_FEATURES``
653 are drawn from ``PACKAGE_GROUP`` definitions,
654 ```COMPLEMENTARY_GLOB`` <#var-COMPLEMENTARY_GLOB>`__ and a new
655 "validitems" varflag on ``IMAGE_FEATURES``. The "validitems" varflag
656 change allows additional features to be added if they are not
657 provided using the previous two mechanisms.
658
659- The previously deprecated "apps-console-core" ``IMAGE_FEATURES`` item
660 is no longer supported. Add "splash" to ``IMAGE_FEATURES`` if you
661 wish to have the splash screen enabled, since this is all that
662 apps-console-core was doing.
663
664.. _migration-1.5-run:
665
666``/run``
667--------
668
669The ``/run`` directory from the Filesystem Hierarchy Standard 3.0 has
670been introduced. You can find some of the implications for this change
671`here <http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873>`__.
672The change also means that recipes that install files to ``/var/run``
673must be changed. You can find a guide on how to make these changes
674`here <http://permalink.gmane.org/gmane.comp.handhelds.openembedded/58530>`__.
675
676.. _migration-1.5-removal-of-package-manager-database-within-image-recipes:
677
678Removal of Package Manager Database Within Image Recipes
679--------------------------------------------------------
680
681The image ``core-image-minimal`` no longer adds
682``remove_packaging_data_files`` to
683```ROOTFS_POSTPROCESS_COMMAND`` <#var-ROOTFS_POSTPROCESS_COMMAND>`__.
684This addition is now handled automatically when "package-management" is
685not in ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__. If you have custom
686image recipes that make this addition, you should remove the lines, as
687they are not needed and might interfere with correct operation of
688postinstall scripts.
689
690.. _migration-1.5-images-now-rebuild-only-on-changes-instead-of-every-time:
691
692Images Now Rebuild Only on Changes Instead of Every Time
693--------------------------------------------------------
694
695The ```do_rootfs`` <#ref-tasks-rootfs>`__ and other related image
696construction tasks are no longer marked as "nostamp". Consequently, they
697will only be re-executed when their inputs have changed. Previous
698versions of the OpenEmbedded build system always rebuilt the image when
699requested rather when necessary.
700
701.. _migration-1.5-task-recipes:
702
703Task Recipes
704------------
705
706The previously deprecated ``task.bbclass`` has now been dropped. For
707recipes that previously inherited from this class, you should rename
708them from ``task-*`` to ``packagegroup-*`` and inherit packagegroup
709instead.
710
711For more information, see the
712"```packagegroup.bbclass`` <#ref-classes-packagegroup>`__" section.
713
714.. _migration-1.5-busybox:
715
716BusyBox
717-------
718
719By default, we now split BusyBox into two binaries: one that is suid
720root for those components that need it, and another for the rest of the
721components. Splitting BusyBox allows for optimization that eliminates
722the ``tinylogin`` recipe as recommended by upstream. You can disable
723this split by setting
724```BUSYBOX_SPLIT_SUID`` <#var-BUSYBOX_SPLIT_SUID>`__ to "0".
725
726.. _migration-1.5-automated-image-testing:
727
728Automated Image Testing
729-----------------------
730
731A new automated image testing framework has been added through the
732```testimage.bbclass`` <#ref-classes-testimage*>`__ class. This
733framework replaces the older ``imagetest-qemu`` framework.
734
735You can learn more about performing automated image tests in the
736"`Performing Automated Runtime
737Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
738section in the Yocto Project Development Tasks Manual.
739
740.. _migration-1.5-build-history:
741
742Build History
743-------------
744
745Following are changes to Build History:
746
747- Installed package sizes: ``installed-package-sizes.txt`` for an image
748 now records the size of the files installed by each package instead
749 of the size of each compressed package archive file.
750
751- The dependency graphs (``depends*.dot``) now use the actual package
752 names instead of replacing dashes, dots and plus signs with
753 underscores.
754
755- The ``buildhistory-diff`` and ``buildhistory-collect-srcrevs``
756 utilities have improved command-line handling. Use the ``--help``
757 option for each utility for more information on the new syntax.
758
759For more information on Build History, see the "`Maintaining Build
760Output
761Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
762section in the Yocto Project Development Tasks Manual.
763
764.. _migration-1.5-udev:
765
766``udev``
767--------
768
769Following are changes to ``udev``:
770
771- ``udev`` no longer brings in ``udev-extraconf`` automatically through
772 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__, since this was originally
773 intended to be optional. If you need the extra rules, then add
774 ``udev-extraconf`` to your image.
775
776- ``udev`` no longer brings in ``pciutils-ids`` or ``usbutils-ids``
777 through ``RRECOMMENDS``. These are not needed by ``udev`` itself and
778 removing them saves around 350KB.
779
780.. _migration-1.5-removed-renamed-recipes:
781
782Removed and Renamed Recipes
783---------------------------
784
785- The ``linux-yocto`` 3.2 kernel has been removed.
786
787- ``libtool-nativesdk`` has been renamed to ``nativesdk-libtool``.
788
789- ``tinylogin`` has been removed. It has been replaced by a suid
790 portion of Busybox. See the "`BusyBox <#migration-1.5-busybox>`__"
791 section for more information.
792
793- ``external-python-tarball`` has been renamed to
794 ``buildtools-tarball``.
795
796- ``web-webkit`` has been removed. It has been functionally replaced by
797 ``midori``.
798
799- ``imake`` has been removed. It is no longer needed by any other
800 recipe.
801
802- ``transfig-native`` has been removed. It is no longer needed by any
803 other recipe.
804
805- ``anjuta-remote-run`` has been removed. Anjuta IDE integration has
806 not been officially supported for several releases.
807
808.. _migration-1.5-other-changes:
809
810Other Changes
811-------------
812
813Following is a list of short entries describing other changes:
814
815- ``run-postinsts``: Make this generic.
816
817- ``base-files``: Remove the unnecessary ``media/``\ xxx directories.
818
819- ``alsa-state``: Provide an empty ``asound.conf`` by default.
820
821- ``classes/image``: Ensure
822 ```BAD_RECOMMENDATIONS`` <#var-BAD_RECOMMENDATIONS>`__ supports
823 pre-renamed package names.
824
825- ``classes/rootfs_rpm``: Implement ``BAD_RECOMMENDATIONS`` for RPM.
826
827- ``systemd``: Remove ``systemd_unitdir`` if ``systemd`` is not in
828 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__.
829
830- ``systemd``: Remove ``init.d`` dir if ``systemd`` unit file is
831 present and ``sysvinit`` is not a distro feature.
832
833- ``libpam``: Deny all services for the ``OTHER`` entries.
834
835- ``image.bbclass``: Move ``runtime_mapping_rename`` to avoid conflict
836 with ``multilib``. See
837 ```YOCTO #4993`` <https://bugzilla.yoctoproject.org/show_bug.cgi?id=4993>`__
838 in Bugzilla for more information.
839
840- ``linux-dtb``: Use kernel build system to generate the ``dtb`` files.
841
842- ``kern-tools``: Switch from guilt to new ``kgit-s2q`` tool.
843
844Moving to the Yocto Project 1.6 Release
845=======================================
846
847This section provides migration information for moving to the Yocto
848Project 1.6 Release from the prior release.
849
850.. _migration-1.6-archiver-class:
851
852``archiver`` Class
853------------------
854
855The ```archiver`` <#ref-classes-archiver>`__ class has been rewritten
856and its configuration has been simplified. For more details on the
857source archiver, see the "`Maintaining Open Source License Compliance
858During Your Product's
859Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__"
860section in the Yocto Project Development Tasks Manual.
861
862.. _migration-1.6-packaging-changes:
863
864Packaging Changes
865-----------------
866
867The following packaging changes have been made:
868
869- The ``binutils`` recipe no longer produces a ``binutils-symlinks``
870 package. ``update-alternatives`` is now used to handle the preferred
871 ``binutils`` variant on the target instead.
872
873- The tc (traffic control) utilities have been split out of the main
874 ``iproute2`` package and put into the ``iproute2-tc`` package.
875
876- The ``gtk-engines`` schemas have been moved to a dedicated
877 ``gtk-engines-schemas`` package.
878
879- The ``armv7a`` with thumb package architecture suffix has changed.
880 The suffix for these packages with the thumb optimization enabled is
881 "t2" as it should be. Use of this suffix was not the case in the 1.5
882 release. Architecture names will change within package feeds as a
883 result.
884
885.. _migration-1.6-bitbake:
886
887BitBake
888-------
889
890The following changes have been made to `BitBake <#bitbake-term>`__.
891
892.. _migration-1.6-matching-branch-requirement-for-git-fetching:
893
894Matching Branch Requirement for Git Fetching
895~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
896
897When fetching source from a Git repository using
898```SRC_URI`` <#var-SRC_URI>`__, BitBake will now validate the
899```SRCREV`` <#var-SRCREV>`__ value against the branch. You can specify
900the branch using the following form: SRC_URI =
901"git://server.name/repository;branch=branchname" If you do not specify a
902branch, BitBake looks in the default "master" branch.
903
904Alternatively, if you need to bypass this check (e.g. if you are
905fetching a revision corresponding to a tag that is not on any branch),
906you can add ";nobranch=1" to the end of the URL within ``SRC_URI``.
907
908.. _migration-1.6-bitbake-deps:
909
910Python Definition substitutions
911~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
912
913BitBake had some previously deprecated Python definitions within its
914``bb`` module removed. You should use their sub-module counterparts
915instead:
916
917- ``bb.MalformedUrl``: Use ``bb.fetch.MalformedUrl``.
918
919- ``bb.encodeurl``: Use ``bb.fetch.encodeurl``.
920
921- ``bb.decodeurl``: Use ``bb.fetch.decodeurl``
922
923- ``bb.mkdirhier``: Use ``bb.utils.mkdirhier``.
924
925- ``bb.movefile``: Use ``bb.utils.movefile``.
926
927- ``bb.copyfile``: Use ``bb.utils.copyfile``.
928
929- ``bb.which``: Use ``bb.utils.which``.
930
931- ``bb.vercmp_string``: Use ``bb.utils.vercmp_string``.
932
933- ``bb.vercmp``: Use ``bb.utils.vercmp``.
934
935.. _migration-1.6-bitbake-fetcher:
936
937SVK Fetcher
938~~~~~~~~~~~
939
940The SVK fetcher has been removed from BitBake.
941
942.. _migration-1.6-bitbake-console-output:
943
944Console Output Error Redirection
945~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
946
947The BitBake console UI will now output errors to ``stderr`` instead of
948``stdout``. Consequently, if you are piping or redirecting the output of
949``bitbake`` to somewhere else, and you wish to retain the errors, you
950will need to add ``2>&1`` (or something similar) to the end of your
951``bitbake`` command line.
952
953.. _migration-1.6-task-taskname-overrides:
954
955``task-``\ taskname Overrides
956~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
957
958``task-``\ taskname overrides have been adjusted so that tasks whose
959names contain underscores have the underscores replaced by hyphens for
960the override so that they now function properly. For example, the task
961override for ```do_populate_sdk`` <#ref-tasks-populate_sdk>`__ is
962``task-populate-sdk``.
963
964.. _migration-1.6-variable-changes:
965
966Changes to Variables
967--------------------
968
969The following variables have changed. For information on the
970OpenEmbedded build system variables, see the "`Variables
971Glossary <#ref-variables-glos>`__" Chapter.
972
973.. _migration-1.6-variable-changes-TMPDIR:
974
975``TMPDIR``
976~~~~~~~~~~
977
978```TMPDIR`` <#var-TMPDIR>`__ can no longer be on an NFS mount. NFS does
979not offer full POSIX locking and inode consistency and can cause
980unexpected issues if used to store ``TMPDIR``.
981
982The check for this occurs on startup. If ``TMPDIR`` is detected on an
983NFS mount, an error occurs.
984
985.. _migration-1.6-variable-changes-PRINC:
986
987``PRINC``
988~~~~~~~~~
989
990The ``PRINC`` variable has been deprecated and triggers a warning if
991detected during a build. For ```PR`` <#var-PR>`__ increments on changes,
992use the PR service instead. You can find out more about this service in
993the "`Working With a PR
994Service <&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service>`__" section in
995the Yocto Project Development Tasks Manual.
996
997.. _migration-1.6-variable-changes-IMAGE_TYPES:
998
999``IMAGE_TYPES``
1000~~~~~~~~~~~~~~~
1001
1002The "sum.jffs2" option for ```IMAGE_TYPES`` <#var-IMAGE_TYPES>`__ has
1003been replaced by the "jffs2.sum" option, which fits the processing
1004order.
1005
1006.. _migration-1.6-variable-changes-COPY_LIC_MANIFEST:
1007
1008``COPY_LIC_MANIFEST``
1009~~~~~~~~~~~~~~~~~~~~~
1010
1011The ```COPY_LIC_MANIFEST`` <#var-COPY_LIC_MANIFEST>`__ variable must now
1012be set to "1" rather than any value in order to enable it.
1013
1014.. _migration-1.6-variable-changes-COPY_LIC_DIRS:
1015
1016``COPY_LIC_DIRS``
1017~~~~~~~~~~~~~~~~~
1018
1019The ```COPY_LIC_DIRS`` <#var-COPY_LIC_DIRS>`__ variable must now be set
1020to "1" rather than any value in order to enable it.
1021
1022.. _migration-1.6-variable-changes-PACKAGE_GROUP:
1023
1024``PACKAGE_GROUP``
1025~~~~~~~~~~~~~~~~~
1026
1027The ``PACKAGE_GROUP`` variable has been renamed to
1028```FEATURE_PACKAGES`` <#var-FEATURE_PACKAGES>`__ to more accurately
1029reflect its purpose. You can still use ``PACKAGE_GROUP`` but the
1030OpenEmbedded build system produces a warning message when it encounters
1031the variable.
1032
1033.. _migration-1.6-variable-changes-variable-entry-behavior:
1034
1035Preprocess and Post Process Command Variable Behavior
1036~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1037
1038The following variables now expect a semicolon separated list of
1039functions to call and not arbitrary shell commands:
1040`ROOTFS_PREPROCESS_COMMAND <#var-ROOTFS_PREPROCESS_COMMAND>`__
1041`ROOTFS_POSTPROCESS_COMMAND <#var-ROOTFS_POSTPROCESS_COMMAND>`__
1042`SDK_POSTPROCESS_COMMAND <#var-SDK_POSTPROCESS_COMMAND>`__
1043`POPULATE_SDK_POST_TARGET_COMMAND <#var-POPULATE_SDK_POST_TARGET_COMMAND>`__
1044`POPULATE_SDK_POST_HOST_COMMAND <#var-POPULATE_SDK_POST_HOST_COMMAND>`__
1045`IMAGE_POSTPROCESS_COMMAND <#var-IMAGE_POSTPROCESS_COMMAND>`__
1046`IMAGE_PREPROCESS_COMMAND <#var-IMAGE_PREPROCESS_COMMAND>`__
1047`ROOTFS_POSTUNINSTALL_COMMAND <#var-ROOTFS_POSTUNINSTALL_COMMAND>`__
1048`ROOTFS_POSTINSTALL_COMMAND <#var-ROOTFS_POSTINSTALL_COMMAND>`__ For
1049migration purposes, you can simply wrap shell commands in a shell
1050function and then call the function. Here is an example:
1051my_postprocess_function() { echo "hello" > ${IMAGE_ROOTFS}/hello.txt }
1052ROOTFS_POSTPROCESS_COMMAND += "my_postprocess_function; "
1053
1054.. _migration-1.6-package-test-ptest:
1055
1056Package Test (ptest)
1057--------------------
1058
1059Package Tests (ptest) are built but not installed by default. For
1060information on using Package Tests, see the "`Testing Packages with
1061ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in
1062the Yocto Project Development Tasks Manual. For information on the
1063``ptest`` class, see the "```ptest.bbclass`` <#ref-classes-ptest>`__"
1064section.
1065
1066.. _migration-1.6-build-changes:
1067
1068Build Changes
1069-------------
1070
1071Separate build and source directories have been enabled by default for
1072selected recipes where it is known to work (a whitelist) and for all
1073recipes that inherit the ```cmake`` <#ref-classes-cmake>`__ class. In
1074future releases the ```autotools`` <#ref-classes-autotools>`__ class
1075will enable a separate build directory by default as well. Recipes
1076building Autotools-based software that fails to build with a separate
1077build directory should be changed to inherit from the
1078```autotools-brokensep`` <#ref-classes-autotools>`__ class instead of
1079the ``autotools`` or ``autotools_stage``\ classes.
1080
1081.. _migration-1.6-building-qemu-native:
1082
1083``qemu-native``
1084---------------
1085
1086``qemu-native`` now builds without SDL-based graphical output support by
1087default. The following additional lines are needed in your
1088``local.conf`` to enable it: PACKAGECONFIG_pn-qemu-native = "sdl"
1089ASSUME_PROVIDED += "libsdl-native"
1090
1091.. note::
1092
1093 The default
1094 local.conf
1095 contains these statements. Consequently, if you are building a
1096 headless system and using a default
1097 local.conf
1098 file, you will need comment these two lines out.
1099
1100.. _migration-1.6-core-image-basic:
1101
1102``core-image-basic``
1103--------------------
1104
1105``core-image-basic`` has been renamed to ``core-image-full-cmdline``.
1106
1107In addition to ``core-image-basic`` being renamed,
1108``packagegroup-core-basic`` has been renamed to
1109``packagegroup-core-full-cmdline`` to match.
1110
1111.. _migration-1.6-licensing:
1112
1113Licensing
1114---------
1115
1116The top-level ``LICENSE`` file has been changed to better describe the
1117license of the various components of `OE-Core <#oe-core>`__. However,
1118the licensing itself remains unchanged.
1119
1120Normally, this change would not cause any side-effects. However, some
1121recipes point to this file within
1122```LIC_FILES_CHKSUM`` <#var-LIC_FILES_CHKSUM>`__ (as
1123``${COREBASE}/LICENSE``) and thus the accompanying checksum must be
1124changed from 3f40d7994397109285ec7b81fdeb3b58 to
11254d92cd373abda3937c2bc47fbc49d690. A better alternative is to have
1126``LIC_FILES_CHKSUM`` point to a file describing the license that is
1127distributed with the source that the recipe is building, if possible,
1128rather than pointing to ``${COREBASE}/LICENSE``.
1129
1130.. _migration-1.6-cflags-options:
1131
1132``CFLAGS`` Options
1133------------------
1134
1135The "-fpermissive" option has been removed from the default
1136```CFLAGS`` <#var-CFLAGS>`__ value. You need to take action on
1137individual recipes that fail when building with this option. You need to
1138either patch the recipes to fix the issues reported by the compiler, or
1139you need to add "-fpermissive" to ``CFLAGS`` in the recipes.
1140
1141.. _migration-1.6-custom-images:
1142
1143Custom Image Output Types
1144-------------------------
1145
1146Custom image output types, as selected using
1147```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__, must declare their
1148dependencies on other image types (if any) using a new
1149```IMAGE_TYPEDEP`` <#var-IMAGE_TYPEDEP>`__ variable.
1150
1151.. _migration-1.6-do-package-write-task:
1152
1153Tasks
1154-----
1155
1156The ``do_package_write`` task has been removed. The task is no longer
1157needed.
1158
1159.. _migration-1.6-update-alternatives-provider:
1160
1161``update-alternative`` Provider
1162-------------------------------
1163
1164The default ``update-alternatives`` provider has been changed from
1165``opkg`` to ``opkg-utils``. This change resolves some troublesome
1166circular dependencies. The runtime package has also been renamed from
1167``update-alternatives-cworth`` to ``update-alternatives-opkg``.
1168
1169.. _migration-1.6-virtclass-overrides:
1170
1171``virtclass`` Overrides
1172-----------------------
1173
1174The ``virtclass`` overrides are now deprecated. Use the equivalent class
1175overrides instead (e.g. ``virtclass-native`` becomes ``class-native``.)
1176
1177.. _migration-1.6-removed-renamed-recipes:
1178
1179Removed and Renamed Recipes
1180---------------------------
1181
1182The following recipes have been removed:
1183
1184- ``packagegroup-toolset-native`` - This recipe is largely unused.
1185
1186- ``linux-yocto-3.8`` - Support for the Linux yocto 3.8 kernel has been
1187 dropped. Support for the 3.10 and 3.14 kernels have been added with
1188 the ``linux-yocto-3.10`` and ``linux-yocto-3.14`` recipes.
1189
1190- ``ocf-linux`` - This recipe has been functionally replaced using
1191 ``cryptodev-linux``.
1192
1193- ``genext2fs`` - ``genext2fs`` is no longer used by the build system
1194 and is unmaintained upstream.
1195
1196- ``js`` - This provided an ancient version of Mozilla's javascript
1197 engine that is no longer needed.
1198
1199- ``zaurusd`` - The recipe has been moved to the ``meta-handheld``
1200 layer.
1201
1202- ``eglibc 2.17`` - Replaced by the ``eglibc 2.19`` recipe.
1203
1204- ``gcc 4.7.2`` - Replaced by the now stable ``gcc 4.8.2``.
1205
1206- ``external-sourcery-toolchain`` - this recipe is now maintained in
1207 the ``meta-sourcery`` layer.
1208
1209- ``linux-libc-headers-yocto 3.4+git`` - Now using version 3.10 of the
1210 ``linux-libc-headers`` by default.
1211
1212- ``meta-toolchain-gmae`` - This recipe is obsolete.
1213
1214- ``packagegroup-core-sdk-gmae`` - This recipe is obsolete.
1215
1216- ``packagegroup-core-standalone-gmae-sdk-target`` - This recipe is
1217 obsolete.
1218
1219.. _migration-1.6-removed-classes:
1220
1221Removed Classes
1222---------------
1223
1224The following classes have become obsolete and have been removed:
1225
1226- ``module_strip``
1227
1228- ``pkg_metainfo``
1229
1230- ``pkg_distribute``
1231
1232- ``image-empty``
1233
1234.. _migration-1.6-reference-bsps:
1235
1236Reference Board Support Packages (BSPs)
1237---------------------------------------
1238
1239The following reference BSPs changes occurred:
1240
1241- The BeagleBoard (``beagleboard``) ARM reference hardware has been
1242 replaced by the BeagleBone (``beaglebone``) hardware.
1243
1244- The RouterStation Pro (``routerstationpro``) MIPS reference hardware
1245 has been replaced by the EdgeRouter Lite (``edgerouter``) hardware.
1246
1247The previous reference BSPs for the ``beagleboard`` and
1248``routerstationpro`` machines are still available in a new
1249``meta-yocto-bsp-old`` layer in the `Source
1250Repositories <&YOCTO_GIT_URL;>`__ at
1251http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/.
1252
1253Moving to the Yocto Project 1.7 Release
1254=======================================
1255
1256This section provides migration information for moving to the Yocto
1257Project 1.7 Release from the prior release.
1258
1259.. _migration-1.7-changes-to-setting-qemu-packageconfig-options:
1260
1261Changes to Setting QEMU ``PACKAGECONFIG`` Options in ``local.conf``
1262-------------------------------------------------------------------
1263
1264The QEMU recipe now uses a number of
1265```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ options to enable various
1266optional features. The method used to set defaults for these options
1267means that existing ``local.conf`` files will need to be be modified to
1268append to ``PACKAGECONFIG`` for ``qemu-native`` and ``nativesdk-qemu``
1269instead of setting it. In other words, to enable graphical output for
1270QEMU, you should now have these lines in ``local.conf``:
1271PACKAGECONFIG_append_pn-qemu-native = " sdl"
1272PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
1273
1274.. _migration-1.7-minimum-git-version:
1275
1276Minimum Git version
1277-------------------
1278
1279The minimum `Git <&YOCTO_DOCS_OM_URL;#git>`__ version required on the
1280build host is now 1.7.8 because the ``--list`` option is now required by
1281BitBake's Git fetcher. As always, if your host distribution does not
1282provide a version of Git that meets this requirement, you can use the
1283``buildtools-tarball`` that does. See the "`Required Git, tar, Python
1284and gcc Versions <#required-git-tar-python-and-gcc-versions>`__" section
1285for more information.
1286
1287.. _migration-1.7-autotools-class-changes:
1288
1289Autotools Class Changes
1290-----------------------
1291
1292The following ```autotools`` <#ref-classes-autotools>`__ class changes
1293occurred:
1294
1295- *A separate build directory is now used by default:* The
1296 ``autotools`` class has been changed to use a directory for building
1297 (```B`` <#var-B>`__), which is separate from the source directory
1298 (```S`` <#var-S>`__). This is commonly referred to as ``B != S``, or
1299 an out-of-tree build.
1300
1301 If the software being built is already capable of building in a
1302 directory separate from the source, you do not need to do anything.
1303 However, if the software is not capable of being built in this
1304 manner, you will need to either patch the software so that it can
1305 build separately, or you will need to change the recipe to inherit
1306 the ```autotools-brokensep`` <#ref-classes-autotools>`__ class
1307 instead of the ``autotools`` or ``autotools_stage`` classes.
1308
1309- *The ``--foreign`` option is no longer passed to ``automake`` when
1310 running ``autoconf``:* This option tells ``automake`` that a
1311 particular software package does not follow the GNU standards and
1312 therefore should not be expected to distribute certain files such as
1313 ``ChangeLog``, ``AUTHORS``, and so forth. Because the majority of
1314 upstream software packages already tell ``automake`` to enable
1315 foreign mode themselves, the option is mostly superfluous. However,
1316 some recipes will need patches for this change. You can easily make
1317 the change by patching ``configure.ac`` so that it passes "foreign"
1318 to ``AM_INIT_AUTOMAKE()``. See `this
1319 commit <http://cgit.openembedded.org/openembedded-core/commit/?id=01943188f85ce6411717fb5bf702d609f55813f2>`__
1320 for an example showing how to make the patch.
1321
1322.. _migration-1.7-binary-configuration-scripts-disabled:
1323
1324Binary Configuration Scripts Disabled
1325-------------------------------------
1326
1327Some of the core recipes that package binary configuration scripts now
1328disable the scripts due to the scripts previously requiring error-prone
1329path substitution. Software that links against these libraries using
1330these scripts should use the much more robust ``pkg-config`` instead.
1331The list of recipes changed in this version (and their configuration
1332scripts) is as follows: directfb (directfb-config) freetype
1333(freetype-config) gpgme (gpgme-config) libassuan (libassuan-config)
1334libcroco (croco-6.0-config) libgcrypt (libgcrypt-config) libgpg-error
1335(gpg-error-config) libksba (ksba-config) libpcap (pcap-config) libpcre
1336(pcre-config) libpng (libpng-config, libpng16-config) libsdl
1337(sdl-config) libusb-compat (libusb-config) libxml2 (xml2-config) libxslt
1338(xslt-config) ncurses (ncurses-config) neon (neon-config) npth
1339(npth-config) pth (pth-config) taglib (taglib-config) Additionally,
1340support for ``pkg-config`` has been added to some recipes in the
1341previous list in the rare cases where the upstream software package does
1342not already provide it.
1343
1344.. _migration-1.7-glibc-replaces-eglibc:
1345
1346``eglibc 2.19`` Replaced with ``glibc 2.20``
1347--------------------------------------------
1348
1349Because ``eglibc`` and ``glibc`` were already fairly close, this
1350replacement should not require any significant changes to other software
1351that links to ``eglibc``. However, there were a number of minor changes
1352in ``glibc 2.20`` upstream that could require patching some software
1353(e.g. the removal of the ``_BSD_SOURCE`` feature test macro).
1354
1355``glibc 2.20`` requires version 2.6.32 or greater of the Linux kernel.
1356Thus, older kernels will no longer be usable in conjunction with it.
1357
1358For full details on the changes in ``glibc 2.20``, see the upstream
1359release notes
1360`here <https://sourceware.org/ml/libc-alpha/2014-09/msg00088.html>`__.
1361
1362.. _migration-1.7-kernel-module-autoloading:
1363
1364Kernel Module Autoloading
1365-------------------------
1366
1367The ```module_autoload_*`` <#var-module_autoload>`__ variable is now
1368deprecated and a new
1369```KERNEL_MODULE_AUTOLOAD`` <#var-KERNEL_MODULE_AUTOLOAD>`__ variable
1370should be used instead. Also, ```module_conf_*`` <#var-module_conf>`__
1371must now be used in conjunction with a new
1372```KERNEL_MODULE_PROBECONF`` <#var-KERNEL_MODULE_PROBECONF>`__ variable.
1373The new variables no longer require you to specify the module name as
1374part of the variable name. This change not only simplifies usage but
1375also allows the values of these variables to be appropriately
1376incorporated into task signatures and thus trigger the appropriate tasks
1377to re-execute when changed. You should replace any references to
1378``module_autoload_*`` with ``KERNEL_MODULE_AUTOLOAD``, and add any
1379modules for which ``module_conf_*`` is specified to
1380``KERNEL_MODULE_PROBECONF``.
1381
1382.. _migration-1.7-qa-check-changes:
1383
1384QA Check Changes
1385----------------
1386
1387The following changes have occurred to the QA check process:
1388
1389- Additional QA checks ``file-rdeps`` and ``build-deps`` have been
1390 added in order to verify that file dependencies are satisfied (e.g.
1391 package contains a script requiring ``/bin/bash``) and build-time
1392 dependencies are declared, respectively. For more information, please
1393 see the "`QA Error and Warning Messages <#ref-qa-checks>`__" chapter.
1394
1395- Package QA checks are now performed during a new
1396 ```do_package_qa`` <#ref-tasks-package_qa>`__ task rather than being
1397 part of the ```do_package`` <#ref-tasks-package>`__ task. This allows
1398 more parallel execution. This change is unlikely to be an issue
1399 except for highly customized recipes that disable packaging tasks
1400 themselves by marking them as ``noexec``. For those packages, you
1401 will need to disable the ``do_package_qa`` task as well.
1402
1403- Files being overwritten during the
1404 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task now
1405 trigger an error instead of a warning. Recipes should not be
1406 overwriting files written to the sysroot by other recipes. If you
1407 have these types of recipes, you need to alter them so that they do
1408 not overwrite these files.
1409
1410 You might now receive this error after changes in configuration or
1411 metadata resulting in orphaned files being left in the sysroot. If
1412 you do receive this error, the way to resolve the issue is to delete
1413 your ```TMPDIR`` <#var-TMPDIR>`__ or to move it out of the way and
1414 then re-start the build. Anything that has been fully built up to
1415 that point and does not need rebuilding will be restored from the
1416 shared state cache and the rest of the build will be able to proceed
1417 as normal.
1418
1419.. _migration-1.7-removed-recipes:
1420
1421Removed Recipes
1422---------------
1423
1424The following recipes have been removed:
1425
1426- ``x-load``: This recipe has been superseded by U-boot SPL for all
1427 Cortex-based TI SoCs. For legacy boards, the ``meta-ti`` layer, which
1428 contains a maintained recipe, should be used instead.
1429
1430- ``ubootchart``: This recipe is obsolete. A ``bootchart2`` recipe has
1431 been added to functionally replace it.
1432
1433- ``linux-yocto 3.4``: Support for the linux-yocto 3.4 kernel has been
1434 dropped. Support for the 3.10 and 3.14 kernels remains, while support
1435 for version 3.17 has been added.
1436
1437- ``eglibc`` has been removed in favor of ``glibc``. See the
1438 "```eglibc 2.19`` Replaced with
1439 ``glibc 2.20`` <#migration-1.7-glibc-replaces-eglibc>`__" section for
1440 more information.
1441
1442.. _migration-1.7-miscellaneous-changes:
1443
1444Miscellaneous Changes
1445---------------------
1446
1447The following miscellaneous change occurred:
1448
1449- The build history feature now writes ``build-id.txt`` instead of
1450 ``build-id``. Additionally, ``build-id.txt`` now contains the full
1451 build header as printed by BitBake upon starting the build. You
1452 should manually remove old "build-id" files from your existing build
1453 history repositories to avoid confusion. For information on the build
1454 history feature, see the "`Maintaining Build Output
1455 Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
1456 section in the Yocto Project Development Tasks Manual.
1457
1458Moving to the Yocto Project 1.8 Release
1459=======================================
1460
1461This section provides migration information for moving to the Yocto
1462Project 1.8 Release from the prior release.
1463
1464.. _migration-1.8-removed-recipes:
1465
1466Removed Recipes
1467---------------
1468
1469The following recipes have been removed:
1470
1471- ``owl-video``: Functionality replaced by ``gst-player``.
1472
1473- ``gaku``: Functionality replaced by ``gst-player``.
1474
1475- ``gnome-desktop``: This recipe is now available in ``meta-gnome`` and
1476 is no longer needed.
1477
1478- ``gsettings-desktop-schemas``: This recipe is now available in
1479 ``meta-gnome`` and is no longer needed.
1480
1481- ``python-argparse``: The ``argparse`` module is already provided in
1482 the default Python distribution in a package named
1483 ``python-argparse``. Consequently, the separate ``python-argparse``
1484 recipe is no longer needed.
1485
1486- ``telepathy-python, libtelepathy, telepathy-glib, telepathy-idle, telepathy-mission-control``:
1487 All these recipes have moved to ``meta-oe`` and are consequently no
1488 longer needed by any recipes in OpenEmbedded-Core.
1489
1490- ``linux-yocto_3.10`` and ``linux-yocto_3.17``: Support for the
1491 linux-yocto 3.10 and 3.17 kernels has been dropped. Support for the
1492 3.14 kernel remains, while support for 3.19 kernel has been added.
1493
1494- ``poky-feed-config-opkg``: This recipe has become obsolete and is no
1495 longer needed. Use ``distro-feed-config`` from ``meta-oe`` instead.
1496
1497- ``libav 0.8.x``: ``libav 9.x`` is now used.
1498
1499- ``sed-native``: No longer needed. A working version of ``sed`` is
1500 expected to be provided by the host distribution.
1501
1502.. _migration-1.8-bluez:
1503
1504BlueZ 4.x / 5.x Selection
1505-------------------------
1506
1507Proper built-in support for selecting BlueZ 5.x in preference to the
1508default of 4.x now exists. To use BlueZ 5.x, simply add "bluez5" to your
1509```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ value. If you had
1510previously added append files (``*.bbappend``) to make this selection,
1511you can now remove them.
1512
1513Additionally, a ``bluetooth`` class has been added to make selection of
1514the appropriate bluetooth support within a recipe a little easier. If
1515you wish to make use of this class in a recipe, add something such as
1516the following: inherit bluetooth PACKAGECONFIG ??=
1517"${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '',
1518d)}" PACKAGECONFIG[bluez4] =
1519"--enable-bluetooth,--disable-bluetooth,bluez4" PACKAGECONFIG[bluez5] =
1520"--enable-bluez5,--disable-bluez5,bluez5"
1521
1522.. _migration-1.8-kernel-build-changes:
1523
1524Kernel Build Changes
1525--------------------
1526
1527The kernel build process was changed to place the source in a common
1528shared work area and to place build artifacts separately in the source
1529code tree. In theory, migration paths have been provided for most common
1530usages in kernel recipes but this might not work in all cases. In
1531particular, users need to ensure that ``${S}`` (source files) and
1532``${B}`` (build artifacts) are used correctly in functions such as
1533```do_configure`` <#ref-tasks-configure>`__ and
1534```do_install`` <#ref-tasks-install>`__. For kernel recipes that do not
1535inherit from ``kernel-yocto`` or include ``linux-yocto.inc``, you might
1536wish to refer to the ``linux.inc`` file in the ``meta-oe`` layer for the
1537kinds of changes you need to make. For reference, here is the
1538`commit <http://cgit.openembedded.org/meta-openembedded/commit/meta-oe/recipes-kernel/linux/linux.inc?id=fc7132ede27ac67669448d3d2845ce7d46c6a1ee>`__
1539where the ``linux.inc`` file in ``meta-oe`` was updated.
1540
1541Recipes that rely on the kernel source code and do not inherit the
1542module classes might need to add explicit dependencies on the
1543``do_shared_workdir`` kernel task, for example: do_configure[depends] +=
1544"virtual/kernel:do_shared_workdir"
1545
1546.. _migration-1.8-ssl:
1547
1548SSL 3.0 is Now Disabled in OpenSSL
1549----------------------------------
1550
1551SSL 3.0 is now disabled when building OpenSSL. Disabling SSL 3.0 avoids
1552any lingering instances of the POODLE vulnerability. If you feel you
1553must re-enable SSL 3.0, then you can add an append file (``*.bbappend``)
1554for the ``openssl`` recipe to remove "-no-ssl3" from
1555```EXTRA_OECONF`` <#var-EXTRA_OECONF>`__.
1556
1557.. _migration-1.8-default-sysroot-poisoning:
1558
1559Default Sysroot Poisoning
1560-------------------------
1561
1562``gcc's`` default sysroot and include directories are now "poisoned". In
1563other words, the sysroot and include directories are being redirected to
1564a non-existent location in order to catch when host directories are
1565being used due to the correct options not being passed. This poisoning
1566applies both to the cross-compiler used within the build and to the
1567cross-compiler produced in the SDK.
1568
1569If this change causes something in the build to fail, it almost
1570certainly means the various compiler flags and commands are not being
1571passed correctly to the underlying piece of software. In such cases, you
1572need to take corrective steps.
1573
1574.. _migration-1.8-rebuild-improvements:
1575
1576Rebuild Improvements
1577--------------------
1578
1579Changes have been made to the ```base`` <#ref-classes-base>`__,
1580```autotools`` <#ref-classes-autotools>`__, and
1581```cmake`` <#ref-classes-cmake>`__ classes to clean out generated files
1582when the ```do_configure`` <#ref-tasks-configure>`__ task needs to be
1583re-executed.
1584
1585One of the improvements is to attempt to run "make clean" during the
1586``do_configure`` task if a ``Makefile`` exists. Some software packages
1587do not provide a working clean target within their make files. If you
1588have such recipes, you need to set
1589```CLEANBROKEN`` <#var-CLEANBROKEN>`__ to "1" within the recipe, for
1590example: CLEANBROKEN = "1"
1591
1592.. _migration-1.8-qa-check-and-validation-changes:
1593
1594QA Check and Validation Changes
1595-------------------------------
1596
1597The following QA Check and Validation Changes have occurred:
1598
1599- Usage of ``PRINC`` previously triggered a warning. It now triggers an
1600 error. You should remove any remaining usage of ``PRINC`` in any
1601 recipe or append file.
1602
1603- An additional QA check has been added to detect usage of ``${D}`` in
1604 ```FILES`` <#var-FILES>`__ values where ```D`` <#var-D>`__ values
1605 should not be used at all. The same check ensures that ``$D`` is used
1606 in ``pkg_preinst/pkg_postinst/pkg_prerm/pkg_postrm`` functions
1607 instead of ``${D}``.
1608
1609- ```S`` <#var-S>`__ now needs to be set to a valid value within a
1610 recipe. If ``S`` is not set in the recipe, the directory is not
1611 automatically created. If ``S`` does not point to a directory that
1612 exists at the time the ```do_unpack`` <#ref-tasks-unpack>`__ task
1613 finishes, a warning will be shown.
1614
1615- ```LICENSE`` <#var-LICENSE>`__ is now validated for correct
1616 formatting of multiple licenses. If the format is invalid (e.g.
1617 multiple licenses are specified with no operators to specify how the
1618 multiple licenses interact), then a warning will be shown.
1619
1620.. _migration-1.8-miscellaneous-changes:
1621
1622Miscellaneous Changes
1623---------------------
1624
1625The following miscellaneous changes have occurred:
1626
1627- The ``send-error-report`` script now expects a "-s" option to be
1628 specified before the server address. This assumes a server address is
1629 being specified.
1630
1631- The ``oe-pkgdata-util`` script now expects a "-p" option to be
1632 specified before the ``pkgdata`` directory, which is now optional. If
1633 the ``pkgdata`` directory is not specified, the script will run
1634 BitBake to query ```PKGDATA_DIR`` <#var-PKGDATA_DIR>`__ from the
1635 build environment.
1636
1637Moving to the Yocto Project 2.0 Release
1638=======================================
1639
1640This section provides migration information for moving to the Yocto
1641Project 2.0 Release from the prior release.
1642
1643.. _migration-2.0-gcc-5:
1644
1645GCC 5
1646-----
1647
1648The default compiler is now GCC 5.2. This change has required fixes for
1649compilation errors in a number of other recipes.
1650
1651One important example is a fix for when the Linux kernel freezes at boot
1652time on ARM when built with GCC 5. If you are using your own kernel
1653recipe or source tree and building for ARM, you will likely need to
1654apply this
1655`patch <https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=a077224fd35b2f7fbc93f14cf67074fc792fbac2>`__.
1656The standard ``linux-yocto`` kernel source tree already has a workaround
1657for the same issue.
1658
1659For further details, see ` <https://gcc.gnu.org/gcc-5/changes.html>`__
1660and the porting guide at
1661` <https://gcc.gnu.org/gcc-5/porting_to.html>`__.
1662
1663Alternatively, you can switch back to GCC 4.9 or 4.8 by setting
1664``GCCVERSION`` in your configuration, as follows: GCCVERSION = "4.9%"
1665
1666.. _migration-2.0-Gstreamer-0.10-removed:
1667
1668Gstreamer 0.10 Removed
1669----------------------
1670
1671Gstreamer 0.10 has been removed in favor of Gstreamer 1.x. As part of
1672the change, recipes for Gstreamer 0.10 and related software are now
1673located in ``meta-multimedia``. This change results in Qt4 having Phonon
1674and Gstreamer support in QtWebkit disabled by default.
1675
1676.. _migration-2.0-removed-recipes:
1677
1678Removed Recipes
1679---------------
1680
1681The following recipes have been moved or removed:
1682
1683- ``bluez4``: The recipe is obsolete and has been moved due to
1684 ``bluez5`` becoming fully integrated. The ``bluez4`` recipe now
1685 resides in ``meta-oe``.
1686
1687- ``gamin``: The recipe is obsolete and has been removed.
1688
1689- ``gnome-icon-theme``: The recipe's functionally has been replaced by
1690 ``adwaita-icon-theme``.
1691
1692- Gstreamer 0.10 Recipes: Recipes for Gstreamer 0.10 have been removed
1693 in favor of the recipes for Gstreamer 1.x.
1694
1695- ``insserv``: The recipe is obsolete and has been removed.
1696
1697- ``libunique``: The recipe is no longer used and has been moved to
1698 ``meta-oe``.
1699
1700- ``midori``: The recipe's functionally has been replaced by
1701 ``epiphany``.
1702
1703- ``python-gst``: The recipe is obsolete and has been removed since it
1704 only contains bindings for Gstreamer 0.10.
1705
1706- ``qt-mobility``: The recipe is obsolete and has been removed since it
1707 requires ``Gstreamer 0.10``, which has been replaced.
1708
1709- ``subversion``: All 1.6.x versions of this recipe have been removed.
1710
1711- ``webkit-gtk``: The older 1.8.3 version of this recipe has been
1712 removed in favor of ``webkitgtk``.
1713
1714.. _migration-2.0-bitbake-datastore-improvements:
1715
1716BitBake datastore improvements
1717------------------------------
1718
1719The method by which BitBake's datastore handles overrides has changed.
1720Overrides are now applied dynamically and ``bb.data.update_data()`` is
1721now a no-op. Thus, ``bb.data.update_data()`` is no longer required in
1722order to apply the correct overrides. In practice, this change is
1723unlikely to require any changes to Metadata. However, these minor
1724changes in behavior exist:
1725
1726- All potential overrides are now visible in the variable history as
1727 seen when you run the following: $ bitbake -e
1728
1729- ``d.delVar('``\ VARNAME\ ``')`` and
1730 ``d.setVar('``\ VARNAME\ ``', None)`` result in the variable and all
1731 of its overrides being cleared out. Before the change, only the
1732 non-overridden values were cleared.
1733
1734.. _migration-2.0-shell-message-function-changes:
1735
1736Shell Message Function Changes
1737------------------------------
1738
1739The shell versions of the BitBake message functions (i.e. ``bbdebug``,
1740``bbnote``, ``bbwarn``, ``bbplain``, ``bberror``, and ``bbfatal``) are
1741now connected through to their BitBake equivalents ``bb.debug()``,
1742``bb.note()``, ``bb.warn()``, ``bb.plain()``, ``bb.error()``, and
1743``bb.fatal()``, respectively. Thus, those message functions that you
1744would expect to be printed by the BitBake UI are now actually printed.
1745In practice, this change means two things:
1746
1747- If you now see messages on the console that you did not previously
1748 see as a result of this change, you might need to clean up the calls
1749 to ``bbwarn``, ``bberror``, and so forth. Or, you might want to
1750 simply remove the calls.
1751
1752- The ``bbfatal`` message function now suppresses the full error log in
1753 the UI, which means any calls to ``bbfatal`` where you still wish to
1754 see the full error log should be replaced by ``die`` or
1755 ``bbfatal_log``.
1756
1757.. _migration-2.0-extra-development-debug-package-cleanup:
1758
1759Extra Development/Debug Package Cleanup
1760---------------------------------------
1761
1762The following recipes have had extra ``dev/dbg`` packages removed:
1763
1764- ``acl``
1765
1766- ``apmd``
1767
1768- ``aspell``
1769
1770- ``attr``
1771
1772- ``augeas``
1773
1774- ``bzip2``
1775
1776- ``cogl``
1777
1778- ``curl``
1779
1780- ``elfutils``
1781
1782- ``gcc-target``
1783
1784- ``libgcc``
1785
1786- ``libtool``
1787
1788- ``libxmu``
1789
1790- ``opkg``
1791
1792- ``pciutils``
1793
1794- ``rpm``
1795
1796- ``sysfsutils``
1797
1798- ``tiff``
1799
1800- ``xz``
1801
1802All of the above recipes now conform to the standard packaging scheme
1803where a single ``-dev``, ``-dbg``, and ``-staticdev`` package exists per
1804recipe.
1805
1806.. _migration-2.0-recipe-maintenance-tracking-data-moved-to-oe-core:
1807
1808Recipe Maintenance Tracking Data Moved to OE-Core
1809-------------------------------------------------
1810
1811Maintenance tracking data for recipes that was previously part of
1812``meta-yocto`` has been moved to `OE-Core <#oe-core>`__. The change
1813includes ``package_regex.inc`` and ``distro_alias.inc``, which are
1814typically enabled when using the ``distrodata`` class. Additionally, the
1815contents of ``upstream_tracking.inc`` has now been split out to the
1816relevant recipes.
1817
1818.. _migration-2.0-automatic-stale-sysroot-file-cleanup:
1819
1820Automatic Stale Sysroot File Cleanup
1821------------------------------------
1822
1823Stale files from recipes that no longer exist in the current
1824configuration are now automatically removed from sysroot as well as
1825removed from any other place managed by shared state. This automatic
1826cleanup means that the build system now properly handles situations such
1827as renaming the build system side of recipes, removal of layers from
1828``bblayers.conf``, and ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__
1829changes.
1830
1831Additionally, work directories for old versions of recipes are now
1832pruned. If you wish to disable pruning old work directories, you can set
1833the following variable in your configuration:
1834SSTATE_PRUNE_OBSOLETEWORKDIR = "0"
1835
1836.. _migration-2.0-linux-yocto-kernel-metadata-repository-now-split-from-source:
1837
1838``linux-yocto`` Kernel Metadata Repository Now Split from Source
1839----------------------------------------------------------------
1840
1841The ``linux-yocto`` tree has up to now been a combined set of kernel
1842changes and configuration (meta) data carried in a single tree. While
1843this format is effective at keeping kernel configuration and source
1844modifications synchronized, it is not always obvious to developers how
1845to manipulate the Metadata as compared to the source.
1846
1847Metadata processing has now been removed from the
1848```kernel-yocto`` <#ref-classes-kernel-yocto>`__ class and the external
1849Metadata repository ``yocto-kernel-cache``, which has always been used
1850to seed the ``linux-yocto`` "meta" branch. This separate ``linux-yocto``
1851cache repository is now the primary location for this data. Due to this
1852change, ``linux-yocto`` is no longer able to process combined trees.
1853Thus, if you need to have your own combined kernel repository, you must
1854do the split there as well and update your recipes accordingly. See the
1855``meta/recipes-kernel/linux/linux-yocto_4.1.bb`` recipe for an example.
1856
1857.. _migration-2.0-additional-qa-checks:
1858
1859Additional QA checks
1860--------------------
1861
1862The following QA checks have been added:
1863
1864- Added a "host-user-contaminated" check for ownership issues for
1865 packaged files outside of ``/home``. The check looks for files that
1866 are incorrectly owned by the user that ran BitBake instead of owned
1867 by a valid user in the target system.
1868
1869- Added an "invalid-chars" check for invalid (non-UTF8) characters in
1870 recipe metadata variable values (i.e.
1871 ```DESCRIPTION`` <#var-DESCRIPTION>`__,
1872 ```SUMMARY`` <#var-SUMMARY>`__, ```LICENSE`` <#var-LICENSE>`__, and
1873 ```SECTION`` <#var-SECTION>`__). Some package managers do not support
1874 these characters.
1875
1876- Added an "invalid-packageconfig" check for any options specified in
1877 ```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ that do not match any
1878 ``PACKAGECONFIG`` option defined for the recipe.
1879
1880.. _migration-2.0-miscellaneous:
1881
1882Miscellaneous Changes
1883---------------------
1884
1885These additional changes exist:
1886
1887- ``gtk-update-icon-cache`` has been renamed to ``gtk-icon-utils``.
1888
1889- The ``tools-profile`` ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__
1890 item as well as its corresponding packagegroup and
1891 ``packagegroup-core-tools-profile`` no longer bring in ``oprofile``.
1892 Bringing in ``oprofile`` was originally added to aid compilation on
1893 resource-constrained targets. However, this aid has not been widely
1894 used and is not likely to be used going forward due to the more
1895 powerful target platforms and the existence of better
1896 cross-compilation tools.
1897
1898- The ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable's default
1899 value now specifies ``ext4`` instead of ``ext3``.
1900
1901- All support for the ``PRINC`` variable has been removed.
1902
1903- The ``packagegroup-core-full-cmdline`` packagegroup no longer brings
1904 in ``lighttpd`` due to the fact that bringing in ``lighttpd`` is not
1905 really in line with the packagegroup's purpose, which is to add full
1906 versions of command-line tools that by default are provided by
1907 ``busybox``.
1908
1909Moving to the Yocto Project 2.1 Release
1910=======================================
1911
1912This section provides migration information for moving to the Yocto
1913Project 2.1 Release from the prior release.
1914
1915.. _migration-2.1-variable-expansion-in-python-functions:
1916
1917Variable Expansion in Python Functions
1918--------------------------------------
1919
1920Variable expressions, such as ``${``\ VARNAME\ ``}`` no longer expand
1921automatically within Python functions. Suppressing expansion was done to
1922allow Python functions to construct shell scripts or other code for
1923situations in which you do not want such expressions expanded. For any
1924existing code that relies on these expansions, you need to change the
1925expansions to expand the value of individual variables through
1926``d.getVar()``. To alternatively expand more complex expressions, use
1927``d.expand()``.
1928
1929.. _migration-2.1-overrides-must-now-be-lower-case:
1930
1931Overrides Must Now be Lower-Case
1932--------------------------------
1933
1934The convention for overrides has always been for them to be lower-case
1935characters. This practice is now a requirement as BitBake's datastore
1936now assumes lower-case characters in order to give a slight performance
1937boost during parsing. In practical terms, this requirement means that
1938anything that ends up in ```OVERRIDES`` <#var-OVERRIDES>`__ must now
1939appear in lower-case characters (e.g. values for ``MACHINE``,
1940``TARGET_ARCH``, ``DISTRO``, and also recipe names if
1941``_pn-``\ recipename overrides are to be effective).
1942
1943.. _migration-2.1-expand-parameter-to-getvar-and-getvarflag-now-mandatory:
1944
1945Expand Parameter to ``getVar()`` and ``getVarFlag()`` is Now Mandatory
1946----------------------------------------------------------------------
1947
1948The expand parameter to ``getVar()`` and ``getVarFlag()`` previously
1949defaulted to False if not specified. Now, however, no default exists so
1950one must be specified. You must change any ``getVar()`` calls that do
1951not specify the final expand parameter to calls that do specify the
1952parameter. You can run the following ``sed`` command at the base of a
1953layer to make this change: sed -e 's:\(\.getVar([^,()]*\)):\1, False):g'
1954-i \`grep -ril getVar \*\` sed -e 's:\(\.getVarFlag([^,()]*,
1955[^,()]*\)):\1, False):g' -i \`grep -ril getVarFlag \*\`
1956
1957.. note::
1958
1959 The reason for this change is that it prepares the way for changing
1960 the default to True in a future Yocto Project release. This future
1961 change is a much more sensible default than False. However, the
1962 change needs to be made gradually as a sudden change of the default
1963 would potentially cause side-effects that would be difficult to
1964 detect.
1965
1966.. _migration-2.1-makefile-environment-changes:
1967
1968Makefile Environment Changes
1969----------------------------
1970
1971```EXTRA_OEMAKE`` <#var-EXTRA_OEMAKE>`__ now defaults to "" instead of
1972"-e MAKEFLAGS=". Setting ``EXTRA_OEMAKE`` to "-e MAKEFLAGS=" by default
1973was a historical accident that has required many classes (e.g.
1974``autotools``, ``module``) and recipes to override this default in order
1975to work with sensible build systems. When upgrading to the release, you
1976must edit any recipe that relies upon this old default by either setting
1977``EXTRA_OEMAKE`` back to "-e MAKEFLAGS=" or by explicitly setting any
1978required variable value overrides using ``EXTRA_OEMAKE``, which is
1979typically only needed when a Makefile sets a default value for a
1980variable that is inappropriate for cross-compilation using the "="
1981operator rather than the "?=" operator.
1982
1983.. _migration-2.1-libexecdir-reverted-to-prefix-libexec:
1984
1985``libexecdir`` Reverted to ``${prefix}/libexec``
1986------------------------------------------------
1987
1988The use of ``${libdir}/${BPN}`` as ``libexecdir`` is different as
1989compared to all other mainstream distributions, which either uses
1990``${prefix}/libexec`` or ``${libdir}``. The use is also contrary to the
1991GNU Coding Standards (i.e.
1992` <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>`__)
1993that suggest ``${prefix}/libexec`` and also notes that any
1994package-specific nesting should be done by the package itself. Finally,
1995having ``libexecdir`` change between recipes makes it very difficult for
1996different recipes to invoke binaries that have been installed into
1997``libexecdir``. The Filesystem Hierarchy Standard (i.e.
1998` <http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html>`__) now
1999recognizes the use of ``${prefix}/libexec/``, giving distributions the
2000choice between ``${prefix}/lib`` or ``${prefix}/libexec`` without
2001breaking FHS.
2002
2003.. _migration-2.1-ac-cv-sizeof-off-t-no-longer-cached-in-site-files:
2004
2005``ac_cv_sizeof_off_t`` is No Longer Cached in Site Files
2006--------------------------------------------------------
2007
2008For recipes inheriting the ```autotools`` <#ref-classes-autotools>`__
2009class, ``ac_cv_sizeof_off_t`` is no longer cached in the site files for
2010``autoconf``. The reason for this change is because the
2011``ac_cv_sizeof_off_t`` value is not necessarily static per architecture
2012as was previously assumed. Rather, the value changes based on whether
2013large file support is enabled. For most software that uses ``autoconf``,
2014this change should not be a problem. However, if you have a recipe that
2015bypasses the standard ```do_configure`` <#ref-tasks-configure>`__ task
2016from the ``autotools`` class and the software the recipe is building
2017uses a very old version of ``autoconf``, the recipe might be incapable
2018of determining the correct size of ``off_t`` during ``do_configure``.
2019
2020The best course of action is to patch the software as necessary to allow
2021the default implementation from the ``autotools`` class to work such
2022that ``autoreconf`` succeeds and produces a working configure script,
2023and to remove the overridden ``do_configure`` task such that the default
2024implementation does get used.
2025
2026.. _migration-2.1-image-generation-split-out-from-filesystem-generation:
2027
2028Image Generation is Now Split Out from Filesystem Generation
2029------------------------------------------------------------
2030
2031Previously, for image recipes the ```do_rootfs`` <#ref-tasks-rootfs>`__
2032task assembled the filesystem and then from that filesystem generated
2033images. With this Yocto Project release, image generation is split into
2034separate ```do_image_*`` <#ref-tasks-image>`__ tasks for clarity both in
2035operation and in the code.
2036
2037For most cases, this change does not present any problems. However, if
2038you have made customizations that directly modify the ``do_rootfs`` task
2039or that mention ``do_rootfs``, you might need to update those changes.
2040In particular, if you had added any tasks after ``do_rootfs``, you
2041should make edits so that those tasks are after the
2042```do_image_complete`` <#ref-tasks-image-complete>`__ task rather than
2043after ``do_rootfs`` so that the your added tasks run at the correct
2044time.
2045
2046A minor part of this restructuring is that the post-processing
2047definitions and functions have been moved from the
2048```image`` <#ref-classes-image>`__ class to the
2049```rootfs-postcommands`` <#ref-classes-rootfs*>`__ class. Functionally,
2050however, they remain unchanged.
2051
2052.. _migration-2.1-removed-recipes:
2053
2054Removed Recipes
2055---------------
2056
2057The following recipes have been removed in the 2.1 release:
2058
2059- ``gcc`` version 4.8: Versions 4.9 and 5.3 remain.
2060
2061- ``qt4``: All support for Qt 4.x has been moved out to a separate
2062 ``meta-qt4`` layer because Qt 4 is no longer supported upstream.
2063
2064- ``x11vnc``: Moved to the ``meta-oe`` layer.
2065
2066- ``linux-yocto-3.14``: No longer supported.
2067
2068- ``linux-yocto-3.19``: No longer supported.
2069
2070- ``libjpeg``: Replaced by the ``libjpeg-turbo`` recipe.
2071
2072- ``pth``: Became obsolete.
2073
2074- ``liboil``: Recipe is no longer needed and has been moved to the
2075 ``meta-multimedia`` layer.
2076
2077- ``gtk-theme-torturer``: Recipe is no longer needed and has been moved
2078 to the ``meta-gnome`` layer.
2079
2080- ``gnome-mime-data``: Recipe is no longer needed and has been moved to
2081 the ``meta-gnome`` layer.
2082
2083- ``udev``: Replaced by the ``eudev`` recipe for compatibility when
2084 using ``sysvinit`` with newer kernels.
2085
2086- ``python-pygtk``: Recipe became obsolete.
2087
2088- ``adt-installer``: Recipe became obsolete. See the "`ADT
2089 Removed <#migration-2.1-adt-removed>`__" section for more
2090 information.
2091
2092.. _migration-2.1-class-changes:
2093
2094Class Changes
2095-------------
2096
2097The following classes have changed:
2098
2099- ``autotools_stage``: Removed because the
2100 ```autotools`` <#ref-classes-autotools>`__ class now provides its
2101 functionality. Recipes that inherited from ``autotools_stage`` should
2102 now inherit from ``autotools`` instead.
2103
2104- ``boot-directdisk``: Merged into the ``image-vm`` class. The
2105 ``boot-directdisk`` class was rarely directly used. Consequently,
2106 this change should not cause any issues.
2107
2108- ``bootimg``: Merged into the
2109 ```image-live`` <#ref-classes-image-live>`__ class. The ``bootimg``
2110 class was rarely directly used. Consequently, this change should not
2111 cause any issues.
2112
2113- ``packageinfo``: Removed due to its limited use by the Hob UI, which
2114 has itself been removed.
2115
2116.. _migration-2.1-build-system-ui-changes:
2117
2118Build System User Interface Changes
2119-----------------------------------
2120
2121The following changes have been made to the build system user interface:
2122
2123- *Hob GTK+-based UI*: Removed because it is unmaintained and based on
2124 the outdated GTK+ 2 library. The Toaster web-based UI is much more
2125 capable and is actively maintained. See the "`Using the Toaster Web
2126 Interface <&YOCTO_DOCS_TOAST_URL;#using-the-toaster-web-interface>`__"
2127 section in the Toaster User Manual for more information on this
2128 interface.
2129
2130- *"puccho" BitBake UI*: Removed because is unmaintained and no longer
2131 useful.
2132
2133.. _migration-2.1-adt-removed:
2134
2135ADT Removed
2136-----------
2137
2138The Application Development Toolkit (ADT) has been removed because its
2139functionality almost completely overlapped with the `standard
2140SDK <&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk>`__ and the
2141`extensible SDK <&YOCTO_DOCS_SDK_URL;#sdk-extensible>`__. For
2142information on these SDKs and how to build and use them, see the `Yocto
2143Project Application Development and the Extensible Software Development
2144Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
2145
2146.. note::
2147
2148 The Yocto Project Eclipse IDE Plug-in is still supported and is not
2149 affected by this change.
2150
2151.. _migration-2.1-poky-reference-distribution-changes:
2152
2153Poky Reference Distribution Changes
2154-----------------------------------
2155
2156The following changes have been made for the Poky distribution:
2157
2158- The ``meta-yocto`` layer has been renamed to ``meta-poky`` to better
2159 match its purpose, which is to provide the Poky reference
2160 distribution. The ``meta-yocto-bsp`` layer retains its original name
2161 since it provides reference machines for the Yocto Project and it is
2162 otherwise unrelated to Poky. References to ``meta-yocto`` in your
2163 ``conf/bblayers.conf`` should automatically be updated, so you should
2164 not need to change anything unless you are relying on this naming
2165 elsewhere.
2166
2167- The ```uninative`` <#ref-classes-uninative>`__ class is now enabled
2168 by default in Poky. This class attempts to isolate the build system
2169 from the host distribution's C library and makes re-use of native
2170 shared state artifacts across different host distributions practical.
2171 With this class enabled, a tarball containing a pre-built C library
2172 is downloaded at the start of the build.
2173
2174 The ``uninative`` class is enabled through the
2175 ``meta/conf/distro/include/yocto-uninative.inc`` file, which for
2176 those not using the Poky distribution, can include to easily enable
2177 the same functionality.
2178
2179 Alternatively, if you wish to build your own ``uninative`` tarball,
2180 you can do so by building the ``uninative-tarball`` recipe, making it
2181 available to your build machines (e.g. over HTTP/HTTPS) and setting a
2182 similar configuration as the one set by ``yocto-uninative.inc``.
2183
2184- Static library generation, for most cases, is now disabled by default
2185 in the Poky distribution. Disabling this generation saves some build
2186 time as well as the size used for build output artifacts.
2187
2188 Disabling this library generation is accomplished through a
2189 ``meta/conf/distro/include/no-static-libs.inc``, which for those not
2190 using the Poky distribution can easily include to enable the same
2191 functionality.
2192
2193 Any recipe that needs to opt-out of having the "--disable-static"
2194 option specified on the configure command line either because it is
2195 not a supported option for the configure script or because static
2196 libraries are needed should set the following variable:
2197 DISABLE_STATIC = ""
2198
2199- The separate ``poky-tiny`` distribution now uses the musl C library
2200 instead of a heavily pared down ``glibc``. Using musl results in a
2201 smaller distribution and facilitates much greater maintainability
2202 because musl is designed to have a small footprint.
2203
2204 If you have used ``poky-tiny`` and have customized the ``glibc``
2205 configuration you will need to redo those customizations with musl
2206 when upgrading to the new release.
2207
2208.. _migration-2.1-packaging-changes:
2209
2210Packaging Changes
2211-----------------
2212
2213The following changes have been made to packaging:
2214
2215- The ``runuser`` and ``mountpoint`` binaries, which were previously in
2216 the main ``util-linux`` package, have been split out into the
2217 ``util-linux-runuser`` and ``util-linux-mountpoint`` packages,
2218 respectively.
2219
2220- The ``python-elementtree`` package has been merged into the
2221 ``python-xml`` package.
2222
2223.. _migration-2.1-tuning-file-changes:
2224
2225Tuning File Changes
2226-------------------
2227
2228The following changes have been made to the tuning files:
2229
2230- The "no-thumb-interwork" tuning feature has been dropped from the ARM
2231 tune include files. Because interworking is required for ARM EABI,
2232 attempting to disable it through a tuning feature no longer makes
2233 sense.
2234
2235 .. note::
2236
2237 Support for ARM OABI was deprecated in gcc 4.7.
2238
2239- The ``tune-cortexm*.inc`` and ``tune-cortexr4.inc`` files have been
2240 removed because they are poorly tested. Until the OpenEmbedded build
2241 system officially gains support for CPUs without an MMU, these tuning
2242 files would probably be better maintained in a separate layer if
2243 needed.
2244
2245.. _migration-2.1-supporting-gobject-introspection:
2246
2247Supporting GObject Introspection
2248--------------------------------
2249
2250This release supports generation of GLib Introspective Repository (GIR)
2251files through GObject introspection, which is the standard mechanism for
2252accessing GObject-based software from runtime environments. You can
2253enable, disable, and test the generation of this data. See the
2254"`Enabling GObject Introspection
2255Support <&YOCTO_DOCS_DEV_URL;#enabling-gobject-introspection-support>`__"
2256section in the Yocto Project Development Tasks Manual for more
2257information.
2258
2259.. _migration-2.1-miscellaneous-changes:
2260
2261Miscellaneous Changes
2262---------------------
2263
2264These additional changes exist:
2265
2266- The minimum Git version has been increased to 1.8.3.1. If your host
2267 distribution does not provide a sufficiently recent version, you can
2268 install the buildtools, which will provide it. See the "`Required
2269 Git, tar, Python and gcc
2270 Versions <#required-git-tar-python-and-gcc-versions>`__" section for
2271 more information on the buildtools tarball.
2272
2273- The buggy and incomplete support for the RPM version 4 package
2274 manager has been removed. The well-tested and maintained support for
2275 RPM version 5 remains.
2276
2277- Previously, the following list of packages were removed if
2278 package-management was not in
2279 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__, regardless of any
2280 dependencies: update-rc.d base-passwd shadow update-alternatives
2281 run-postinsts With the Yocto Project 2.1 release, these packages are
2282 only removed if "read-only-rootfs" is in ``IMAGE_FEATURES``, since
2283 they might still be needed for a read-write image even in the absence
2284 of a package manager (e.g. if users need to be added, modified, or
2285 removed at runtime).
2286
2287- The
2288 ```devtool modify`` <&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component>`__
2289 command now defaults to extracting the source since that is most
2290 commonly expected. The "-x" or "--extract" options are now no-ops. If
2291 you wish to provide your own existing source tree, you will now need
2292 to specify either the "-n" or "--no-extract" options when running
2293 ``devtool modify``.
2294
2295- If the formfactor for a machine is either not supplied or does not
2296 specify whether a keyboard is attached, then the default is to assume
2297 a keyboard is attached rather than assume no keyboard. This change
2298 primarily affects the Sato UI.
2299
2300- The ``.debug`` directory packaging is now automatic. If your recipe
2301 builds software that installs binaries into directories other than
2302 the standard ones, you no longer need to take care of setting
2303 ``FILES_${PN}-dbg`` to pick up the resulting ``.debug`` directories
2304 as these directories are automatically found and added.
2305
2306- Inaccurate disk and CPU percentage data has been dropped from
2307 ``buildstats`` output. This data has been replaced with
2308 ``getrusage()`` data and corrected IO statistics. You will probably
2309 need to update any custom code that reads the ``buildstats`` data.
2310
2311- The ``meta/conf/distro/include/package_regex.inc`` is now deprecated.
2312 The contents of this file have been moved to individual recipes.
2313
2314 .. note::
2315
2316 Because this file will likely be removed in a future Yocto Project
2317 release, it is suggested that you remove any references to the
2318 file that might be in your configuration.
2319
2320- The ``v86d/uvesafb`` has been removed from the ``genericx86`` and
2321 ``genericx86-64`` reference machines, which are provided by the
2322 ``meta-yocto-bsp`` layer. Most modern x86 boards do not rely on this
2323 file and it only adds kernel error messages during startup. If you do
2324 still need to support ``uvesafb``, you can simply add ``v86d`` to
2325 your image.
2326
2327- Build sysroot paths are now removed from debug symbol files. Removing
2328 these paths means that remote GDB using an unstripped build system
2329 sysroot will no longer work (although this was never documented to
2330 work). The supported method to accomplish something similar is to set
2331 ``IMAGE_GEN_DEBUGFS`` to "1", which will generate a companion debug
2332 image containing unstripped binaries and associated debug sources
2333 alongside the image.
2334
2335Moving to the Yocto Project 2.2 Release
2336=======================================
2337
2338This section provides migration information for moving to the Yocto
2339Project 2.2 Release from the prior release.
2340
2341.. _migration-2.2-minimum-kernel-version:
2342
2343Minimum Kernel Version
2344----------------------
2345
2346The minimum kernel version for the target system and for SDK is now
23473.2.0, due to the upgrade to ``glibc 2.24``. Specifically, for
2348AArch64-based targets the version is 3.14. For Nios II-based targets,
2349the minimum kernel version is 3.19.
2350
2351.. note::
2352
2353 For x86 and x86_64, you can reset
2354 OLDEST_KERNEL
2355 to anything down to 2.6.32 if desired.
2356
2357.. _migration-2.2-staging-directories-in-sysroot-simplified:
2358
2359Staging Directories in Sysroot Has Been Simplified
2360--------------------------------------------------
2361
2362The way directories are staged in sysroot has been simplified and
2363introduces the new ```SYSROOT_DIRS`` <#var-SYSROOT_DIRS>`__,
2364```SYSROOT_DIRS_NATIVE`` <#var-SYSROOT_DIRS_NATIVE>`__, and
2365```SYSROOT_DIRS_BLACKLIST`` <#var-SYSROOT_DIRS_BLACKLIST>`__. See the
2366`v2 patch series on the OE-Core Mailing
2367List <http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121365.html>`__
2368for additional information.
2369
2370.. _migration-2.2-removal-of-old-images-from-tmp-deploy-now-enabled:
2371
2372Removal of Old Images and Other Files in ``tmp/deploy`` Now Enabled
2373-------------------------------------------------------------------
2374
2375Removal of old images and other files in ``tmp/deploy/`` is now enabled
2376by default due to a new staging method used for those files. As a result
2377of this change, the ``RM_OLD_IMAGE`` variable is now redundant.
2378
2379.. _migration-2.2-python-changes:
2380
2381Python Changes
2382--------------
2383
2384The following changes for Python occurred:
2385
2386.. _migration-2.2-bitbake-now-requires-python-3.4:
2387
2388BitBake Now Requires Python 3.4+
2389~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2390
2391BitBake requires Python 3.4 or greater.
2392
2393.. _migration-2.2-utf-8-locale-required-on-build-host:
2394
2395UTF-8 Locale Required on Build Host
2396~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2397
2398A UTF-8 locale is required on the build host due to Python 3. Since
2399C.UTF-8 is not a standard, the default is en_US.UTF-8.
2400
2401.. _migration-2.2-metadata-now-must-use-python-3-syntax:
2402
2403Metadata Must Now Use Python 3 Syntax
2404~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2405
2406The metadata is now required to use Python 3 syntax. For help preparing
2407metadata, see any of the many Python 3 porting guides available.
2408Alternatively, you can reference the conversion commits for Bitbake and
2409you can use `OE-Core <#oe-core>`__ as a guide for changes. Following are
2410particular areas of interest: \* subprocess command-line pipes needing
2411locale decoding \* the syntax for octal values changed \* the
2412``iter*()`` functions changed name \* iterators now return views, not
2413lists \* changed names for Python modules
2414
2415.. _migration-2.2-target-python-recipes-switched-to-python-3:
2416
2417Target Python Recipes Switched to Python 3
2418~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2419
2420Most target Python recipes have now been switched to Python 3.
2421Unfortunately, systems using RPM as a package manager and providing
2422online package-manager support through SMART still require Python 2.
2423
2424.. note::
2425
2426 Python 2 and recipes that use it can still be built for the target as
2427 with previous versions.
2428
2429.. _migration-2.2-buildtools-tarball-includes-python-3:
2430
2431``buildtools-tarball`` Includes Python 3
2432~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2433
2434``buildtools-tarball`` now includes Python 3.
2435
2436.. _migration-2.2-uclibc-replaced-by-musl:
2437
2438uClibc Replaced by musl
2439-----------------------
2440
2441uClibc has been removed in favor of musl. Musl has matured, is better
2442maintained, and is compatible with a wider range of applications as
2443compared to uClibc.
2444
2445.. _migration-2.2-B-no-longer-default-working-directory-for-tasks:
2446
2447``${B}`` No Longer Default Working Directory for Tasks
2448------------------------------------------------------
2449
2450``${``\ ```B`` <#var-B>`__\ ``}`` is no longer the default working
2451directory for tasks. Consequently, any custom tasks you define now need
2452to either have the
2453``[``\ ```dirs`` <&YOCTO_DOCS_BB_URL;#variable-flags>`__\ ``]`` flag
2454set, or the task needs to change into the appropriate working directory
2455manually (e.g using ``cd`` for a shell task).
2456
2457.. note::
2458
2459 The preferred method is to use the
2460 [dirs]
2461 flag.
2462
2463.. _migration-2.2-runqemu-ported-to-python:
2464
2465``runqemu`` Ported to Python
2466----------------------------
2467
2468``runqemu`` has been ported to Python and has changed behavior in some
2469cases. Previous usage patterns continue to be supported.
2470
2471The new ``runqemu`` is a Python script. Machine knowledge is no longer
2472hardcoded into ``runqemu``. You can choose to use the ``qemuboot``
2473configuration file to define the BSP's own arguments and to make it
2474bootable with ``runqemu``. If you use a configuration file, use the
2475following form: image-name-machine.qemuboot.conf The configuration file
2476enables fine-grained tuning of options passed to QEMU without the
2477``runqemu`` script hard-coding any knowledge about different machines.
2478Using a configuration file is particularly convenient when trying to use
2479QEMU with machines other than the ``qemu*`` machines in
2480`OE-Core <#oe-core>`__. The ``qemuboot.conf`` file is generated by the
2481``qemuboot`` class when the root filesystem is being build (i.e. build
2482rootfs). QEMU boot arguments can be set in BSP's configuration file and
2483the ``qemuboot`` class will save them to ``qemuboot.conf``.
2484
2485If you want to use ``runqemu`` without a configuration file, use the
2486following command form: $ runqemu machine rootfs kernel [options]
2487Supported machines are as follows: qemuarm qemuarm64 qemux86 qemux86-64
2488qemuppc qemumips qemumips64 qemumipsel qemumips64el Consider the
2489following example, which uses the ``qemux86-64`` machine, provides a
2490root filesystem, provides an image, and uses the ``nographic`` option: $
2491runqemu qemux86-64
2492tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4
2493tmp/deploy/images/qemux86-64/bzImage nographic
2494
2495Following is a list of variables that can be set in configuration files
2496such as ``bsp.conf`` to enable the BSP to be booted by ``runqemu``:
2497
2498.. note::
2499
2500 "QB" means "QEMU Boot".
2501
2502QB_SYSTEM_NAME: QEMU name (e.g. "qemu-system-i386") QB_OPT_APPEND:
2503Options to append to QEMU (e.g. "-show-cursor") QB_DEFAULT_KERNEL:
2504Default kernel to boot (e.g. "bzImage") QB_DEFAULT_FSTYPE: Default
2505FSTYPE to boot (e.g. "ext4") QB_MEM: Memory (e.g. "-m 512") QB_MACHINE:
2506QEMU machine (e.g. "-machine virt") QB_CPU: QEMU cpu (e.g. "-cpu
2507qemu32") QB_CPU_KVM: Similar to QB_CPU except used for kvm support (e.g.
2508"-cpu kvm64") QB_KERNEL_CMDLINE_APPEND: Options to append to the
2509kernel's -append option (e.g. "console=ttyS0 console=tty") QB_DTB: QEMU
2510dtb name QB_AUDIO_DRV: QEMU audio driver (e.g. "alsa", set it when
2511support audio) QB_AUDIO_OPT: QEMU audio option (e.g. "-soundhw
2512ac97,es1370"), which is used when QB_AUDIO_DRV is set. QB_KERNEL_ROOT:
2513Kernel's root (e.g. /dev/vda) QB_TAP_OPT: Network option for 'tap' mode
2514(e.g. "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device
2515virtio-net-device,netdev=net0"). runqemu will replace "@TAP@" with the
2516one that is used, such as tap0, tap1 ... QB_SLIRP_OPT: Network option
2517for SLIRP mode (e.g. "-netdev user,id=net0 -device
2518virtio-net-device,netdev=net0") QB_ROOTFS_OPT: Used as rootfs (e.g.
2519"-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device
2520virtio-blk-device,drive=disk0"). runqemu will replace "@ROOTFS@" with
2521the one which is used, such as core-image-minimal-qemuarm64.ext4.
2522QB_SERIAL_OPT: Serial port (e.g. "-serial mon:stdio") QB_TCPSERIAL_OPT:
2523tcp serial port option (e.g. " -device virtio-serial-device -chardev
2524socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device
2525virtconsole,chardev=virtcon" runqemu will replace "@PORT@" with the port
2526number which is used.
2527
2528To use ``runqemu``, set ```IMAGE_CLASSES`` <#var-IMAGE_CLASSES>`__ as
2529follows and run ``runqemu``:
2530
2531.. note::
2532
2533 For command-line syntax, use
2534 runqemu help
2535 .
2536
2537IMAGE_CLASSES += "qemuboot"
2538
2539.. _migration-2.2-default-linker-hash-style-changed:
2540
2541Default Linker Hash Style Changed
2542---------------------------------
2543
2544The default linker hash style for ``gcc-cross`` is now "sysv" in order
2545to catch recipes that are building software without using the
2546OpenEmbedded ```LDFLAGS`` <#var-LDFLAGS>`__. This change could result in
2547seeing some "No GNU_HASH in the elf binary" QA issues when building such
2548recipes. You need to fix these recipes so that they use the expected
2549``LDFLAGS``. Depending on how the software is built, the build system
2550used by the software (e.g. a Makefile) might need to be patched.
2551However, sometimes making this fix is as simple as adding the following
2552to the recipe: TARGET_CC_ARCH += "${LDFLAGS}"
2553
2554.. _migration-2.2-kernel-image-base-name-no-longer-uses-kernel-imagetype:
2555
2556``KERNEL_IMAGE_BASE_NAME`` no Longer Uses ``KERNEL_IMAGETYPE``
2557--------------------------------------------------------------
2558
2559The ``KERNEL_IMAGE_BASE_NAME`` variable no longer uses the
2560```KERNEL_IMAGETYPE`` <#var-KERNEL_IMAGETYPE>`__ variable to create the
2561image's base name. Because the OpenEmbedded build system can now build
2562multiple kernel image types, this part of the kernel image base name as
2563been removed leaving only the following: KERNEL_IMAGE_BASE_NAME ?=
2564"${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" If you have recipes or
2565classes that use ``KERNEL_IMAGE_BASE_NAME`` directly, you might need to
2566update the references to ensure they continue to work.
2567
2568.. _migration-2.2-bitbake-changes:
2569
2570BitBake Changes
2571---------------
2572
2573The following changes took place for BitBake:
2574
2575- The "goggle" UI and standalone image-writer tool have been removed as
2576 they both require GTK+ 2.0 and were not being maintained.
2577
2578- The Perforce fetcher now supports ```SRCREV`` <#var-SRCREV>`__ for
2579 specifying the source revision to use, be it
2580 ``${``\ ```AUTOREV`` <#var-AUTOREV>`__\ ``}``, changelist number,
2581 p4date, or label, in preference to separate
2582 ```SRC_URI`` <#var-SRC_URI>`__ parameters to specify these. This
2583 change is more in-line with how the other fetchers work for source
2584 control systems. Recipes that fetch from Perforce will need to be
2585 updated to use ``SRCREV`` in place of specifying the source revision
2586 within ``SRC_URI``.
2587
2588- Some of BitBake's internal code structures for accessing the recipe
2589 cache needed to be changed to support the new multi-configuration
2590 functionality. These changes will affect external tools that use
2591 BitBake's tinfoil module. For information on these changes, see the
2592 changes made to the scripts supplied with OpenEmbedded-Core:
2593 `1 <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=189371f8393971d00bca0fceffd67cc07784f6ee>`__
2594 and
2595 `2 <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4a5aa7ea4d07c2c90a1654b174873abb018acc67>`__.
2596
2597- The task management code has been rewritten to avoid using ID
2598 indirection in order to improve performance. This change is unlikely
2599 to cause any problems for most users. However, the setscene
2600 verification function as pointed to by
2601 ``BB_SETSCENE_VERIFY_FUNCTION`` needed to change signature.
2602 Consequently, a new variable named ``BB_SETSCENE_VERIFY_FUNCTION2``
2603 has been added allowing multiple versions of BitBake to work with
2604 suitably written metadata, which includes OpenEmbedded-Core and Poky.
2605 Anyone with custom BitBake task scheduler code might also need to
2606 update the code to handle the new structure.
2607
2608.. _migration-2.2-swabber-has-been-removed:
2609
2610Swabber has Been Removed
2611------------------------
2612
2613Swabber, a tool that was intended to detect host contamination in the
2614build process, has been removed, as it has been unmaintained and unused
2615for some time and was never particularly effective. The OpenEmbedded
2616build system has since incorporated a number of mechanisms including
2617enhanced QA checks that mean that there is less of a need for such a
2618tool.
2619
2620.. _migration-2.2-removed-recipes:
2621
2622Removed Recipes
2623---------------
2624
2625The following recipes have been removed:
2626
2627- ``augeas``: No longer needed and has been moved to ``meta-oe``.
2628
2629- ``directfb``: Unmaintained and has been moved to ``meta-oe``.
2630
2631- ``gcc``: Removed 4.9 version. Versions 5.4 and 6.2 are still present.
2632
2633- ``gnome-doc-utils``: No longer needed.
2634
2635- ``gtk-doc-stub``: Replaced by ``gtk-doc``.
2636
2637- ``gtk-engines``: No longer needed and has been moved to
2638 ``meta-gnome``.
2639
2640- ``gtk-sato-engine``: Became obsolete.
2641
2642- ``libglade``: No longer needed and has been moved to ``meta-oe``.
2643
2644- ``libmad``: Unmaintained and functionally replaced by ``libmpg123``.
2645 ``libmad`` has been moved to ``meta-oe``.
2646
2647- ``libowl``: Became obsolete.
2648
2649- ``libxsettings-client``: No longer needed.
2650
2651- ``oh-puzzles``: Functionally replaced by ``puzzles``.
2652
2653- ``oprofileui``: Became obsolete. OProfile has been largely supplanted
2654 by perf.
2655
2656- ``packagegroup-core-directfb.bb``: Removed.
2657
2658- ``core-image-directfb.bb``: Removed.
2659
2660- ``pointercal``: No longer needed and has been moved to ``meta-oe``.
2661
2662- ``python-imaging``: No longer needed and moved to ``meta-python``
2663
2664- ``python-pyrex``: No longer needed and moved to ``meta-python``.
2665
2666- ``sato-icon-theme``: Became obsolete.
2667
2668- ``swabber-native``: Swabber has been removed. See the `entry on
2669 Swabber <#migration-2.2-swabber-has-been-removed>`__.
2670
2671- ``tslib``: No longer needed and has been moved to ``meta-oe``.
2672
2673- ``uclibc``: Removed in favor of musl.
2674
2675- ``xtscal``: No longer needed and moved to ``meta-oe``
2676
2677.. _migration-2.2-removed-classes:
2678
2679Removed Classes
2680---------------
2681
2682The following classes have been removed:
2683
2684- ``distutils-native-base``: No longer needed.
2685
2686- ``distutils3-native-base``: No longer needed.
2687
2688- ``sdl``: Only set ```DEPENDS`` <#var-DEPENDS>`__ and
2689 ```SECTION`` <#var-SECTION>`__, which are better set within the
2690 recipe instead.
2691
2692- ``sip``: Mostly unused.
2693
2694- ``swabber``: See the `entry on
2695 Swabber <#migration-2.2-swabber-has-been-removed>`__.
2696
2697.. _migration-2.2-minor-packaging-changes:
2698
2699Minor Packaging Changes
2700-----------------------
2701
2702The following minor packaging changes have occurred:
2703
2704- ``grub``: Split ``grub-editenv`` into its own package.
2705
2706- ``systemd``: Split container and vm related units into a new package,
2707 systemd-container.
2708
2709- ``util-linux``: Moved ``prlimit`` to a separate
2710 ``util-linux-prlimit`` package.
2711
2712.. _migration-2.2-miscellaneous-changes:
2713
2714Miscellaneous Changes
2715---------------------
2716
2717The following miscellaneous changes have occurred:
2718
2719- ``package_regex.inc``: Removed because the definitions
2720 ``package_regex.inc`` previously contained have been moved to their
2721 respective recipes.
2722
2723- Both ``devtool add`` and ``recipetool create`` now use a fixed
2724 ```SRCREV`` <#var-SRCREV>`__ by default when fetching from a Git
2725 repository. You can override this in either case to use
2726 ``${``\ ```AUTOREV`` <#var-AUTOREV>`__\ ``}`` instead by using the
2727 ``-a`` or ``DASHDASHautorev`` command-line option
2728
2729- ``distcc``: GTK+ UI is now disabled by default.
2730
2731- ``packagegroup-core-tools-testapps``: Removed Piglit.
2732
2733- ``image.bbclass``: Renamed COMPRESS(ION) to CONVERSION. This change
2734 means that ``COMPRESSIONTYPES``, ``COMPRESS_DEPENDS`` and
2735 ``COMPRESS_CMD`` are deprecated in favor of ``CONVERSIONTYPES``,
2736 ``CONVERSION_DEPENDS`` and ``CONVERSION_CMD``. The ``COMPRESS*``
2737 variable names will still work in the 2.2 release but metadata that
2738 does not need to be backwards-compatible should be changed to use the
2739 new names as the ``COMPRESS*`` ones will be removed in a future
2740 release.
2741
2742- ``gtk-doc``: A full version of ``gtk-doc`` is now made available.
2743 However, some old software might not be capable of using the current
2744 version of ``gtk-doc`` to build documentation. You need to change
2745 recipes that build such software so that they explicitly disable
2746 building documentation with ``gtk-doc``.
2747
2748Moving to the Yocto Project 2.3 Release
2749=======================================
2750
2751This section provides migration information for moving to the Yocto
2752Project 2.3 Release from the prior release.
2753
2754.. _migration-2.3-recipe-specific-sysroots:
2755
2756Recipe-specific Sysroots
2757------------------------
2758
2759The OpenEmbedded build system now uses one sysroot per recipe to resolve
2760long-standing issues with configuration script auto-detection of
2761undeclared dependencies. Consequently, you might find that some of your
2762previously written custom recipes are missing declared dependencies,
2763particularly those dependencies that are incidentally built earlier in a
2764typical build process and thus are already likely to be present in the
2765shared sysroot in previous releases.
2766
2767Consider the following:
2768
2769- *Declare Build-Time Dependencies:* Because of this new feature, you
2770 must explicitly declare all build-time dependencies for your recipe.
2771 If you do not declare these dependencies, they are not populated into
2772 the sysroot for the recipe.
2773
2774- *Specify Pre-Installation and Post-Installation Native Tool
2775 Dependencies:* You must specifically specify any special native tool
2776 dependencies of ``pkg_preinst`` and ``pkg_postinst`` scripts by using
2777 the ```PACKAGE_WRITE_DEPS`` <#var-PACKAGE_WRITE_DEPS>`__ variable.
2778 Specifying these dependencies ensures that these tools are available
2779 if these scripts need to be run on the build host during the
2780 ```do_rootfs`` <#ref-tasks-rootfs>`__ task.
2781
2782 As an example, see the ``dbus`` recipe. You will see that this recipe
2783 has a ``pkg_postinst`` that calls ``systemctl`` if "systemd" is in
2784 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__. In the example,
2785 ``systemd-systemctl-native`` is added to ``PACKAGE_WRITE_DEPS``,
2786 which is also conditional on "systemd" being in ``DISTRO_FEATURES``.
2787
2788- *Examine Recipes that Use ``SSTATEPOSTINSTFUNCS``:* You need to
2789 examine any recipe that uses ``SSTATEPOSTINSTFUNCS`` and determine
2790 steps to take.
2791
2792 Functions added to ``SSTATEPOSTINSTFUNCS`` are still called as they
2793 were in previous Yocto Project releases. However, since a separate
2794 sysroot is now being populated for every recipe and if existing
2795 functions being called through ``SSTATEPOSTINSTFUNCS`` are doing
2796 relocation, then you will need to change these to use a
2797 post-installation script that is installed by a function added to
2798 ```SYSROOT_PREPROCESS_FUNCS`` <#var-SYSROOT_PREPROCESS_FUNCS>`__.
2799
2800 For an example, see the ``pixbufcache`` class in ``meta/classes/`` in
2801 the Yocto Project `Source
2802 Repositories <&YOCTO_DOCS_OM_URL;#source-repositories>`__.
2803
2804 .. note::
2805
2806 The
2807 SSTATEPOSTINSTFUNCS
2808 variable itself is now deprecated in favor of the
2809 do_populate_sysroot[postfuncs]
2810 task. Consequently, if you do still have any function or functions
2811 that need to be called after the sysroot component is created for
2812 a recipe, then you would be well advised to take steps to use a
2813 post installation script as described previously. Taking these
2814 steps prepares your code for when
2815 SSTATEPOSTINSTFUNCS
2816 is removed in a future Yocto Project release.
2817
2818- *Specify the Sysroot when Using Certain External Scripts:* Because
2819 the shared sysroot is now gone, the scripts
2820 ``oe-find-native-sysroot`` and ``oe-run-native`` have been changed
2821 such that you need to specify which recipe's
2822 ```STAGING_DIR_NATIVE`` <#var-STAGING_DIR_NATIVE>`__ is used.
2823
2824.. note::
2825
2826 You can find more information on how recipe-specific sysroots work in
2827 the "
2828 staging.bbclass
2829 " section.
2830
2831.. _migration-2.3-path-variable:
2832
2833``PATH`` Variable
2834-----------------
2835
2836Within the environment used to run build tasks, the environment variable
2837``PATH`` is now sanitized such that the normal native binary paths
2838(``/bin``, ``/sbin``, ``/usr/bin`` and so forth) are removed and a
2839directory containing symbolic links linking only to the binaries from
2840the host mentioned in the ```HOSTTOOLS`` <#var-HOSTTOOLS>`__ and
2841```HOSTTOOLS_NONFATAL`` <#var-HOSTTOOLS_NONFATAL>`__ variables is added
2842to ``PATH``.
2843
2844Consequently, any native binaries provided by the host that you need to
2845call needs to be in one of these two variables at the configuration
2846level.
2847
2848Alternatively, you can add a native recipe (i.e. ``-native``) that
2849provides the binary to the recipe's ```DEPENDS`` <#var-DEPENDS>`__
2850value.
2851
2852.. note::
2853
2854 PATH
2855 is not sanitized in the same way within
2856 devshell
2857 . If it were, you would have difficulty running host tools for
2858 development and debugging within the shell.
2859
2860.. _migration-2.3-scripts:
2861
2862Changes to Scripts
2863------------------
2864
2865The following changes to scripts took place:
2866
2867- *``oe-find-native-sysroot``:* The usage for the
2868 ``oe-find-native-sysroot`` script has changed to the following: $ .
2869 oe-find-native-sysroot recipe You must now supply a recipe for recipe
2870 as part of the command. Prior to the Yocto Project DISTRO release, it
2871 was not necessary to provide the script with the command.
2872
2873- *``oe-run-native``:* The usage for the ``oe-run-native`` script has
2874 changed to the following: $ oe-run-native native_recipe tool You must
2875 supply the name of the native recipe and the tool you want to run as
2876 part of the command. Prior to the Yocto Project DISTRO release, it
2877 was not necessary to provide the native recipe with the command.
2878
2879- *``cleanup-workdir``:* The ``cleanup-workdir`` script has been
2880 removed because the script was found to be deleting files it should
2881 not have, which lead to broken build trees. Rather than trying to
2882 delete portions of ```TMPDIR`` <#var-TMPDIR>`__ and getting it wrong,
2883 it is recommended that you delete ``TMPDIR`` and have it restored
2884 from shared state (sstate) on subsequent builds.
2885
2886- *``wipe-sysroot``:* The ``wipe-sysroot`` script has been removed as
2887 it is no longer needed with recipe-specific sysroots.
2888
2889.. _migration-2.3-functions:
2890
2891Changes to Functions
2892--------------------
2893
2894The previously deprecated ``bb.data.getVar()``, ``bb.data.setVar()``,
2895and related functions have been removed in favor of ``d.getVar()``,
2896``d.setVar()``, and so forth.
2897
2898You need to fix any references to these old functions.
2899
2900.. _migration-2.3-bitbake-changes:
2901
2902BitBake Changes
2903---------------
2904
2905The following changes took place for BitBake:
2906
2907- *BitBake's Graphical Dependency Explorer UI Replaced:* BitBake's
2908 graphical dependency explorer UI ``depexp`` was replaced by
2909 ``taskexp`` ("Task Explorer"), which provides a graphical way of
2910 exploring the ``task-depends.dot`` file. The data presented by Task
2911 Explorer is much more accurate than the data that was presented by
2912 ``depexp``. Being able to visualize the data is an often requested
2913 feature as standard ``*.dot`` file viewers cannot usual cope with the
2914 size of the ``task-depends.dot`` file.
2915
2916- *BitBake "-g" Output Changes:* The ``package-depends.dot`` and
2917 ``pn-depends.dot`` files as previously generated using the
2918 ``bitbake -g`` command have been removed. A ``recipe-depends.dot``
2919 file is now generated as a collapsed version of ``task-depends.dot``
2920 instead.
2921
2922 The reason for this change is because ``package-depends.dot`` and
2923 ``pn-depends.dot`` largely date back to a time before task-based
2924 execution and do not take into account task-level dependencies
2925 between recipes, which could be misleading.
2926
2927- *Mirror Variable Splitting Changes:* Mirror variables including
2928 ```MIRRORS`` <#var-MIRRORS>`__, ```PREMIRRORS`` <#var-PREMIRRORS>`__,
2929 and ```SSTATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__ can now separate
2930 values entirely with spaces. Consequently, you no longer need "\\n".
2931 BitBake looks for pairs of values, which simplifies usage. There
2932 should be no change required to existing mirror variable values
2933 themselves.
2934
2935- *The Subversion (SVN) Fetcher Uses an "ssh" Parameter and Not an
2936 "rsh" Parameter:* The SVN fetcher now takes an "ssh" parameter
2937 instead of an "rsh" parameter. This new optional parameter is used
2938 when the "protocol" parameter is set to "svn+ssh". You can only use
2939 the new parameter to specify the ``ssh`` program used by SVN. The SVN
2940 fetcher passes the new parameter through the ``SVN_SSH`` environment
2941 variable during the ```do_fetch`` <#ref-tasks-fetch>`__ task.
2942
2943 See the "`Subversion (SVN) Fetcher
2944 (svn://) <&YOCTO_DOCS_BB_URL;#svn-fetcher>`__" section in the BitBake
2945 User Manual for additional information.
2946
2947- *``BB_SETSCENE_VERIFY_FUNCTION`` and ``BB_SETSCENE_VERIFY_FUNCTION2``
2948 Removed:* Because the mechanism they were part of is no longer
2949 necessary with recipe-specific sysroots, the
2950 ``BB_SETSCENE_VERIFY_FUNCTION`` and ``BB_SETSCENE_VERIFY_FUNCTION2``
2951 variables have been removed.
2952
2953.. _migration-2.3-absolute-symlinks:
2954
2955Absolute Symbolic Links
2956-----------------------
2957
2958Absolute symbolic links (symlinks) within staged files are no longer
2959permitted and now trigger an error. Any explicit creation of symlinks
2960can use the ``lnr`` script, which is a replacement for ``ln -r``.
2961
2962If the build scripts in the software that the recipe is building are
2963creating a number of absolute symlinks that need to be corrected, you
2964can inherit ``relative_symlinks`` within the recipe to turn those
2965absolute symlinks into relative symlinks.
2966
2967.. _migration-2.3-gplv2-and-gplv3-moves:
2968
2969GPLv2 Versions of GPLv3 Recipes Moved
2970-------------------------------------
2971
2972Older GPLv2 versions of GPLv3 recipes have moved to a separate
2973``meta-gplv2`` layer.
2974
2975If you use ```INCOMPATIBLE_LICENSE`` <#var-INCOMPATIBLE_LICENSE>`__ to
2976exclude GPLv3 or set ```PREFERRED_VERSION`` <#var-PREFERRED_VERSION>`__
2977to substitute a GPLv2 version of a GPLv3 recipe, then you must add the
2978``meta-gplv2`` layer to your configuration.
2979
2980.. note::
2981
2982 You can find
2983 meta-gplv2
2984 layer in the OpenEmbedded layer index at
2985 .
2986
2987These relocated GPLv2 recipes do not receive the same level of
2988maintenance as other core recipes. The recipes do not get security fixes
2989and upstream no longer maintains them. In fact, the upstream community
2990is actively hostile towards people that use the old versions of the
2991recipes. Moving these recipes into a separate layer both makes the
2992different needs of the recipes clearer and clearly identifies the number
2993of these recipes.
2994
2995.. note::
2996
2997 The long-term solution might be to move to BSD-licensed replacements
2998 of the GPLv3 components for those that need to exclude GPLv3-licensed
2999 components from the target system. This solution will be investigated
3000 for future Yocto Project releases.
3001
3002.. _migration-2.3-package-management-changes:
3003
3004Package Management Changes
3005--------------------------
3006
3007The following package management changes took place:
3008
3009- Smart package manager is replaced by DNF package manager. Smart has
3010 become unmaintained upstream, is not ported to Python 3.x.
3011 Consequently, Smart needed to be replaced. DNF is the only feasible
3012 candidate.
3013
3014 The change in functionality is that the on-target runtime package
3015 management from remote package feeds is now done with a different
3016 tool that has a different set of command-line options. If you have
3017 scripts that call the tool directly, or use its API, they need to be
3018 fixed.
3019
3020 For more information, see the `DNF
3021 Documentation <http://dnf.readthedocs.io/en/latest/>`__.
3022
3023- Rpm 5.x is replaced with Rpm 4.x. This is done for two major reasons:
3024
3025 - DNF is API-incompatible with Rpm 5.x and porting it and
3026 maintaining the port is non-trivial.
3027
3028 - Rpm 5.x itself has limited maintenance upstream, and the Yocto
3029 Project is one of the very few remaining users.
3030
3031- Berkeley DB 6.x is removed and Berkeley DB 5.x becomes the default:
3032
3033 - Version 6.x of Berkeley DB has largely been rejected by the open
3034 source community due to its AGPLv3 license. As a result, most
3035 mainstream open source projects that require DB are still
3036 developed and tested with DB 5.x.
3037
3038 - In OE-core, the only thing that was requiring DB 6.x was Rpm 5.x.
3039 Thus, no reason exists to continue carrying DB 6.x in OE-core.
3040
3041- ``createrepo`` is replaced with ``createrepo_c``.
3042
3043 ``createrepo_c`` is the current incarnation of the tool that
3044 generates remote repository metadata. It is written in C as compared
3045 to ``createrepo``, which is written in Python. ``createrepo_c`` is
3046 faster and is maintained.
3047
3048- Architecture-independent RPM packages are "noarch" instead of "all".
3049
3050 This change was made because too many places in DNF/RPM4 stack
3051 already make that assumption. Only the filenames and the architecture
3052 tag has changed. Nothing else has changed in OE-core system,
3053 particularly in the ```allarch.bbclass`` <#ref-classes-allarch>`__
3054 class.
3055
3056- Signing of remote package feeds using ``PACKAGE_FEED_SIGN`` is not
3057 currently supported. This issue will be fully addressed in a future
3058 Yocto Project release. See `defect
3059 11209 <https://bugzilla.yoctoproject.org/show_bug.cgi?id=11209>`__
3060 for more information on a solution to package feed signing with RPM
3061 in the Yocto Project 2.3 release.
3062
3063- OPKG now uses the libsolv backend for resolving package dependencies
3064 by default. This is vastly superior to OPKG's internal ad-hoc solver
3065 that was previously used. This change does have a small impact on
3066 disk (around 500 KB) and memory footprint.
3067
3068 .. note::
3069
3070 For further details on this change, see the
3071 commit message
3072 .
3073
3074.. _migration-2.3-removed-recipes:
3075
3076Removed Recipes
3077---------------
3078
3079The following recipes have been removed:
3080
3081- *``linux-yocto 4.8:``* Version 4.8 has been removed. Versions 4.1
3082 (LTSI), 4.4 (LTS), 4.9 (LTS/LTSI) and 4.10 are now present.
3083
3084- *``python-smartpm:``* Functionally replaced by ``dnf``.
3085
3086- *``createrepo:``* Replaced by the ``createrepo-c`` recipe.
3087
3088- *``rpmresolve:``* No longer needed with the move to RPM 4 as RPM
3089 itself is used instead.
3090
3091- *``gstreamer:``* Removed the GStreamer Git version recipes as they
3092 have been stale. ``1.10.``\ x recipes are still present.
3093
3094- *``alsa-conf-base:``* Merged into ``alsa-conf`` since ``libasound``
3095 depended on both. Essentially, no way existed to install only one of
3096 these.
3097
3098- *``tremor:``* Moved to ``meta-multimedia``. Fixed-integer Vorbis
3099 decoding is not needed by current hardware. Thus, GStreamer's ivorbis
3100 plugin has been disabled by default eliminating the need for the
3101 ``tremor`` recipe in `OE-Core <#oe-core>`__.
3102
3103- *``gummiboot:``* Replaced by ``systemd-boot``.
3104
3105.. _migration-2.3-wic-changes:
3106
3107Wic Changes
3108-----------
3109
3110The following changes have been made to Wic:
3111
3112.. note::
3113
3114 For more information on Wic, see the "
3115 Creating Partitioned Images Using Wic
3116 " section in the Yocto Project Development Tasks Manual.
3117
3118- *Default Output Directory Changed:* Wic's default output directory is
3119 now the current directory by default instead of the unusual
3120 ``/var/tmp/wic``.
3121
3122 The "-o" and "--outdir" options remain unchanged and are used to
3123 specify your preferred output directory if you do not want to use the
3124 default directory.
3125
3126- *fsimage Plug-in Removed:* The Wic fsimage plugin has been removed as
3127 it duplicates functionality of the rawcopy plugin.
3128
3129.. _migration-2.3-qa-changes:
3130
3131QA Changes
3132----------
3133
3134The following QA checks have changed:
3135
3136- *``unsafe-references-in-binaries``:* The
3137 ``unsafe-references-in-binaries`` QA check, which was disabled by
3138 default, has now been removed. This check was intended to detect
3139 binaries in ``/bin`` that link to libraries in ``/usr/lib`` and have
3140 the case where the user has ``/usr`` on a separate filesystem to
3141 ``/``.
3142
3143 The removed QA check was buggy. Additionally, ``/usr`` residing on a
3144 separate partition from ``/`` is now a rare configuration.
3145 Consequently, ``unsafe-references-in-binaries`` was removed.
3146
3147- *``file-rdeps``:* The ``file-rdeps`` QA check is now an error by
3148 default instead of a warning. Because it is an error instead of a
3149 warning, you need to address missing runtime dependencies.
3150
3151 For additional information, see the
3152 ```insane`` <#ref-classes-insane>`__ class and the "`Errors and
3153 Warnings <#qa-errors-and-warnings>`__" section.
3154
3155.. _migration-2.3-miscellaneous-changes:
3156
3157Miscellaneous Changes
3158---------------------
3159
3160The following miscellaneous changes have occurred:
3161
3162- In this release, a number of recipes have been changed to ignore the
3163 ``largefile`` ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ item,
3164 enabling large file support unconditionally. This feature has always
3165 been enabled by default. Disabling the feature has not been widely
3166 tested.
3167
3168 .. note::
3169
3170 Future releases of the Yocto Project will remove entirely the
3171 ability to disable the
3172 largefile
3173 feature, which would make it unconditionally enabled everywhere.
3174
3175- If the ```DISTRO_VERSION`` <#var-DISTRO_VERSION>`__ value contains
3176 the value of the ```DATE`` <#var-DATE>`__ variable, which is the
3177 default between Poky releases, the ``DATE`` value is explicitly
3178 excluded from ``/etc/issue`` and ``/etc/issue.net``, which is
3179 displayed at the login prompt, in order to avoid conflicts with
3180 Multilib enabled. Regardless, the ``DATE`` value is inaccurate if the
3181 ``base-files`` recipe is restored from shared state (sstate) rather
3182 than rebuilt.
3183
3184 If you need the build date recorded in ``/etc/issue*`` or anywhere
3185 else in your image, a better method is to define a post-processing
3186 function to do it and have the function called from
3187 ```ROOTFS_POSTPROCESS_COMMAND`` <#var-ROOTFS_POSTPROCESS_COMMAND>`__.
3188 Doing so ensures the value is always up-to-date with the created
3189 image.
3190
3191- Dropbear's ``init`` script now disables DSA host keys by default.
3192 This change is in line with the systemd service file, which supports
3193 RSA keys only, and with recent versions of OpenSSH, which deprecates
3194 DSA host keys.
3195
3196- The ```buildhistory`` <#ref-classes-buildhistory>`__ class now
3197 correctly uses tabs as separators between all columns in
3198 ``installed-package-sizes.txt`` in order to aid import into other
3199 tools.
3200
3201- The ``USE_LDCONFIG`` variable has been replaced with the "ldconfig"
3202 ``DISTRO_FEATURES`` feature. Distributions that previously set:
3203 USE_LDCONFIG = "0" should now instead use the following:
3204 DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig"
3205
3206- The default value of
3207 ```COPYLEFT_LICENSE_INCLUDE`` <#var-COPYLEFT_LICENSE_INCLUDE>`__ now
3208 includes all versions of AGPL licenses in addition to GPL and LGPL.
3209
3210 .. note::
3211
3212 The default list is not intended to be guaranteed as a complete
3213 safe list. You should seek legal advice based on what you are
3214 distributing if you are unsure.
3215
3216- Kernel module packages are now suffixed with the kernel version in
3217 order to allow module packages from multiple kernel versions to
3218 co-exist on a target system. If you wish to return to the previous
3219 naming scheme that does not include the version suffix, use the
3220 following: KERNEL_MODULE_PACKAGE_SUFFIX to ""
3221
3222- Removal of ``libtool`` ``*.la`` files is now enabled by default. The
3223 ``*.la`` files are not actually needed on Linux and relocating them
3224 is an unnecessary burden.
3225
3226 If you need to preserve these ``.la`` files (e.g. in a custom
3227 distribution), you must change
3228 ```INHERIT_DISTRO`` <#var-INHERIT_DISTRO>`__ such that
3229 "remove-libtool" is not included in the value.
3230
3231- Extensible SDKs built for GCC 5+ now refuse to install on a
3232 distribution where the host GCC version is 4.8 or 4.9. This change
3233 resulted from the fact that the installation is known to fail due to
3234 the way the ``uninative`` shared state (sstate) package is built. See
3235 the ```uninative`` <#ref-classes-uninative>`__ class for additional
3236 information.
3237
3238- All native and nativesdk recipes now use a separate
3239 ``DISTRO_FEATURES`` value instead of sharing the value used by
3240 recipes for the target, in order to avoid unnecessary rebuilds.
3241
3242 The ``DISTRO_FEATURES`` for ``native`` recipes is
3243 ```DISTRO_FEATURES_NATIVE`` <#var-DISTRO_FEATURES_NATIVE>`__ added to
3244 an intersection of ``DISTRO_FEATURES`` and
3245 ```DISTRO_FEATURES_FILTER_NATIVE`` <#var-DISTRO_FEATURES_FILTER_NATIVE>`__.
3246
3247 For nativesdk recipes, the corresponding variables are
3248 ```DISTRO_FEATURES_NATIVESDK`` <#var-DISTRO_FEATURES_NATIVESDK>`__
3249 and
3250 ```DISTRO_FEATURES_FILTER_NATIVESDK`` <#var-DISTRO_FEATURES_FILTER_NATIVESDK>`__.
3251
3252- The ``FILESDIR`` variable, which was previously deprecated and rarely
3253 used, has now been removed. You should change any recipes that set
3254 ``FILESDIR`` to set ```FILESPATH`` <#var-FILESPATH>`__ instead.
3255
3256- The ``MULTIMACH_HOST_SYS`` variable has been removed as it is no
3257 longer needed with recipe-specific sysroots.
3258
3259Moving to the Yocto Project 2.4 Release
3260=======================================
3261
3262This section provides migration information for moving to the Yocto
3263Project 2.4 Release from the prior release.
3264
3265.. _migration-2.4-memory-resident-mode:
3266
3267Memory Resident Mode
3268--------------------
3269
3270A persistent mode is now available in BitBake's default operation,
3271replacing its previous "memory resident mode" (i.e.
3272``oe-init-build-env-memres``). Now you only need to set
3273```BB_SERVER_TIMEOUT`` <#var-BB_SERVER_TIMEOUT>`__ to a timeout (in
3274seconds) and BitBake's server stays resident for that amount of time
3275between invocations. The ``oe-init-build-env-memres`` script has been
3276removed since a separate environment setup script is no longer needed.
3277
3278.. _migration-2.4-packaging-changes:
3279
3280Packaging Changes
3281-----------------
3282
3283This section provides information about packaging changes that have
3284occurred:
3285
3286- *``python3`` Changes:*
3287
3288 - The main "python3" package now brings in all of the standard
3289 Python 3 distribution rather than a subset. This behavior matches
3290 what is expected based on traditional Linux distributions. If you
3291 wish to install a subset of Python 3, specify ``python-core`` plus
3292 one or more of the individual packages that are still produced.
3293
3294 - *``python3``:* The ``bz2.py``, ``lzma.py``, and
3295 ``_compression.py`` scripts have been moved from the
3296 ``python3-misc`` package to the ``python3-compression`` package.
3297
3298- *``binutils``:* The ``libbfd`` library is now packaged in a separate
3299 "libbfd" package. This packaging saves space when certain tools (e.g.
3300 ``perf``) are installed. In such cases, the tools only need
3301 ``libbfd`` rather than all the packages in ``binutils``.
3302
3303- *``util-linux`` Changes:*
3304
3305 - The ``su`` program is now packaged in a separate "util-linux-su"
3306 package, which is only built when "pam" is listed in the
3307 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ variable.
3308 ``util-linux`` should not be installed unless it is needed because
3309 ``su`` is normally provided through the shadow file format. The
3310 main ``util-linux`` package has runtime dependencies (i.e.
3311 ```RDEPENDS`` <#var-RDEPENDS>`__) on the ``util-linux-su`` package
3312 when "pam" is in ``DISTRO_FEATURES``.
3313
3314 - The ``switch_root`` program is now packaged in a separate
3315 "util-linux-switch-root" package for small initramfs images that
3316 do not need the whole ``util-linux`` package or the busybox
3317 binary, which are both much larger than ``switch_root``. The main
3318 ``util-linux`` package has a recommended runtime dependency (i.e.
3319 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__) on the
3320 ``util-linux-switch-root`` package.
3321
3322 - The ``ionice`` program is now packaged in a separate
3323 "util-linux-ionice" package. The main ``util-linux`` package has a
3324 recommended runtime dependency (i.e. ``RRECOMMENDS``) on the
3325 ``util-linux-ionice`` package.
3326
3327- *``initscripts``:* The ``sushell`` program is now packaged in a
3328 separate "initscripts-sushell" package. This packaging change allows
3329 systems to pull ``sushell`` in when ``selinux`` is enabled. The
3330 change also eliminates needing to pull in the entire ``initscripts``
3331 package. The main ``initscripts`` package has a runtime dependency
3332 (i.e. ``RDEPENDS``) on the ``sushell`` package when "selinux" is in
3333 ``DISTRO_FEATURES``.
3334
3335- *``glib-2.0``:* The ``glib-2.0`` package now has a recommended
3336 runtime dependency (i.e. ``RRECOMMENDS``) on the ``shared-mime-info``
3337 package, since large portions of GIO are not useful without the MIME
3338 database. You can remove the dependency by using the
3339 ```BAD_RECOMMENDATIONS`` <#var-BAD_RECOMMENDATIONS>`__ variable if
3340 ``shared-mime-info`` is too large and is not required.
3341
3342- *Go Standard Runtime:* The Go standard runtime has been split out
3343 from the main ``go`` recipe into a separate ``go-runtime`` recipe.
3344
3345.. _migration-2.4-removed-recipes:
3346
3347Removed Recipes
3348---------------
3349
3350The following recipes have been removed:
3351
3352- *``acpitests``:* This recipe is not maintained.
3353
3354- *``autogen-native``:* No longer required by Grub, oe-core, or
3355 meta-oe.
3356
3357- *``bdwgc``:* Nothing in OpenEmbedded-Core requires this recipe. It
3358 has moved to meta-oe.
3359
3360- *``byacc``:* This recipe was only needed by rpm 5.x and has moved to
3361 meta-oe.
3362
3363- *``gcc (5.4)``:* The 5.4 series dropped the recipe in favor of 6.3 /
3364 7.2.
3365
3366- *``gnome-common``:* Deprecated upstream and no longer needed.
3367
3368- *``go-bootstrap-native``:* Go 1.9 does its own bootstrapping so this
3369 recipe has been removed.
3370
3371- *``guile``:* This recipe was only needed by ``autogen-native`` and
3372 ``remake``. The recipe is no longer needed by either of these
3373 programs.
3374
3375- *``libclass-isa-perl``:* This recipe was previously needed for LSB 4,
3376 no longer needed.
3377
3378- *``libdumpvalue-perl``:* This recipe was previously needed for LSB 4,
3379 no longer needed.
3380
3381- *``libenv-perl``:* This recipe was previously needed for LSB 4, no
3382 longer needed.
3383
3384- *``libfile-checktree-perl``:* This recipe was previously needed for
3385 LSB 4, no longer needed.
3386
3387- *``libi18n-collate-perl``:* This recipe was previously needed for LSB
3388 4, no longer needed.
3389
3390- *``libiconv``:* This recipe was only needed for ``uclibc``, which was
3391 removed in the previous release. ``glibc`` and ``musl`` have their
3392 own implementations. ``meta-mingw`` still needs ``libiconv``, so it
3393 has been moved to ``meta-mingw``.
3394
3395- *``libpng12``:* This recipe was previously needed for LSB. The
3396 current ``libpng`` is 1.6.x.
3397
3398- *``libpod-plainer-perl``:* This recipe was previously needed for LSB
3399 4, no longer needed.
3400
3401- *``linux-yocto (4.1)``:* This recipe was removed in favor of 4.4,
3402 4.9, 4.10 and 4.12.
3403
3404- *``mailx``:* This recipe was previously only needed for LSB
3405 compatibility, and upstream is defunct.
3406
3407- *``mesa (git version only)``:* The git version recipe was stale with
3408 respect to the release version.
3409
3410- *``ofono (git version only)``:* The git version recipe was stale with
3411 respect to the release version.
3412
3413- *``portmap``:* This recipe is obsolete and is superseded by
3414 ``rpcbind``.
3415
3416- *``python3-pygpgme``:* This recipe is old and unmaintained. It was
3417 previously required by ``dnf``, which has switched to official
3418 ``gpgme`` Python bindings.
3419
3420- *``python-async``:* This recipe has been removed in favor of the
3421 Python 3 version.
3422
3423- *``python-gitdb``:* This recipe has been removed in favor of the
3424 Python 3 version.
3425
3426- *``python-git``:* This recipe was removed in favor of the Python 3
3427 version.
3428
3429- *``python-mako``:* This recipe was removed in favor of the Python 3
3430 version.
3431
3432- *``python-pexpect``:* This recipe was removed in favor of the Python
3433 3 version.
3434
3435- *``python-ptyprocess``:* This recipe was removed in favor of Python
3436 the 3 version.
3437
3438- *``python-pycurl``:* Nothing is using this recipe in
3439 OpenEmbedded-Core (i.e. ``meta-oe``).
3440
3441- *``python-six``:* This recipe was removed in favor of the Python 3
3442 version.
3443
3444- *``python-smmap``:* This recipe was removed in favor of the Python 3
3445 version.
3446
3447- *``remake``:* Using ``remake`` as the provider of ``virtual/make`` is
3448 broken. Consequently, this recipe is not needed in OpenEmbedded-Core.
3449
3450.. _migration-2.4-kernel-device-tree-move:
3451
3452Kernel Device Tree Move
3453-----------------------
3454
3455Kernel Device Tree support is now easier to enable in a kernel recipe.
3456The Device Tree code has moved to a
3457```kernel-devicetree`` <#ref-classes-kernel-devicetree>`__ class.
3458Functionality is automatically enabled for any recipe that inherits the
3459```kernel`` <#ref-classes-kernel>`__ class and sets the
3460```KERNEL_DEVICETREE`` <#var-KERNEL_DEVICETREE>`__ variable. The
3461previous mechanism for doing this,
3462``meta/recipes-kernel/linux/linux-dtb.inc``, is still available to avoid
3463breakage, but triggers a deprecation warning. Future releases of the
3464Yocto Project will remove ``meta/recipes-kernel/linux/linux-dtb.inc``.
3465It is advisable to remove any ``require`` statements that request
3466``meta/recipes-kernel/linux/linux-dtb.inc`` from any custom kernel
3467recipes you might have. This will avoid breakage in post 2.4 releases.
3468
3469.. _migration-2.4-package-qa-changes:
3470
3471Package QA Changes
3472------------------
3473
3474The following package QA changes took place:
3475
3476- The "unsafe-references-in-scripts" QA check has been removed.
3477
3478- If you refer to ``${COREBASE}/LICENSE`` within
3479 ```LIC_FILES_CHKSUM`` <#var-LIC_FILES_CHKSUM>`__ you receive a
3480 warning because this file is a description of the license for
3481 OE-Core. Use ``${COMMON_LICENSE_DIR}/MIT`` if your recipe is
3482 MIT-licensed and you cannot use the preferred method of referring to
3483 a file within the source tree.
3484
3485.. _migration-2.4-readme-changes:
3486
3487``README`` File Changes
3488-----------------------
3489
3490The following are changes to ``README`` files:
3491
3492- The main Poky ``README`` file has been moved to the ``meta-poky``
3493 layer and has been renamed ``README.poky``. A symlink has been
3494 created so that references to the old location work.
3495
3496- The ``README.hardware`` file has been moved to ``meta-yocto-bsp``. A
3497 symlink has been created so that references to the old location work.
3498
3499- A ``README.qemu`` file has been created with coverage of the
3500 ``qemu*`` machines.
3501
3502.. _migration-2.4-miscellaneous-changes:
3503
3504Miscellaneous Changes
3505---------------------
3506
3507The following are additional changes:
3508
3509- The ``ROOTFS_PKGMANAGE_BOOTSTRAP`` variable and any references to it
3510 have been removed. You should remove this variable from any custom
3511 recipes.
3512
3513- The ``meta-yocto`` directory has been removed.
3514
3515 .. note::
3516
3517 In the Yocto Project 2.1 release
3518 meta-yocto
3519 was renamed to
3520 meta-poky
3521 and the
3522 meta-yocto
3523 subdirectory remained to avoid breaking existing configurations.
3524
3525- The ``maintainers.inc`` file, which tracks maintainers by listing a
3526 primary person responsible for each recipe in OE-Core, has been moved
3527 from ``meta-poky`` to OE-Core (i.e. from
3528 ``meta-poky/conf/distro/include`` to ``meta/conf/distro/include``).
3529
3530- The ```buildhistory`` <#ref-classes-buildhistory>`__ class now makes
3531 a single commit per build rather than one commit per subdirectory in
3532 the repository. This behavior assumes the commits are enabled with
3533 ```BUILDHISTORY_COMMIT`` <#var-BUILDHISTORY_COMMIT>`__ = "1", which
3534 is typical. Previously, the ``buildhistory`` class made one commit
3535 per subdirectory in the repository in order to make it easier to see
3536 the changes for a particular subdirectory. To view a particular
3537 change, specify that subdirectory as the last parameter on the
3538 ``git show`` or ``git diff`` commands.
3539
3540- The ``x86-base.inc`` file, which is included by all x86-based machine
3541 configurations, now sets ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__
3542 using ``?=`` to "live" rather than appending with ``+=``. This change
3543 makes the default easier to override.
3544
3545- BitBake fires multiple "BuildStarted" events when multiconfig is
3546 enabled (one per configuration). For more information, see the
3547 "`Events <&YOCTO_DOCS_BB_URL;#events>`__" section in the BitBake User
3548 Manual.
3549
3550- By default, the ``security_flags.inc`` file sets a
3551 ```GCCPIE`` <#var-GCCPIE>`__ variable with an option to enable
3552 Position Independent Executables (PIE) within ``gcc``. Enabling PIE
3553 in the GNU C Compiler (GCC), makes Return Oriented Programming (ROP)
3554 attacks much more difficult to execute.
3555
3556- OE-Core now provides a ``bitbake-layers`` plugin that implements a
3557 "create-layer" subcommand. The implementation of this subcommand has
3558 resulted in the ``yocto-layer`` script being deprecated and will
3559 likely be removed in the next Yocto Project release.
3560
3561- The ``vmdk``, ``vdi``, and ``qcow2`` image file types are now used in
3562 conjunction with the "wic" image type through ``CONVERSION_CMD``.
3563 Consequently, the equivalent image types are now ``wic.vmdk``,
3564 ``wic.vdi``, and ``wic.qcow2``, respectively.
3565
3566- ``do_image_<type>[depends]`` has replaced ``IMAGE_DEPENDS_<type>``.
3567 If you have your own classes that implement custom image types, then
3568 you need to update them.
3569
3570- OpenSSL 1.1 has been introduced. However, the default is still 1.0.x
3571 through the ```PREFERRED_VERSION`` <#var-PREFERRED_VERSION>`__
3572 variable. This preference is set is due to the remaining
3573 compatibility issues with other software. The
3574 ```PROVIDES`` <#var-PROVIDES>`__ variable in the openssl 1.0 recipe
3575 now includes "openssl10" as a marker that can be used in
3576 ```DEPENDS`` <#var-DEPENDS>`__ within recipes that build software
3577 that still depend on OpenSSL 1.0.
3578
3579- To ensure consistent behavior, BitBake's "-r" and "-R" options (i.e.
3580 prefile and postfile), which are used to read or post-read additional
3581 configuration files from the command line, now only affect the
3582 current BitBake command. Before these BitBake changes, these options
3583 would "stick" for future executions.
3584
3585Moving to the Yocto Project 2.5 Release
3586=======================================
3587
3588This section provides migration information for moving to the Yocto
3589Project 2.5 Release from the prior release.
3590
3591.. _migration-2.5-packaging-changes:
3592
3593Packaging Changes
3594-----------------
3595
3596This section provides information about packaging changes that have
3597occurred:
3598
3599- *``bind-libs``:* The libraries packaged by the bind recipe are in a
3600 separate ``bind-libs`` package.
3601
3602- *``libfm-gtk``:* The ``libfm`` GTK+ bindings are split into a
3603 separate ``libfm-gtk`` package.
3604
3605- *``flex-libfl``:* The flex recipe splits out libfl into a separate
3606 ``flex-libfl`` package to avoid too many dependencies being pulled in
3607 where only the library is needed.
3608
3609- *``grub-efi``:* The ``grub-efi`` configuration is split into a
3610 separate ``grub-bootconf`` recipe. However, the dependency
3611 relationship from ``grub-efi`` is through a virtual/grub-bootconf
3612 provider making it possible to have your own recipe provide the
3613 dependency. Alternatively, you can use a BitBake append file to bring
3614 the configuration back into the ``grub-efi`` recipe.
3615
3616- *armv7a Legacy Package Feed Support:* Legacy support is removed for
3617 transitioning from ``armv7a`` to ``armv7a-vfp-neon`` in package
3618 feeds, which was previously enabled by setting
3619 ``PKGARCHCOMPAT_ARMV7A``. This transition occurred in 2011 and active
3620 package feeds should by now be updated to the new naming.
3621
3622.. _migration-2.5-removed-recipes:
3623
3624Removed Recipes
3625---------------
3626
3627The following recipes have been removed:
3628
3629- *``gcc``:* The version 6.4 recipes are replaced by 7.x.
3630
3631- *``gst-player``:* Renamed to ``gst-examples`` as per upstream.
3632
3633- *``hostap-utils``:* This software package is obsolete.
3634
3635- *``latencytop``:* This recipe is no longer maintained upstream. The
3636 last release was in 2009.
3637
3638- *``libpfm4``:* The only file that requires this recipe is
3639 ``oprofile``, which has been removed.
3640
3641- *``linux-yocto``:* The version 4.4, 4.9, and 4.10 recipes have been
3642 removed. Versions 4.12, 4.14, and 4.15 remain.
3643
3644- *``man``:* This recipe has been replaced by modern ``man-db``
3645
3646- *``mkelfimage``:* This tool has been removed in the upstream coreboot
3647 project, and is no longer needed with the removal of the ELF image
3648 type.
3649
3650- *``nativesdk-postinst-intercept``:* This recipe is not maintained.
3651
3652- *``neon``:* This software package is no longer maintained upstream
3653 and is no longer needed by anything in OpenEmbedded-Core.
3654
3655- *``oprofile``:* The functionality of this recipe is replaced by
3656 ``perf`` and keeping compatibility on an ongoing basis with ``musl``
3657 is difficult.
3658
3659- *``pax``:* This software package is obsolete.
3660
3661- *``stat``:* This software package is not maintained upstream.
3662 ``coreutils`` provides a modern stat binary.
3663
3664- *``zisofs-tools-native``:* This recipe is no longer needed because
3665 the compressed ISO image feature has been removed.
3666
3667.. _migration-2.5-scripts-and-tools-changes:
3668
3669Scripts and Tools Changes
3670-------------------------
3671
3672The following are changes to scripts and tools:
3673
3674- *``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer``*: The
3675 ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer`` scripts
3676 previously shipped with poky but not in OpenEmbedded-Core have been
3677 removed. These scripts are not maintained and are outdated. In many
3678 cases, they are also limited in scope. The
3679 ``bitbake-layers create-layer`` command is a direct replacement for
3680 ``yocto-layer``. See the documentation to create a BSP or kernel
3681 recipe in the "`BSP Kernel Recipe
3682 Example <&YOCTO_DOCS_BSP_URL;#bsp-kernel-recipe-example>`__" section.
3683
3684- *``devtool finish``:* ``devtool finish`` now exits with an error if
3685 there are uncommitted changes or a rebase/am in progress in the
3686 recipe's source repository. If this error occurs, there might be
3687 uncommitted changes that will not be included in updates to the
3688 patches applied by the recipe. A -f/--force option is provided for
3689 situations that the uncommitted changes are inconsequential and you
3690 want to proceed regardless.
3691
3692- *``scripts/oe-setup-rpmrepo`` script:* The functionality of
3693 ``scripts/oe-setup-rpmrepo`` is replaced by
3694 ``bitbake package-index``.
3695
3696- *``scripts/test-dependencies.sh`` script:* The script is largely made
3697 obsolete by the recipe-specific sysroots functionality introduced in
3698 the previous release.
3699
3700.. _migration-2.5-bitbake-changes:
3701
3702BitBake Changes
3703---------------
3704
3705The following are BitBake changes:
3706
3707- The ``--runall`` option has changed. There are two different
3708 behaviors people might want:
3709
3710 - *Behavior A:* For a given target (or set of targets) look through
3711 the task graph and run task X only if it is present and will be
3712 built.
3713
3714 - *Behavior B:* For a given target (or set of targets) look through
3715 the task graph and run task X if any recipe in the taskgraph has
3716 such a target, even if it is not in the original task graph.
3717
3718 The ``--runall`` option now performs "Behavior B". Previously
3719 ``--runall`` behaved like "Behavior A". A ``--runonly`` option has
3720 been added to retain the ability to perform "Behavior A".
3721
3722- Several explicit "run this task for all recipes in the dependency
3723 tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``,
3724 and the ``*all`` tasks provided by the ``distrodata`` and
3725 ``archiver`` classes). There is a BitBake option to complete this for
3726 any arbitrary task. For example: bitbake <target> -c fetchall should
3727 now be replaced with: bitbake <target> --runall=fetch
3728
3729.. _migration-2.5-python-and-python3-changes:
3730
3731Python and Python 3 Changes
3732---------------------------
3733
3734The following are auto-packaging changes to Python and Python 3:
3735
3736The script-managed ``python-*-manifest.inc`` files that were previously
3737used to generate Python and Python 3 packages have been replaced with a
3738JSON-based file that is easier to read and maintain. A new task is
3739available for maintainers of the Python recipes to update the JSON file
3740when upgrading to new Python versions. You can now edit the file
3741directly instead of having to edit a script and run it to update the
3742file.
3743
3744One particular change to note is that the Python recipes no longer have
3745build-time provides for their packages. This assumes ``python-foo`` is
3746one of the packages provided by the Python recipe. You can no longer run
3747``bitbake python-foo`` or have a
3748```DEPENDS`` <&YOCTO_DOCS_REF_URL;#var-DEPENDS>`__ on ``python-foo``,
3749but doing either of the following causes the package to work as
3750expected: IMAGE_INSTALL_append = " python-foo" or RDEPENDS_${PN} =
3751"python-foo" The earlier build-time provides behavior was a quirk of the
3752way the Python manifest file was created. For more information on this
3753change please see `this
3754commit <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce>`__.
3755
3756.. _migration-2.5-miscellaneous-changes:
3757
3758Miscellaneous Changes
3759---------------------
3760
3761The following are additional changes:
3762
3763- The ``kernel`` class supports building packages for multiple kernels.
3764 If your kernel recipe or ``.bbappend`` file mentions packaging at
3765 all, you should replace references to the kernel in package names
3766 with ``${KERNEL_PACKAGE_NAME}``. For example, if you disable
3767 automatic installation of the kernel image using
3768 ``RDEPENDS_kernel-base = ""`` you can avoid warnings using
3769 ``RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""`` instead.
3770
3771- The ``buildhistory`` class commits changes to the repository by
3772 default so you no longer need to set ``BUILDHISTORY_COMMIT = "1"``.
3773 If you want to disable commits you need to set
3774 ``BUILDHISTORY_COMMIT = "0"`` in your configuration.
3775
3776- The ``beaglebone`` reference machine has been renamed to
3777 ``beaglebone-yocto``. The ``beaglebone-yocto`` BSP is a reference
3778 implementation using only mainline components available in
3779 OpenEmbedded-Core and ``meta-yocto-bsp``, whereas Texas Instruments
3780 maintains a full-featured BSP in the ``meta-ti`` layer. This rename
3781 avoids the previous name clash that existed between the two BSPs.
3782
3783- The ``update-alternatives`` class no longer works with SysV ``init``
3784 scripts because this usage has been problematic. Also, the
3785 ``sysklogd`` recipe no longer uses ``update-alternatives`` because it
3786 is incompatible with other implementations.
3787
3788- By default, the ```cmake`` <#ref-classes-cmake>`__ class uses
3789 ``ninja`` instead of ``make`` for building. This improves build
3790 performance. If a recipe is broken with ``ninja``, then the recipe
3791 can set ``OECMAKE_GENERATOR = "Unix Makefiles"`` to change back to
3792 ``make``.
3793
3794- The previously deprecated ``base_*`` functions have been removed in
3795 favor of their replacements in ``meta/lib/oe`` and
3796 ``bitbake/lib/bb``. These are typically used from recipes and
3797 classes. Any references to the old functions must be updated. The
3798 following table shows the removed functions and their replacements:
3799 *Removed* *Replacement* ============================
3800 ============================ base_path_join() oe.path.join()
3801 base_path_relative() oe.path.relative() base_path_out()
3802 oe.path.format_display() base_read_file() oe.utils.read_file()
3803 base_ifelse() oe.utils.ifelse() base_conditional()
3804 oe.utils.conditional() base_less_or_equal() oe.utils.less_or_equal()
3805 base_version_less_or_equal() oe.utils.version_less_or_equal()
3806 base_contains() bb.utils.contains() base_both_contain()
3807 oe.utils.both_contain() base_prune_suffix() oe.utils.prune_suffix()
3808 oe_filter() oe.utils.str_filter() oe_filter_out()
3809 oe.utils.str_filter_out() (or use the \_remove operator).
3810
3811- Using ``exit 1`` to explicitly defer a postinstall script until first
3812 boot is now deprecated since it is not an obvious mechanism and can
3813 mask actual errors. If you want to explicitly defer a postinstall to
3814 first boot on the target rather than at ``rootfs`` creation time, use
3815 ``pkg_postinst_ontarget()`` or call
3816 ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
3817 Any failure of a ``pkg_postinst()`` script (including ``exit 1``)
3818 will trigger a warning during ``do_rootfs``.
3819
3820 For more information, see the "`Post-Installation
3821 Scripts <&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts>`__"
3822 section in the Yocto Project Development Tasks Manual.
3823
3824- The ``elf`` image type has been removed. This image type was removed
3825 because the ``mkelfimage`` tool that was required to create it is no
3826 longer provided by coreboot upstream and required updating every time
3827 ``binutils`` updated.
3828
3829- Support for .iso image compression (previously enabled through
3830 ``COMPRESSISO = "1"``) has been removed. The userspace tools
3831 (``zisofs-tools``) are unmaintained and ``squashfs`` provides better
3832 performance and compression. In order to build a live image with
3833 squashfs+lz4 compression enabled you should now set
3834 ``LIVE_ROOTFS_TYPE = "squashfs-lz4"`` and ensure that ``live`` is in
3835 ``IMAGE_FSTYPES``.
3836
3837- Recipes with an unconditional dependency on ``libpam`` are only
3838 buildable with ``pam`` in ``DISTRO_FEATURES``. If the dependency is
3839 truly optional then it is recommended that the dependency be
3840 conditional upon ``pam`` being in ``DISTRO_FEATURES``.
3841
3842- For EFI-based machines, the bootloader (``grub-efi`` by default) is
3843 installed into the image at /boot. Wic can be used to split the
3844 bootloader into separate boot and rootfs partitions if necessary.
3845
3846- Patches whose context does not match exactly (i.e. where patch
3847 reports "fuzz" when applying) will generate a warning. For an example
3848 of this see `this
3849 commit <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57>`__.
3850
3851- Layers are expected to set ``LAYERSERIES_COMPAT_layername`` to match
3852 the version(s) of OpenEmbedded-Core they are compatible with. This is
3853 specified as codenames using spaces to separate multiple values (e.g.
3854 "rocko sumo"). If a layer does not set
3855 ``LAYERSERIES_COMPAT_layername``, a warning will is shown. If a layer
3856 sets a value that does not include the current version ("sumo" for
3857 the 2.5 release), then an error will be produced.
3858
3859- The ``TZ`` environment variable is set to "UTC" within the build
3860 environment in order to fix reproducibility problems in some recipes.
3861
3862Moving to the Yocto Project 2.6 Release
3863=======================================
3864
3865This section provides migration information for moving to the Yocto
3866Project 2.6 Release from the prior release.
3867
3868.. _migration-2.6-gcc-changes:
3869
3870GCC 8.2 is Now Used by Default
3871------------------------------
3872
3873The GNU Compiler Collection version 8.2 is now used by default for
3874compilation. For more information on what has changed in the GCC 8.x
3875release, see ` <https://gcc.gnu.org/gcc-8/changes.html>`__.
3876
3877If you still need to compile with version 7.x, GCC 7.3 is also provided.
3878You can select this version by setting the and can be selected by
3879setting the ```GCCVERSION`` <#var-GCCVERSION>`__ variable to "7.%" in
3880your configuration.
3881
3882.. _migration-2.6-removed-recipes:
3883
3884Removed Recipes
3885---------------
3886
3887The following recipes have been removed: *``beecrypt``:* No longer
3888needed since moving to RPM 4. *``bigreqsproto``:* Replaced by
3889``xorgproto``. *``calibrateproto``:* Removed in favor of ``xinput``.
3890*``compositeproto``:* Replaced by ``xorgproto``. *``damageproto``:*
3891Replaced by ``xorgproto``. *``dmxproto``:* Replaced by ``xorgproto``.
3892*``dri2proto``:* Replaced by ``xorgproto``. *``dri3proto``:* Replaced by
3893``xorgproto``. *``eee-acpi-scripts``:* Became obsolete.
3894*``fixesproto``:* Replaced by ``xorgproto``. *``fontsproto``:* Replaced
3895by ``xorgproto``. *``fstests``:* Became obsolete. *``gccmakedep``:* No
3896longer used. *``glproto``:* Replaced by ``xorgproto``.
3897*``gnome-desktop3``:* No longer needed. This recipe has moved to
3898``meta-oe``. *``icon-naming-utils``:* No longer used since the Sato
3899theme was removed in 2016. *``inputproto``:* Replaced by ``xorgproto``.
3900*``kbproto``:* Replaced by ``xorgproto``. *``libusb-compat``:* Became
3901obsolete. *``libuser``:* Became obsolete. *``libnfsidmap``:* No longer
3902an external requirement since ``nfs-utils`` 2.2.1. ``libnfsidmap`` is
3903now integrated. *``libxcalibrate``:* No longer needed with ``xinput``
3904*``mktemp``:* Became obsolete. The ``mktemp`` command is provided by
3905both ``busybox`` and ``coreutils``. *``ossp-uuid``:* Is not being
3906maintained and has mostly been replaced by ``uuid.h`` in ``util-linux``.
3907*``pax-utils``:* No longer needed. Previous QA tests that did use this
3908recipe are now done at build time. *``pcmciautils``:* Became obsolete.
3909*``pixz``:* No longer needed. ``xz`` now supports multi-threaded
3910compression. *``presentproto``:* Replaced by ``xorgproto``.
3911*``randrproto``:* Replaced by ``xorgproto``. *``recordproto``:* Replaced
3912by ``xorgproto``. *``renderproto``:* Replaced by ``xorgproto``.
3913*``resourceproto``:* Replaced by ``xorgproto``. *``scrnsaverproto``:*
3914Replaced by ``xorgproto``. *``trace-cmd``:* Became obsolete. ``perf``
3915replaced this recipe's functionally. *``videoproto``:* Replaced by
3916``xorgproto``. *``wireless-tools``:* Became obsolete. Superseded by
3917``iw``. *``xcmiscproto``:* Replaced by ``xorgproto``. *``xextproto``:*
3918Replaced by ``xorgproto``. *``xf86dgaproto``:* Replaced by
3919``xorgproto``. *``xf86driproto``:* Replaced by ``xorgproto``.
3920*``xf86miscproto``:* Replaced by ``xorgproto``. *``xf86-video-omapfb``:*
3921Became obsolete. Use kernel modesetting driver instead.
3922*``xf86-video-omap``:* Became obsolete. Use kernel modesetting driver
3923instead. *``xf86vidmodeproto``:* Replaced by ``xorgproto``.
3924*``xineramaproto``:* Replaced by ``xorgproto``. *``xproto``:* Replaced
3925by ``xorgproto``. *``yasm``:* No longer needed since previous usages are
3926now satisfied by ``nasm``.
3927
3928.. _migration-2.6-packaging-changes:
3929
3930Packaging Changes
3931-----------------
3932
3933The following packaging changes have been made:
3934
3935- *``cmake``:* ``cmake.m4`` and ``toolchain`` files have been moved to
3936 the main package.
3937
3938- *``iptables``:* The ``iptables`` modules have been split into
3939 separate packages.
3940
3941- *``alsa-lib``:* ``libasound`` is now in the main ``alsa-lib`` package
3942 instead of ``libasound``.
3943
3944- *``glibc``:* ``libnss-db`` is now in its own package along with a
3945 ``/var/db/makedbs.sh`` script to update databases.
3946
3947- *``python`` and ``python3``:* The main package has been removed from
3948 the recipe. You must install specific packages or ``python-modules``
3949 / ``python3-modules`` for everything.
3950
3951- *``systemtap``:* Moved ``systemtap-exporter`` into its own package.
3952
3953.. _migration-2.6-xorg-protocol-dependencies:
3954
3955XOrg Protocol dependencies
3956--------------------------
3957
3958The "*proto" upstream repositories have been combined into one
3959"xorgproto" repository. Thus, the corresponding recipes have also been
3960combined into a single ``xorgproto`` recipe. Any recipes that depend
3961upon the older ``*proto`` recipes need to be changed to depend on the
3962newer ``xorgproto`` recipe instead.
3963
3964For names of recipes removed because of this repository change, see the
3965`Removed Recipes <#migration-2.6-removed-recipes>`__ section.
3966
3967.. _migration-2.6-distutils-distutils3-fetching-dependencies:
3968
3969``distutils`` and ``distutils3`` Now Prevent Fetching Dependencies During the ``do_configure`` Task
3970---------------------------------------------------------------------------------------------------
3971
3972Previously, it was possible for Python recipes that inherited the
3973```distutils`` <#ref-classes-distutils>`__ and
3974```distutils3`` <#ref-classes-distutils3>`__ classes to fetch code
3975during the ```do_configure`` <#ref-tasks-configure>`__ task to satisfy
3976dependencies mentioned in ``setup.py`` if those dependencies were not
3977provided in the sysroot (i.e. recipes providing the dependencies were
3978missing from ```DEPENDS`` <#var-DEPENDS>`__).
3979
3980.. note::
3981
3982 This change affects classes beyond just the two mentioned (i.e.
3983 distutils
3984 and
3985 distutils3
3986 ). Any recipe that inherits
3987 distutils\*
3988 classes are affected. For example, the
3989 setuptools
3990 and
3991 setuptools3
3992 recipes are affected since they inherit the
3993 distutils\*
3994 classes.
3995
3996Fetching these types of dependencies that are not provided in the
3997sysroot negatively affects the ability to reproduce builds. This type of
3998fetching is now explicitly disabled. Consequently, any missing
3999dependencies in Python recipes that use these classes now result in an
4000error during the ``do_configure`` task.
4001
4002.. _migration-2.6-linux-yocto-configuration-audit-issues-now-correctly-reported:
4003
4004``linux-yocto`` Configuration Audit Issues Now Correctly Reported
4005-----------------------------------------------------------------
4006
4007Due to a bug, the kernel configuration audit functionality was not
4008writing out any resulting warnings during the build. This issue is now
4009corrected. You might notice these warnings now if you have a custom
4010kernel configuration with a ``linux-yocto`` style kernel recipe.
4011
4012.. _migration-2.6-image-kernel-artifact-naming-changes:
4013
4014Image/Kernel Artifact Naming Changes
4015------------------------------------
4016
4017The following changes have been made:
4018
4019- Name variables (e.g. ```IMAGE_NAME`` <#var-IMAGE_NAME>`__) use a new
4020 ``IMAGE_VERSION_SUFFIX`` variable instead of
4021 ```DATETIME`` <#var-DATETIME>`__. Using ``IMAGE_VERSION_SUFFIX``
4022 allows easier and more direct changes.
4023
4024 The ``IMAGE_VERSION_SUFFIX`` variable is set in the ``bitbake.conf``
4025 configuration file as follows: IMAGE_VERSION_SUFFIX = "-${DATETIME}"
4026
4027- Several variables have changed names for consistency: Old Variable
4028 Name New Variable Name
4029 ========================================================
4030 KERNEL_IMAGE_BASE_NAME `KERNEL_IMAGE_NAME <#var-KERNEL_IMAGE_NAME>`__
4031 KERNEL_IMAGE_SYMLINK_NAME
4032 `KERNEL_IMAGE_LINK_NAME <#var-KERNEL_IMAGE_LINK_NAME>`__
4033 MODULE_TARBALL_BASE_NAME
4034 `MODULE_TARBALL_NAME <#var-MODULE_TARBALL_NAME>`__
4035 MODULE_TARBALL_SYMLINK_NAME
4036 `MODULE_TARBALL_LINK_NAME <#var-MODULE_TARBALL_LINK_NAME>`__
4037 INITRAMFS_BASE_NAME `INITRAMFS_NAME <#var-INITRAMFS_NAME>`__
4038
4039- The ``MODULE_IMAGE_BASE_NAME`` variable has been removed. The module
4040 tarball name is now controlled directly with the
4041 ```MODULE_TARBALL_NAME`` <#var-MODULE_TARBALL_NAME>`__ variable.
4042
4043- The ```KERNEL_DTB_NAME`` <#var-KERNEL_DTB_NAME>`__ and
4044 ```KERNEL_DTB_LINK_NAME`` <#var-KERNEL_DTB_LINK_NAME>`__ variables
4045 have been introduced to control kernel Device Tree Binary (DTB)
4046 artifact names instead of mangling ``KERNEL_IMAGE_*`` variables.
4047
4048- The ```KERNEL_FIT_NAME`` <#var-KERNEL_FIT_NAME>`__ and
4049 ```KERNEL_FIT_LINK_NAME`` <#var-KERNEL_FIT_LINK_NAME>`__ variables
4050 have been introduced to specify the name of flattened image tree
4051 (FIT) kernel images similar to other deployed artifacts.
4052
4053- The ```MODULE_TARBALL_NAME`` <#var-MODULE_TARBALL_NAME>`__ and
4054 ```MODULE_TARBALL_LINK_NAME`` <#var-MODULE_TARBALL_LINK_NAME>`__
4055 variable values no longer include the "module-" prefix or ".tgz"
4056 suffix. These parts are now hardcoded so that the values are
4057 consistent with other artifact naming variables.
4058
4059- Added the ```INITRAMFS_LINK_NAME`` <#var-INITRAMFS_LINK_NAME>`__
4060 variable so that the symlink can be controlled similarly to other
4061 artifact types.
4062
4063- ```INITRAMFS_NAME`` <#var-INITRAMFS_NAME>`__ now uses
4064 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" instead
4065 of "${PV}-${PR}-${MACHINE}-${DATETIME}", which makes it consistent
4066 with other variables.
4067
4068.. _migration-2.6-serial-console-deprecated:
4069
4070``SERIAL_CONSOLE`` Deprecated
4071-----------------------------
4072
4073The ```SERIAL_CONSOLE`` <#var-SERIAL_CONSOLE>`__ variable has been
4074functionally replaced by the
4075```SERIAL_CONSOLES`` <#var-SERIAL_CONSOLES>`__ variable for some time.
4076With the Yocto Project 2.6 release, ``SERIAL_CONSOLE`` has been
4077officially deprecated.
4078
4079``SERIAL_CONSOLE`` will continue to work as before for the 2.6 release.
4080However, for the sake of future compatibility, it is recommended that
4081you replace all instances of ``SERIAL_CONSOLE`` with
4082``SERIAL_CONSOLES``.
4083
4084.. note::
4085
4086 The only difference in usage is that
4087 SERIAL_CONSOLES
4088 expects entries to be separated using semicolons as compared to
4089 SERIAL_CONSOLE
4090 , which expects spaces.
4091
4092.. _migration-2.6-poky-sets-unknown-configure-option-to-qa-error:
4093
4094Configure Script Reports Unknown Options as Errors
4095--------------------------------------------------
4096
4097If the configure script reports an unknown option, this now triggers a
4098QA error instead of a warning. Any recipes that previously got away with
4099specifying such unknown options now need to be fixed.
4100
4101.. _migration-2.6-override-changes:
4102
4103Override Changes
4104----------------
4105
4106The following changes have occurred:
4107
4108- *The ``virtclass-native`` and ``virtclass-nativesdk`` Overrides Have
4109 Been Removed:* The ``virtclass-native`` and ``virtclass-nativesdk``
4110 overrides have been deprecated since 2012 in favor of
4111 ``class-native`` and ``class-nativesdk``, respectively. Both
4112 ``virtclass-native`` and ``virtclass-nativesdk`` are now dropped.
4113
4114 .. note::
4115
4116 The
4117 virtclass-multilib-
4118 overrides for multilib are still valid.
4119
4120- *The ``forcevariable`` Override Now Has a Higher Priority Than
4121 ``libc`` Overrides:* The ``forcevariable`` override is documented to
4122 be the highest priority override. However, due to a long-standing
4123 quirk of how ```OVERRIDES`` <#var-OVERRIDES>`__ is set, the ``libc``
4124 overrides (e.g. ``libc-glibc``, ``libc-musl``, and so forth)
4125 erroneously had a higher priority. This issue is now corrected.
4126
4127 It is likely this change will not cause any problems. However, it is
4128 possible with some unusual configurations that you might see a change
4129 in behavior if you were relying on the previous behavior. Be sure to
4130 check how you use ``forcevariable`` and ``libc-*`` overrides in your
4131 custom layers and configuration files to ensure they make sense.
4132
4133- *The ``build-${BUILD_OS}`` Override Has Been Removed:* The
4134 ``build-${BUILD_OS}``, which is typically ``build-linux``, override
4135 has been removed because building on a host operating system other
4136 than a recent version of Linux is neither supported nor recommended.
4137 Dropping the override avoids giving the impression that other host
4138 operating systems might be supported.
4139
4140- The "_remove" operator now preserves whitespace. Consequently, when
4141 specifying list items to remove, be aware that leading and trailing
4142 whitespace resulting from the removal is retained.
4143
4144 See the "`Removal (Override Style
4145 Syntax) <&YOCTO_DOCS_BB_URL;#removing-override-style-syntax>`__"
4146 section in the BitBake User Manual for a detailed example.
4147
4148.. _migration-2.6-systemd-configuration-now-split-out-to-system-conf:
4149
4150``systemd`` Configuration is Now Split Into ``systemd-conf``
4151------------------------------------------------------------
4152
4153The configuration for the ``systemd`` recipe has been moved into a
4154``system-conf`` recipe. Moving this configuration to a separate recipe
4155avoids the ``systemd`` recipe from becoming machine-specific for cases
4156where machine-specific configurations need to be applied (e.g. for
4157``qemu*`` machines).
4158
4159Currently, the new recipe packages the following files:
4160${sysconfdir}/machine-id ${sysconfdir}/systemd/coredump.conf
4161${sysconfdir}/systemd/journald.conf ${sysconfdir}/systemd/logind.conf
4162${sysconfdir}/systemd/system.conf ${sysconfdir}/systemd/user.conf If you
4163previously used bbappend files to append the ``systemd`` recipe to
4164change any of the listed files, you must do so for the ``systemd-conf``
4165recipe instead.
4166
4167.. _migration-2.6-automatic-testing-changes:
4168
4169Automatic Testing Changes
4170-------------------------
4171
4172This section provides information about automatic testing changes:
4173
4174- *``TEST_IMAGE`` Variable Removed:* Prior to this release, you set the
4175 ``TEST_IMAGE`` variable to "1" to enable automatic testing for
4176 successfully built images. The ``TEST_IMAGE`` variable no longer
4177 exists and has been replaced by the
4178 ```TESTIMAGE_AUTO`` <#var-TESTIMAGE_AUTO>`__ variable.
4179
4180- *Inheriting the ``testimage`` and ``testsdk`` Classes:* Best
4181 practices now dictate that you use the
4182 ```IMAGE_CLASSES`` <#var-IMAGE_CLASSES>`__ variable rather than the
4183 ```INHERIT`` <#var-INHERIT>`__ variable when you inherit the
4184 ```testimage`` <#ref-classes-testimage*>`__ and
4185 ```testsdk`` <#ref-classes-testsdk>`__ classes used for automatic
4186 testing.
4187
4188.. _migration-2.6-openssl-changes:
4189
4190OpenSSL Changes
4191---------------
4192
4193`OpenSSL <https://www.openssl.org/>`__ has been upgraded from 1.0 to
41941.1. By default, this upgrade could cause problems for recipes that have
4195both versions in their dependency chains. The problem is that both
4196versions cannot be installed together at build time.
4197
4198.. note::
4199
4200 It is possible to have both versions of the library at runtime.
4201
4202.. _migration-2.6-bitbake-changes:
4203
4204BitBake Changes
4205---------------
4206
4207The server logfile ``bitbake-cookerdaemon.log`` is now always placed in
4208the `Build Directory <#build-directory>`__ instead of the current
4209directory.
4210
4211.. _migration-2.6-security-changes:
4212
4213Security Changes
4214----------------
4215
4216The Poky distribution now uses security compiler flags by default.
4217Inclusion of these flags could cause new failures due to stricter
4218checking for various potential security issues in code.
4219
4220.. _migration-2.6-post-installation-changes:
4221
4222Post Installation Changes
4223-------------------------
4224
4225You must explicitly mark post installs to defer to the target. If you
4226want to explicitly defer a postinstall to first boot on the target
4227rather than at rootfs creation time, use ``pkg_postinst_ontarget()`` or
4228call ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
4229Any failure of a ``pkg_postinst()`` script (including exit 1) triggers
4230an error during the ```do_rootfs`` <#ref-tasks-rootfs>`__ task.
4231
4232For more information on post-installation behavior, see the
4233"`Post-Installation
4234Scripts <&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts>`__"
4235section in the Yocto Project Development Tasks Manual.
4236
4237.. _migration-2.6-python-3-profile-guided-optimizations:
4238
4239Python 3 Profile-Guided Optimization
4240------------------------------------
4241
4242The ``python3`` recipe now enables profile-guided optimization. Using
4243this optimization requires a little extra build time in exchange for
4244improved performance on the target at runtime. Additionally, the
4245optimization is only enabled if the current
4246```MACHINE`` <#var-MACHINE>`__ has support for user-mode emulation in
4247QEMU (i.e. "qemu-usermode" is in
4248```MACHINE_FEATURES`` <#var-MACHINE_FEATURES>`__, which it is by
4249default).
4250
4251If you wish to disable Python profile-guided optimization regardless of
4252the value of ``MACHINE_FEATURES``, then ensure that
4253```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ for the ``python3`` recipe
4254does not contain "pgo". You could accomplish the latter using the
4255following at the configuration level: PACKAGECONFIG_remove_pn-python3 =
4256"pgo" Alternatively, you can set ``PACKAGECONFIG`` using an append file
4257for the ``python3`` recipe.
4258
4259.. _migration-2.6-miscellaneous-changes:
4260
4261Miscellaneous Changes
4262---------------------
4263
4264The following miscellaneous changes occurred:
4265
4266- Default to using the Thumb-2 instruction set for armv7a and above. If
4267 you have any custom recipes that build software that needs to be
4268 built with the ARM instruction set, change the recipe to set the
4269 instruction set as follows: ARM_INSTRUCTION_SET = "arm"
4270
4271- ``run-postinsts`` no longer uses ``/etc/*-postinsts`` for
4272 ``dpkg/opkg`` in favor of built-in postinst support. RPM behavior
4273 remains unchanged.
4274
4275- The ``NOISO`` and ``NOHDD`` variables are no longer used. You now
4276 control building ``*.iso`` and ``*.hddimg`` image types directly by
4277 using the ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable.
4278
4279- The ``scripts/contrib/mkefidisk.sh`` has been removed in favor of
4280 Wic.
4281
4282- ``kernel-modules`` has been removed from
4283 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ for ``qemumips`` and
4284 ``qemumips64`` machines. Removal also impacts the ``x86-base.inc``
4285 file.
4286
4287 .. note::
4288
4289 genericx86
4290 and
4291 genericx86-64
4292 retain
4293 kernel-modules
4294 as part of the
4295 RRECOMMENDS
4296 variable setting.
4297
4298- The ``LGPLv2_WHITELIST_GPL-3.0`` variable has been removed. If you
4299 are setting this variable in your configuration, set or append it to
4300 the ``WHITELIST_GPL-3.0`` variable instead.
4301
4302- ``${ASNEEDED}`` is now included in the
4303 ```TARGET_LDFLAGS`` <#var-TARGET_LDFLAGS>`__ variable directly. The
4304 remaining definitions from ``meta/conf/distro/include/as-needed.inc``
4305 have been moved to corresponding recipes.
4306
4307- Support for DSA host keys has been dropped from the OpenSSH recipes.
4308 If you are still using DSA keys, you must switch over to a more
4309 secure algorithm as recommended by OpenSSH upstream.
4310
4311- The ``dhcp`` recipe now uses the ``dhcpd6.conf`` configuration file
4312 in ``dhcpd6.service`` for IPv6 DHCP rather than re-using
4313 ``dhcpd.conf``, which is now reserved for IPv4.
4314
4315Moving to the Yocto Project 2.7 Release
4316=======================================
4317
4318This section provides migration information for moving to the Yocto
4319Project 2.7 Release from the prior release.
4320
4321.. _migration-2.7-bitbake-changes:
4322
4323BitBake Changes
4324---------------
4325
4326The following changes have been made to BitBake:
4327
4328- BitBake now checks anonymous Python functions and pure Python
4329 functions (e.g. ``def funcname:``) in the metadata for tab
4330 indentation. If found, BitBake produces a warning.
4331
4332- Bitbake now checks
4333 ```BBFILE_COLLECTIONS`` <#var-BBFILE_COLLECTIONS>`__ for duplicate
4334 entries and triggers an error if any are found.
4335
4336.. _migration-2.7-eclipse-support-dropped:
4337
4338Eclipse Support Removed
4339-----------------------
4340
4341Support for the Eclipse IDE has been removed. Support continues for
4342those releases prior to 2.7 that did include support. The 2.7 release
4343does not include the Eclipse Yocto plugin.
4344
4345.. _migration-2.7-qemu-native-splits-system-and-user-mode-parts:
4346
4347``qemu-native`` Splits the System and User-Mode Parts
4348-----------------------------------------------------
4349
4350The system and user-mode parts of ``qemu-native`` are now split.
4351``qemu-native`` provides the user-mode components and
4352``qemu-system-native`` provides the system components. If you have
4353recipes that depend on QEMU's system emulation functionality at build
4354time, they should now depend upon ``qemu-system-native`` instead of
4355``qemu-native``.
4356
4357.. _migration-2.7-upstream-tracking.inc-removed:
4358
4359The ``upstream-tracking.inc`` File Has Been Removed
4360---------------------------------------------------
4361
4362The previously deprecated ``upstream-tracking.inc`` file is now removed.
4363Any ``UPSTREAM_TRACKING*`` variables are now set in the corresponding
4364recipes instead.
4365
4366Remove any references you have to the ``upstream-tracking.inc`` file in
4367your configuration.
4368
4369.. _migration-2.7-distro-features-libc-removed:
4370
4371The ``DISTRO_FEATURES_LIBC`` Variable Has Been Removed
4372------------------------------------------------------
4373
4374The ``DISTRO_FEATURES_LIBC`` variable is no longer used. The ability to
4375configure glibc using kconfig has been removed for quite some time
4376making the ``libc-*`` features set no longer effective.
4377
4378Remove any references you have to ``DISTRO_FEATURES_LIBC`` in your own
4379layers.
4380
4381.. _migration-2.7-license-values:
4382
4383License Value Corrections
4384-------------------------
4385
4386The following corrections have been made to the
4387```LICENSE`` <#var-LICENSE>`__ values set by recipes: *socat*: Corrected
4388``LICENSE`` to be "GPLv2" rather than "GPLv2+". *libgfortran*: Set
4389license to "GPL-3.0-with-GCC-exception". *elfutils*: Removed
4390"Elfutils-Exception" and set to "GPLv2" for shared libraries
4391
4392.. _migration-2.7-packaging-changes:
4393
4394Packaging Changes
4395-----------------
4396
4397This section provides information about packaging changes.
4398
4399- ``bind``: The ``nsupdate`` binary has been moved to the
4400 ``bind-utils`` package.
4401
4402- Debug split: The default debug split has been changed to create
4403 separate source packages (i.e. package_name\ ``-dbg`` and
4404 package_name\ ``-src``). If you are currently using ``dbg-pkgs`` in
4405 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ to bring in debug
4406 symbols and you still need the sources, you must now also add
4407 ``src-pkgs`` to ``IMAGE_FEATURES``. Source packages remain in the
4408 target portion of the SDK by default, unless you have set your own
4409 value for ```SDKIMAGE_FEATURES`` <#var-SDKIMAGE_FEATURES>`__ that
4410 does not include ``src-pkgs``.
4411
4412- Mount all using ``util-linux``: ``/etc/default/mountall`` has moved
4413 into the -mount sub-package.
4414
4415- Splitting binaries using ``util-linux``: ``util-linux`` now splits
4416 each binary into its own package for fine-grained control. The main
4417 ``util-linux`` package pulls in the individual binary packages using
4418 the ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ and
4419 ```RDEPENDS`` <#var-RDEPENDS>`__ variables. As a result, existing
4420 images should not see any changes assuming
4421 ```NO_RECOMMENDATIONS`` <#var-NO_RECOMMENDATIONS>`__ is not set.
4422
4423- ``netbase/base-files``: ``/etc/hosts`` has moved from ``netbase`` to
4424 ``base-files``.
4425
4426- ``tzdata``: The main package has been converted to an empty meta
4427 package that pulls in all ``tzdata`` packages by default.
4428
4429- ``lrzsz``: This package has been removed from
4430 ``packagegroup-self-hosted`` and
4431 ``packagegroup-core-tools-testapps``. The X/Y/ZModem support is less
4432 likely to be needed on modern systems. If you are relying on these
4433 packagegroups to include the ``lrzsz`` package in your image, you now
4434 need to explicitly add the package.
4435
4436.. _migration-2.7-removed-recipes:
4437
4438Removed Recipes
4439---------------
4440
4441The following recipes have been removed: *gcc*: Drop version 7.3
4442recipes. Version 8.3 now remains. *linux-yocto*: Drop versions 4.14 and
44434.18 recipes. Versions 4.19 and 5.0 remain. *go*: Drop version 1.9
4444recipes. Versions 1.11 and 1.12 remain. *xvideo-tests*: Became obsolete.
4445*libart-lgpl*: Became obsolete. *gtk-icon-utils-native*: These tools are
4446now provided by gtk+3-native *gcc-cross-initial*: No longer needed.
4447gcc-cross/gcc-crosssdk is now used instead. *gcc-crosssdk-initial*: No
4448longer needed. gcc-cross/gcc-crosssdk is now used instead.
4449*glibc-initial*: Removed because the benefits of having it for
4450site_config are currently outweighed by the cost of building the recipe.
4451
4452.. _migration-2.7-removed-classes:
4453
4454Removed Classes
4455---------------
4456
4457The following classes have been removed: *distutils-tools*: This class
4458was never used. *bugzilla.bbclass*: Became obsolete. *distrodata*: This
4459functionally has been replaced by a more modern tinfoil-based
4460implementation.
4461
4462.. _migration-2.7-miscellaneous-changes:
4463
4464Miscellaneous Changes
4465---------------------
4466
4467The following miscellaneous changes occurred:
4468
4469- The ``distro`` subdirectory of the Poky repository has been removed
4470 from the top-level ``scripts`` directory.
4471
4472- Perl now builds for the target using
4473 ```perl-cross`` <http://arsv.github.io/perl-cross/>`__ for better
4474 maintainability and improved build performance. This change should
4475 not present any problems unless you have heavily customized your Perl
4476 recipe.
4477
4478- ``arm-tunes``: Removed the "-march" option if mcpu is already added.
4479
4480- ``update-alternatives``: Convert file renames to
4481 ```PACKAGE_PREPROCESS_FUNCS`` <#var-PACKAGE_PREPROCESS_FUNCS>`__
4482
4483- ``base/pixbufcache``: Obsolete ``sstatecompletions`` code has been
4484 removed.
4485
4486- ```native`` <#ref-classes-native>`__ class:
4487 ```RDEPENDS`` <#var-RDEPENDS>`__ handling has been enabled.
4488
4489- ``inetutils``: This recipe has rsh disabled.
4490
4491Moving to the Yocto Project 3.0 Release
4492=======================================
4493
4494This section provides migration information for moving to the Yocto
4495Project 3.0 Release from the prior release.
4496
4497.. _migration-3.0-init-system-selection:
4498
4499Init System Selection
4500---------------------
4501
4502Changing the init system manager previously required setting a number of
4503different variables. You can now change the manager by setting the
4504``INIT_MANAGER`` variable and the corresponding include files (i.e.
4505``conf/distro/include/init-manager-*.conf``). Include files are provided
4506for four values: "none", "sysvinit", "systemd", and "mdev-busybox". The
4507default value, "none", for ``INIT_MANAGER`` should allow your current
4508settings to continue working. However, it is advisable to explicitly set
4509``INIT_MANAGER``.
4510
4511.. _migration-3.0-lsb-support-removed:
4512
4513LSB Support Removed
4514-------------------
4515
4516Linux Standard Base (LSB) as a standard is not current, and is not well
4517suited for embedded applications. Support can be continued in a separate
4518layer if needed. However, presently LSB support has been removed from
4519the core.
4520
4521As a result of this change, the ``poky-lsb`` derivative distribution
4522configuration that was also used for testing alternative configurations
4523has been replaced with a ``poky-altcfg`` distribution that has LSB parts
4524removed.
4525
4526.. _migration-3.0-removed-recipes:
4527
4528Removed Recipes
4529---------------
4530
4531The following recipes have been removed.
4532
4533- ``core-image-lsb-dev``: Part of removed LSB support.
4534
4535- ``core-image-lsb``: Part of removed LSB support.
4536
4537- ``core-image-lsb-sdk``: Part of removed LSB support.
4538
4539- ``cve-check-tool``: Functionally replaced by the ``cve-update-db``
4540 recipe and ``cve-check`` class.
4541
4542- ``eglinfo``: No longer maintained. ``eglinfo`` from ``mesa-demos`` is
4543 an adequate and maintained alternative.
4544
4545- ``gcc-8.3``: Version 8.3 removed. Replaced by 9.2.
4546
4547- ``gnome-themes-standard``: Only needed by gtk+ 2.x, which has been
4548 removed.
4549
4550- ``gtk+``: GTK+ 2 is obsolete and has been replaced by gtk+3.
4551
4552- ``irda-utils``: Has become obsolete. IrDA support has been removed
4553 from the Linux kernel in version 4.17 and later.
4554
4555- ``libnewt-python``: ``libnewt`` Python support merged into main
4556 ``libnewt`` recipe.
4557
4558- ``libsdl``: Replaced by newer ``libsdl2``.
4559
4560- ``libx11-diet``: Became obsolete.
4561
4562- ``libxx86dga``: Removed obsolete client library.
4563
4564- ``libxx86misc``: Removed. Library is redundant.
4565
4566- ``linux-yocto``: Version 5.0 removed, which is now redundant (5.2 /
4567 4.19 present).
4568
4569- ``lsbinitscripts``: Part of removed LSB support.
4570
4571- ``lsb``: Part of removed LSB support.
4572
4573- ``lsbtest``: Part of removed LSB support.
4574
4575- ``openssl10``: Replaced by newer ``openssl`` version 1.1.
4576
4577- ``packagegroup-core-lsb``: Part of removed LSB support.
4578
4579- ``python-nose``: Removed the Python 2.x version of the recipe.
4580
4581- ``python-numpy``: Removed the Python 2.x version of the recipe.
4582
4583- ``python-scons``: Removed the Python 2.x version of the recipe.
4584
4585- ``source-highlight``: No longer needed.
4586
4587- ``stress``: Replaced by ``stress-ng``.
4588
4589- ``vulkan``: Split into ``vulkan-loader``, ``vulkan-headers``, and
4590 ``vulkan-tools``.
4591
4592- ``weston-conf``: Functionality moved to ``weston-init``.
4593
4594.. _migration-3.0-packaging-changes:
4595
4596Packaging Changes
4597-----------------
4598
4599The following packaging changes have occurred.
4600
4601- The `Epiphany <https://en.wikipedia.org/wiki/GNOME_Web>`__ browser
4602 has been dropped from ``packagegroup-self-hosted`` as it has not been
4603 needed inside ``build-appliance-image`` for quite some time and was
4604 causing resource problems.
4605
4606- ``libcap-ng`` Python support has been moved to a separate
4607 ``libcap-ng-python`` recipe to streamline the build process when the
4608 Python bindings are not needed.
4609
4610- ``libdrm`` now packages the file ``amdgpu.ids`` into a separate
4611 ``libdrm-amdgpu`` package.
4612
4613- ``python3``: The ``runpy`` module is now in the ``python3-core``
4614 package as it is required to support the common "python3 -m" command
4615 usage.
4616
4617- ``distcc`` now provides separate ``distcc-client`` and
4618 ``distcc-server`` packages as typically one or the other are needed,
4619 rather than both.
4620
4621- ``python*-setuptools`` recipes now separately package the
4622 ``pkg_resources`` module in a ``python-pkg-resources`` /
4623 ``python3-pkg-resources`` package as the module is useful independent
4624 of the rest of the setuptools package. The main ``python-setuptools``
4625 / ``python3-setuptools`` package depends on this new package so you
4626 should only need to update dependencies unless you want to take
4627 advantage of the increased granularity.
4628
4629.. _migration-3.0-cve-checking:
4630
4631CVE Checking
4632------------
4633
4634``cve-check-tool`` has been functionally replaced by a new
4635``cve-update-db`` recipe and functionality built into the ``cve-check``
4636class. The result uses NVD JSON data feeds rather than the deprecated
4637XML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
4638and makes other improvements.
4639
4640Additionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
4641by ``CVE_CHECK_WHITELIST``.
4642
4643.. _migration-3.0-bitbake-changes:
4644
4645Bitbake Changes
4646---------------
4647
4648The following BitBake changes have occurred.
4649
4650- ``addtask`` statements now properly validate dependent tasks.
4651 Previously, an invalid task was silently ignored. With this change,
4652 the invalid task generates a warning.
4653
4654- Other invalid ``addtask`` and ``deltask`` usages now trigger these
4655 warnings: "multiple target tasks arguments with addtask / deltask",
4656 and "multiple before/after clauses".
4657
4658- The "multiconfig" prefix is now shortened to "mc". "multiconfig" will
4659 continue to work, however it may be removed in a future release.
4660
4661- The ``bitbake -g`` command no longer generates a
4662 ``recipe-depends.dot`` file as the contents (i.e. a reprocessed
4663 version of ``task-depends.dot``) were confusing.
4664
4665- The ``bb.build.FuncFailed`` exception, previously raised by
4666 ``bb.build.exec_func()`` when certain other exceptions have occurred,
4667 has been removed. The real underlying exceptions will be raised
4668 instead. If you have calls to ``bb.build.exec_func()`` in custom
4669 classes or ``tinfoil-using`` scripts, any references to
4670 ``bb.build.FuncFailed`` should be cleaned up.
4671
4672- Additionally, the ``bb.build.exec_func()`` no longer accepts the
4673 "pythonexception" parameter. The function now always raises
4674 exceptions. Remove this argument in any calls to
4675 ``bb.build.exec_func()`` in custom classes or scripts.
4676
4677- The
4678 ```BB_SETSCENE_VERIFY_FUNCTION2`` <&YOCTO_DOCS_BB_URL;#var-bb-BB_SETSCENE_VERIFY_FUNCTION2>`__
4679 is no longer used. In the unlikely event that you have any references
4680 to it, they should be removed.
4681
4682- The ``RunQueueExecuteScenequeue`` and ``RunQueueExecuteTasks`` events
4683 have been removed since setscene tasks are now executed as part of
4684 the normal runqueue. Any event handling code in custom classes or
4685 scripts that handles these two events need to be updated.
4686
4687- The arguments passed to functions used with
4688 ```BB_HASHCHECK_FUNCTION`` <&YOCTO_DOCS_BB_URL;#var-bb-BB_HASHCHECK_FUNCTION>`__
4689 have changed. If you are using your own custom hash check function,
4690 see
4691 ` <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725>`__
4692 for details.
4693
4694- Task specifications in ``BB_TASKDEPDATA`` and class implementations
4695 used in signature generator classes now use "<fn>:<task>" everywhere
4696 rather than the "." delimiter that was being used in some places.
4697 This change makes it consistent with all areas in the code. Custom
4698 signature generator classes and code that reads ``BB_TASKDEPDATA``
4699 need to be updated to use ':' as a separator rather than '.'.
4700
4701.. _migration-3.0-sanity-checks:
4702
4703Sanity Checks
4704-------------
4705
4706The following sanity check changes occurred.
4707
4708- ```SRC_URI`` <#var-SRC_URI>`__ is now checked for usage of two
4709 problematic items:
4710
4711 - "${PN}" prefix/suffix use - Warnings always appear if ${PN} is
4712 used. You must fix the issue regardless of whether multiconfig or
4713 anything else that would cause prefixing/suffixing to happen.
4714
4715 - Github archive tarballs - these are not guaranteed to be stable.
4716 Consequently, it is likely that the tarballs will be refreshed and
4717 thus the SRC_URI checksums will fail to apply. It is recommended
4718 that you fetch either an official release tarball or a specific
4719 revision from the actual Git repository instead.
4720
4721 Either one of these items now trigger a warning by default. If you
4722 wish to disable this check, remove ``src-uri-bad`` from
4723 ```WARN_QA`` <#var-WARN_QA>`__.
4724
4725- The ``file-rdeps`` runtime dependency check no longer expands
4726 ```RDEPENDS`` <#var-RDEPENDS>`__ recursively as there is no mechanism
4727 to ensure they can be fully computed, and thus races sometimes result
4728 in errors either showing up or not. Thus, you might now see errors
4729 for missing runtime dependencies that were previously satisfied
4730 recursively. Here is an example: package A contains a shell script
4731 starting with ``#!/bin/bash`` but has no dependency on bash. However,
4732 package A depends on package B, which does depend on bash. You need
4733 to add the missing dependency or dependencies to resolve the warning.
4734
4735- Setting ``DEPENDS_${PN}`` anywhere (i.e. typically in a recipe) now
4736 triggers an error. The error is triggered because
4737 ```DEPENDS`` <#var-DEPENDS>`__ is not a package-specific variable
4738 unlike RDEPENDS. You should set ``DEPENDS`` instead.
4739
4740- systemd currently does not work well with the musl C library because
4741 only upstream officially supports linking the library with glibc.
4742 Thus, a warning is shown when building systemd in conjunction with
4743 musl.
4744
4745.. _migration-3.0-miscellaneous-changes:
4746
4747Miscellaneous Changes
4748---------------------
4749
4750The following miscellaneous changes have occurred.
4751
4752- The ``gnome`` class has been removed because it now does very little.
4753 You should update recipes that previously inherited this class to do
4754 the following: inherit gnomebase gtk-icon-cache gconf mime
4755
4756- The ``meta/recipes-kernel/linux/linux-dtb.inc`` file has been
4757 removed. This file was previously deprecated in favor of setting
4758 ```KERNEL_DEVICETREE`` <#var-KERNEL_DEVICETREE>`__ in any kernel
4759 recipe and only produced a warning. Remove any ``include`` or
4760 ``require`` statements pointing to this file.
4761
4762- ```TARGET_CFLAGS`` <#var-TARGET_CFLAGS>`__,
4763 ```TARGET_CPPFLAGS`` <#var-TARGET_CPPFLAGS>`__,
4764 ```TARGET_CXXFLAGS`` <#var-TARGET_CXXFLAGS>`__, and
4765 ```TARGET_LDFLAGS`` <#var-TARGET_LDFLAGS>`__ are no longer exported
4766 to the external environment. This change did not require any changes
4767 to core recipes, which is a good indicator that no changes will be
4768 required. However, if for some reason the software being built by one
4769 of your recipes is expecting these variables to be set, then building
4770 the recipe will fail. In such cases, you must either export the
4771 variable or variables in the recipe or change the scripts so that
4772 exporting is not necessary.
4773
4774- You must change the host distro identifier used in
4775 ```NATIVELSBSTRING`` <#var-NATIVELSBSTRING>`__ to use all lowercase
4776 characters even if it does not contain a version number. This change
4777 is necessary only if you are not using ``uninative`` and
4778 ```SANITY_TESTED_DISTROS`` <#var-SANITY_TESTED_DISTROS>`__.
4779
4780- In the ``base-files`` recipe, writing the hostname into
4781 ``/etc/hosts`` and ``/etc/hostname`` is now done within the main
4782 ```do_install`` <#ref-tasks-install>`__ function rather than in the
4783 ``do_install_basefilesissue`` function. The reason for the change is
4784 because ``do_install_basefilesissue`` is more easily overridden
4785 without having to duplicate the hostname functionality. If you have
4786 done the latter (e.g. in a ``base-files`` bbappend), then you should
4787 remove it from your customized ``do_install_basefilesissue``
4788 function.
4789
4790- The ``wic --expand`` command now uses commas to separate "key:value"
4791 pairs rather than hyphens.
4792
4793 .. note::
4794
4795 The wic command-line help is not updated.
4796
4797 You must update any scripts or commands where you use
4798 ``wic --expand`` with multiple "key:value" pairs.
4799
4800- UEFI image variable settings have been moved from various places to a
4801 central ``conf/image-uefi.conf``. This change should not influence
4802 any existing configuration as the ``meta/conf/image-uefi.conf`` in
4803 the core metadata sets defaults that can be overridden in the same
4804 manner as before.
4805
4806- ``conf/distro/include/world-broken.inc`` has been removed. For cases
4807 where certain recipes need to be disabled when using the musl C
4808 library, these recipes now have ``COMPATIBLE_HOST_libc-musl`` set
4809 with a comment that explains why.
4810
4811Moving to the Yocto Project 3.1 Release
4812=======================================
4813
4814This section provides migration information for moving to the Yocto
4815Project 3.1 Release from the prior release.
4816
4817.. _migration-3.1-minimum-system-requirements:
4818
4819Minimum system requirements
4820---------------------------
4821
4822The following versions / requirements of build host components have been
4823updated:
4824
4825- gcc 5.0
4826
4827- python 3.5
4828
4829- tar 1.28
4830
4831- ``rpcgen`` is now required on the host (part of the ``libc-dev-bin``
4832 package on Ubuntu, Debian and related distributions, and the
4833 ``glibc`` package on RPM-based distributions).
4834
4835Additionally, the ``makeinfo`` and ``pod2man`` tools are *no longer*
4836required on the host.
4837
4838.. _migration-3.1-mpc8315e-rdb-removed:
4839
4840mpc8315e-rdb machine removed
4841----------------------------
4842
4843The MPC8315E-RDB machine is old/obsolete and unobtainable, thus given
4844the maintenance burden the ``mpc8315e-rdb`` machine configuration that
4845supported it has been removed in this release. The removal does leave a
4846gap in official PowerPC reference hardware support; this may change in
4847future if a suitable machine with accompanying support resources is
4848found.
4849
4850.. _migration-3.1-python-2-removed:
4851
4852Python 2 removed
4853----------------
4854
4855Due to the expiration of upstream support in January 2020, support for
4856Python 2 has now been removed; it is recommended that you use Python 3
4857instead. If absolutely needed there is a meta-python2 community layer
4858containing Python 2, related classes and various Python 2-based modules,
4859however it should not be considered as supported.
4860
4861.. _migration-3.1-reproducible-builds:
4862
4863Reproducible builds now enabled by default
4864------------------------------------------
4865
4866In order to avoid unnecessary differences in output files (aiding binary
4867reproducibility), the Poky distribution configuration
4868(``DISTRO = "poky"``) now inherits the ``reproducible_build`` class by
4869default.
4870
4871.. _migration-3.1-ptest-feature-impact:
4872
4873Impact of ptest feature is now more significant
4874-----------------------------------------------
4875
4876The Poky distribution configuration (``DISTRO = "poky"``) enables ptests
4877by default to enable runtime testing of various components. In this
4878release, a dependency needed to be added that has resulted in a
4879significant increase in the number of components that will be built just
4880when building a simple image such as core-image-minimal. If you do not
4881need runtime tests enabled for core components, then it is recommended
4882that you remove "ptest" from
4883```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ to save a significant
4884amount of build time e.g. by adding the following in your configuration:
4885DISTRO_FEATURES_remove = "ptest"
4886
4887.. _migration-3.1-removed-recipes:
4888
4889Removed recipes
4890---------------
4891
4892The following recipes have been removed:
4893
4894- ``chkconfig``: obsolete
4895
4896- ``console-tools``: obsolete
4897
4898- ``enchant``: replaced by ``enchant2``
4899
4900- ``foomatic-filters``: obsolete
4901
4902- ``libidn``: no longer needed, moved to meta-oe
4903
4904- ``libmodulemd``: replaced by ``libmodulemd-v1``
4905
4906- ``linux-yocto``: drop 4.19, 5.2 version recipes (5.4 now provided)
4907
4908- ``nspr``: no longer needed, moved to meta-oe
4909
4910- ``nss``: no longer needed, moved to meta-oe
4911
4912- ``python``: Python 2 removed (Python 3 preferred)
4913
4914- ``python-setuptools``: Python 2 version removed (python3-setuptools
4915 preferred)
4916
4917- ``sysprof``: no longer needed, moved to meta-oe
4918
4919- ``texi2html``: obsolete
4920
4921- ``u-boot-fw-utils``: functionally replaced by ``libubootenv``
4922
4923.. _migration-3.1-features-check:
4924
4925features_check class replaces distro_features_check
4926---------------------------------------------------
4927
4928The ``distro_features_check`` class has had its functionality expanded,
4929now supporting ``ANY_OF_MACHINE_FEATURES``,
4930``REQUIRED_MACHINE_FEATURES``, ``CONFLICT_MACHINE_FEATURES``,
4931``ANY_OF_COMBINED_FEATURES``, ``REQUIRED_COMBINED_FEATURES``,
4932``CONFLICT_COMBINED_FEATURES``. As a result the class has now been
4933renamed to ``features_check``; the ``distro_features_check`` class still
4934exists but generates a warning and redirects to the new class. In
4935preparation for a future removal of the old class it is recommended that
4936you update recipes currently inheriting ``distro_features_check`` to
4937inherit ``features_check`` instead.
4938
4939.. _migration-3.1-removed-classes:
4940
4941Removed classes
4942---------------
4943
4944The following classes have been removed:
4945
4946- ``distutils-base``: moved to meta-python2
4947
4948- ``distutils``: moved to meta-python2
4949
4950- ``libc-common``: merged into the glibc recipe as nothing else used
4951 it.
4952
4953- ``python-dir``: moved to meta-python2
4954
4955- ``pythonnative``: moved to meta-python2
4956
4957- ``setuptools``: moved to meta-python2
4958
4959- ``tinderclient``: dropped as it was obsolete.
4960
4961.. _migration-3.1-src-uri-checksums:
4962
4963SRC_URI checksum behaviour
4964--------------------------
4965
4966Previously, recipes by tradition included both SHA256 and MD5 checksums
4967for remotely fetched files in ```SRC_URI`` <#var-SRC_URI>`__, even
4968though only one is actually mandated. However, the MD5 checksum does not
4969add much given its inherent weakness; thus when a checksum fails only
4970the SHA256 sum will now be printed. The md5sum will still be verified if
4971it is specified.
4972
4973.. _migration-3.1-npm:
4974
4975npm fetcher changes
4976-------------------
4977
4978The npm fetcher has been completely reworked in this release. The npm
4979fetcher now only fetches the package source itself and no longer the
4980dependencies; there is now also an npmsw fetcher which explicitly
4981fetches the shrinkwrap file and the dependencies. This removes the
4982slightly awkward ``NPM_LOCKDOWN`` and ``NPM_SHRINKWRAP`` variables which
4983pointed to local files; the lockdown file is no longer needed at all.
4984Additionally, the package name in ``npm://`` entries in
4985```SRC_URI`` <#var-SRC_URI>`__ is now specified using a ``package``
4986parameter instead of the earlier ``name`` which overlapped with the
4987generic ``name`` parameter. All recipes using the npm fetcher will need
4988to be changed as a result.
4989
4990An example of the new scheme: SRC_URI =
4991"npm://registry.npmjs.org;package=array-flatten;version=1.1.1 \\
4992npmsw://${THISDIR}/npm-shrinkwrap.json" Another example where the
4993sources are fetched from git rather than an npm repository: SRC_URI =
4994"git://github.com/foo/bar.git;protocol=https \\
4995npmsw://${THISDIR}/npm-shrinkwrap.json"
4996
4997devtool and recipetool have also been updated to match with the npm
4998fetcher changes. Other than producing working and more complete recipes
4999for npm sources, there is also a minor change to the command line for
5000devtool: the ``--fetch-dev`` option has been renamed to ``--npm-dev`` as
5001it is npm-specific.
5002
5003.. _migration-3.1-packaging-changes:
5004
5005Packaging changes
5006-----------------
5007
5008- ``intltool`` has been removed from ``packagegroup-core-sdk`` as it is
5009 rarely needed to build modern software - gettext can do most of the
5010 things it used to be needed for. ``intltool`` has also been removed
5011 from ``packagegroup-core-self-hosted`` as it is not needed to for
5012 standard builds.
5013
5014- git: ``git-am``, ``git-difftool``, ``git-submodule``, and
5015 ``git-request-pull`` are no longer perl-based, so are now installed
5016 with the main ``git`` package instead of within ``git-perltools``.
5017
5018- The ``ldconfig`` binary built as part of glibc has now been moved to
5019 its own ``ldconfig`` package (note no ``glibc-`` prefix). This
5020 package is in the ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ of the main
5021 ``glibc`` package if ``ldconfig`` is present in
5022 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__.
5023
5024- ``libevent`` now splits each shared library into its own package (as
5025 Debian does). Since these are shared libraries and will be pulled in
5026 through the normal shared library dependency handling, there should
5027 be no impact to existing configurations other than less unnecessary
5028 libraries being installed in some cases.
5029
5030- linux-firmware now has a new package for ``bcm4366c`` and includes
5031 available NVRAM config files into the ``bcm43340``, ``bcm43362``,
5032 ``bcm43430`` and ``bcm4356-pcie`` packages.
5033
5034- ``harfbuzz`` now splits the new ``libharfbuzz-subset.so`` library
5035 into its own package to reduce the main package size in cases where
5036 ``libharfbuzz-subset.so`` is not needed.
5037
5038.. _migration-3.1-package-qa-warnings:
5039
5040Additional warnings
5041-------------------
5042
5043Warnings will now be shown at ``do_package_qa`` time in the following
5044circumstances:
5045
5046- A recipe installs ``.desktop`` files containing ``MimeType`` keys but
5047 does not inherit the new ``mime-xdg`` class
5048
5049- A recipe installs ``.xml`` files into ``${datadir}/mime/packages``
5050 but does not inherit the ``mime`` class
5051
5052.. _migration-3.1-x86-live-wic:
5053
5054``wic`` image type now used instead of ``live`` by default for x86
5055------------------------------------------------------------------
5056
5057``conf/machine/include/x86-base.inc`` (inherited by most x86 machine
5058configurations) now specifies ``wic`` instead of ``live`` by default in
5059```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__. The ``live`` image type will
5060likely be removed in a future release so it is recommended that you use
5061``wic`` instead.
5062
5063.. _migration-3.1-misc:
5064
5065Miscellaneous changes
5066---------------------
5067
5068- The undocumented ``SRC_DISTRIBUTE_LICENSES`` variable has now been
5069 removed in favour of a new ``AVAILABLE_LICENSES`` variable which is
5070 dynamically set based upon license files found in
5071 ``${COMMON_LICENSE_DIR}`` and ``${LICENSE_PATH}``.
5072
5073- The tune definition for big-endian microblaze machines is now
5074 ``microblaze`` instead of ``microblazeeb``.
5075
5076- ``newlib`` no longer has built-in syscalls. ``libgloss`` should then
5077 provide the syscalls, ``crt0.o`` and other functions that are no
5078 longer part of ``newlib`` itself. If you are using
5079 ``TCLIBC = "newlib"`` this now means that you must link applications
5080 with both ``newlib`` and ``libgloss``, whereas before ``newlib``
5081 would run in many configurations by itself.