migration-2.5.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. Moving to the Yocto Project 2.5 Release
  2. =======================================
  3. This section provides migration information for moving to the Yocto
  4. Project 2.5 Release from the prior release.
  5. .. _migration-2.5-packaging-changes:
  6. Packaging Changes
  7. -----------------
  8. This section provides information about packaging changes that have
  9. occurred:
  10. - ``bind-libs``: The libraries packaged by the bind recipe are in a
  11. separate ``bind-libs`` package.
  12. - ``libfm-gtk``: The ``libfm`` GTK+ bindings are split into a
  13. separate ``libfm-gtk`` package.
  14. - ``flex-libfl``: The flex recipe splits out libfl into a separate
  15. ``flex-libfl`` package to avoid too many dependencies being pulled in
  16. where only the library is needed.
  17. - ``grub-efi``: The ``grub-efi`` configuration is split into a
  18. separate ``grub-bootconf`` recipe. However, the dependency
  19. relationship from ``grub-efi`` is through a virtual/grub-bootconf
  20. provider making it possible to have your own recipe provide the
  21. dependency. Alternatively, you can use a BitBake append file to bring
  22. the configuration back into the ``grub-efi`` recipe.
  23. - *armv7a Legacy Package Feed Support:* Legacy support is removed for
  24. transitioning from ``armv7a`` to ``armv7a-vfp-neon`` in package
  25. feeds, which was previously enabled by setting
  26. ``PKGARCHCOMPAT_ARMV7A``. This transition occurred in 2011 and active
  27. package feeds should by now be updated to the new naming.
  28. .. _migration-2.5-removed-recipes:
  29. Removed Recipes
  30. ---------------
  31. The following recipes have been removed:
  32. - ``gcc``: The version 6.4 recipes are replaced by 7.x.
  33. - ``gst-player``: Renamed to ``gst-examples`` as per upstream.
  34. - ``hostap-utils``: This software package is obsolete.
  35. - ``latencytop``: This recipe is no longer maintained upstream. The
  36. last release was in 2009.
  37. - ``libpfm4``: The only file that requires this recipe is
  38. ``oprofile``, which has been removed.
  39. - ``linux-yocto``: The version 4.4, 4.9, and 4.10 recipes have been
  40. removed. Versions 4.12, 4.14, and 4.15 remain.
  41. - ``man``: This recipe has been replaced by modern ``man-db``
  42. - ``mkelfimage``: This tool has been removed in the upstream coreboot
  43. project, and is no longer needed with the removal of the ELF image
  44. type.
  45. - ``nativesdk-postinst-intercept``: This recipe is not maintained.
  46. - ``neon``: This software package is no longer maintained upstream
  47. and is no longer needed by anything in OpenEmbedded-Core.
  48. - ``oprofile``: The functionality of this recipe is replaced by
  49. ``perf`` and keeping compatibility on an ongoing basis with ``musl``
  50. is difficult.
  51. - ``pax``: This software package is obsolete.
  52. - ``stat``: This software package is not maintained upstream.
  53. ``coreutils`` provides a modern stat binary.
  54. - ``zisofs-tools-native``: This recipe is no longer needed because
  55. the compressed ISO image feature has been removed.
  56. .. _migration-2.5-scripts-and-tools-changes:
  57. Scripts and Tools Changes
  58. -------------------------
  59. The following are changes to scripts and tools:
  60. - ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer``: The
  61. ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer`` scripts
  62. previously shipped with poky but not in OpenEmbedded-Core have been
  63. removed. These scripts are not maintained and are outdated. In many
  64. cases, they are also limited in scope. The
  65. ``bitbake-layers create-layer`` command is a direct replacement for
  66. ``yocto-layer``. See the documentation to create a BSP or kernel
  67. recipe in the ":ref:`bsp-guide/bsp:bsp kernel recipe example`" section.
  68. - ``devtool finish``: ``devtool finish`` now exits with an error if
  69. there are uncommitted changes or a rebase/am in progress in the
  70. recipe's source repository. If this error occurs, there might be
  71. uncommitted changes that will not be included in updates to the
  72. patches applied by the recipe. A -f/--force option is provided for
  73. situations that the uncommitted changes are inconsequential and you
  74. want to proceed regardless.
  75. - ``scripts/oe-setup-rpmrepo`` script: The functionality of
  76. ``scripts/oe-setup-rpmrepo`` is replaced by
  77. ``bitbake package-index``.
  78. - ``scripts/test-dependencies.sh`` script: The script is largely made
  79. obsolete by the recipe-specific sysroots functionality introduced in
  80. the previous release.
  81. .. _migration-2.5-bitbake-changes:
  82. BitBake Changes
  83. ---------------
  84. The following are BitBake changes:
  85. - The ``--runall`` option has changed. There are two different
  86. behaviors people might want:
  87. - *Behavior A:* For a given target (or set of targets) look through
  88. the task graph and run task X only if it is present and will be
  89. built.
  90. - *Behavior B:* For a given target (or set of targets) look through
  91. the task graph and run task X if any recipe in the taskgraph has
  92. such a target, even if it is not in the original task graph.
  93. The ``--runall`` option now performs "Behavior B". Previously
  94. ``--runall`` behaved like "Behavior A". A ``--runonly`` option has
  95. been added to retain the ability to perform "Behavior A".
  96. - Several explicit "run this task for all recipes in the dependency
  97. tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``,
  98. and the ``*all`` tasks provided by the ``distrodata`` and
  99. ``archiver`` classes). There is a BitBake option to complete this for
  100. any arbitrary task. For example:
  101. ::
  102. bitbake <target> -c fetchall
  103. should now be replaced with:
  104. ::
  105. bitbake <target> --runall=fetch
  106. .. _migration-2.5-python-and-python3-changes:
  107. Python and Python 3 Changes
  108. ---------------------------
  109. The following are auto-packaging changes to Python and Python 3:
  110. The script-managed ``python-*-manifest.inc`` files that were previously
  111. used to generate Python and Python 3 packages have been replaced with a
  112. JSON-based file that is easier to read and maintain. A new task is
  113. available for maintainers of the Python recipes to update the JSON file
  114. when upgrading to new Python versions. You can now edit the file
  115. directly instead of having to edit a script and run it to update the
  116. file.
  117. One particular change to note is that the Python recipes no longer have
  118. build-time provides for their packages. This assumes ``python-foo`` is
  119. one of the packages provided by the Python recipe. You can no longer run
  120. ``bitbake python-foo`` or have a
  121. :term:`DEPENDS` on ``python-foo``,
  122. but doing either of the following causes the package to work as
  123. expected: ::
  124. IMAGE_INSTALL_append = " python-foo"
  125. or ::
  126. RDEPENDS_${PN} = "python-foo"
  127. The earlier build-time provides behavior was a quirk of the
  128. way the Python manifest file was created. For more information on this
  129. change please see :yocto_git:`this commit
  130. </poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce>`.
  131. .. _migration-2.5-miscellaneous-changes:
  132. Miscellaneous Changes
  133. ---------------------
  134. The following are additional changes:
  135. - The ``kernel`` class supports building packages for multiple kernels.
  136. If your kernel recipe or ``.bbappend`` file mentions packaging at
  137. all, you should replace references to the kernel in package names
  138. with ``${KERNEL_PACKAGE_NAME}``. For example, if you disable
  139. automatic installation of the kernel image using
  140. ``RDEPENDS_kernel-base = ""`` you can avoid warnings using
  141. ``RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""`` instead.
  142. - The ``buildhistory`` class commits changes to the repository by
  143. default so you no longer need to set ``BUILDHISTORY_COMMIT = "1"``.
  144. If you want to disable commits you need to set
  145. ``BUILDHISTORY_COMMIT = "0"`` in your configuration.
  146. - The ``beaglebone`` reference machine has been renamed to
  147. ``beaglebone-yocto``. The ``beaglebone-yocto`` BSP is a reference
  148. implementation using only mainline components available in
  149. OpenEmbedded-Core and ``meta-yocto-bsp``, whereas Texas Instruments
  150. maintains a full-featured BSP in the ``meta-ti`` layer. This rename
  151. avoids the previous name clash that existed between the two BSPs.
  152. - The ``update-alternatives`` class no longer works with SysV ``init``
  153. scripts because this usage has been problematic. Also, the
  154. ``sysklogd`` recipe no longer uses ``update-alternatives`` because it
  155. is incompatible with other implementations.
  156. - By default, the :ref:`cmake <ref-classes-cmake>` class uses
  157. ``ninja`` instead of ``make`` for building. This improves build
  158. performance. If a recipe is broken with ``ninja``, then the recipe
  159. can set ``OECMAKE_GENERATOR = "Unix Makefiles"`` to change back to
  160. ``make``.
  161. - The previously deprecated ``base_*`` functions have been removed in
  162. favor of their replacements in ``meta/lib/oe`` and
  163. ``bitbake/lib/bb``. These are typically used from recipes and
  164. classes. Any references to the old functions must be updated. The
  165. following table shows the removed functions and their replacements:
  166. +------------------------------+----------------------------------------------------------+
  167. | *Removed* | *Replacement* |
  168. +==============================+==========================================================+
  169. | base_path_join() | oe.path.join() |
  170. +------------------------------+----------------------------------------------------------+
  171. | base_path_relative() | oe.path.relative() |
  172. +------------------------------+----------------------------------------------------------+
  173. | base_path_out() | oe.path.format_display() |
  174. +------------------------------+----------------------------------------------------------+
  175. | base_read_file() | oe.utils.read_file() |
  176. +------------------------------+----------------------------------------------------------+
  177. | base_ifelse() | oe.utils.ifelse() |
  178. +------------------------------+----------------------------------------------------------+
  179. | base_conditional() | oe.utils.conditional() |
  180. +------------------------------+----------------------------------------------------------+
  181. | base_less_or_equal() | oe.utils.less_or_equal() |
  182. +------------------------------+----------------------------------------------------------+
  183. | base_version_less_or_equal() | oe.utils.version_less_or_equal() |
  184. +------------------------------+----------------------------------------------------------+
  185. | base_contains() | bb.utils.contains() |
  186. +------------------------------+----------------------------------------------------------+
  187. | base_both_contain() | oe.utils.both_contain() |
  188. +------------------------------+----------------------------------------------------------+
  189. | base_prune_suffix() | oe.utils.prune_suffix() |
  190. +------------------------------+----------------------------------------------------------+
  191. | oe_filter() | oe.utils.str_filter() |
  192. +------------------------------+----------------------------------------------------------+
  193. | oe_filter_out() | oe.utils.str_filter_out() (or use the \_remove operator) |
  194. +------------------------------+----------------------------------------------------------+
  195. - Using ``exit 1`` to explicitly defer a postinstall script until first
  196. boot is now deprecated since it is not an obvious mechanism and can
  197. mask actual errors. If you want to explicitly defer a postinstall to
  198. first boot on the target rather than at ``rootfs`` creation time, use
  199. ``pkg_postinst_ontarget()`` or call
  200. ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
  201. Any failure of a ``pkg_postinst()`` script (including ``exit 1``)
  202. will trigger a warning during ``do_rootfs``.
  203. For more information, see the
  204. ":ref:`dev-manual/common-tasks:post-installation scripts`"
  205. section in the Yocto Project Development Tasks Manual.
  206. - The ``elf`` image type has been removed. This image type was removed
  207. because the ``mkelfimage`` tool that was required to create it is no
  208. longer provided by coreboot upstream and required updating every time
  209. ``binutils`` updated.
  210. - Support for .iso image compression (previously enabled through
  211. ``COMPRESSISO = "1"``) has been removed. The userspace tools
  212. (``zisofs-tools``) are unmaintained and ``squashfs`` provides better
  213. performance and compression. In order to build a live image with
  214. squashfs+lz4 compression enabled you should now set
  215. ``LIVE_ROOTFS_TYPE = "squashfs-lz4"`` and ensure that ``live`` is in
  216. ``IMAGE_FSTYPES``.
  217. - Recipes with an unconditional dependency on ``libpam`` are only
  218. buildable with ``pam`` in ``DISTRO_FEATURES``. If the dependency is
  219. truly optional then it is recommended that the dependency be
  220. conditional upon ``pam`` being in ``DISTRO_FEATURES``.
  221. - For EFI-based machines, the bootloader (``grub-efi`` by default) is
  222. installed into the image at /boot. Wic can be used to split the
  223. bootloader into separate boot and rootfs partitions if necessary.
  224. - Patches whose context does not match exactly (i.e. where patch
  225. reports "fuzz" when applying) will generate a warning. For an example
  226. of this see :yocto_git:`this commit
  227. </poky/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57>`.
  228. - Layers are expected to set ``LAYERSERIES_COMPAT_layername`` to match
  229. the version(s) of OpenEmbedded-Core they are compatible with. This is
  230. specified as codenames using spaces to separate multiple values (e.g.
  231. "rocko sumo"). If a layer does not set
  232. ``LAYERSERIES_COMPAT_layername``, a warning will is shown. If a layer
  233. sets a value that does not include the current version ("sumo" for
  234. the 2.5 release), then an error will be produced.
  235. - The ``TZ`` environment variable is set to "UTC" within the build
  236. environment in order to fix reproducibility problems in some recipes.