migration-2.4.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 2.4 (rocko)
  3. ===================
  4. This section provides migration information for moving to the Yocto
  5. Project 2.4 Release (codename "rocko") from the prior release.
  6. .. _migration-2.4-memory-resident-mode:
  7. Memory Resident Mode
  8. --------------------
  9. A persistent mode is now available in BitBake's default operation,
  10. replacing its previous "memory resident mode" (i.e.
  11. ``oe-init-build-env-memres``). Now you only need to set
  12. :term:`BB_SERVER_TIMEOUT` to a timeout (in
  13. seconds) and BitBake's server stays resident for that amount of time
  14. between invocations. The ``oe-init-build-env-memres`` script has been
  15. removed since a separate environment setup script is no longer needed.
  16. .. _migration-2.4-packaging-changes:
  17. Packaging Changes
  18. -----------------
  19. This section provides information about packaging changes that have
  20. occurred:
  21. - ``python3`` Changes:
  22. - The main "python3" package now brings in all of the standard
  23. Python 3 distribution rather than a subset. This behavior matches
  24. what is expected based on traditional Linux distributions. If you
  25. wish to install a subset of Python 3, specify ``python-core`` plus
  26. one or more of the individual packages that are still produced.
  27. - ``python3``: The ``bz2.py``, ``lzma.py``, and
  28. ``_compression.py`` scripts have been moved from the
  29. ``python3-misc`` package to the ``python3-compression`` package.
  30. - ``binutils``: The ``libbfd`` library is now packaged in a separate
  31. "libbfd" package. This packaging saves space when certain tools (e.g.
  32. ``perf``) are installed. In such cases, the tools only need
  33. ``libbfd`` rather than all the packages in ``binutils``.
  34. - ``util-linux`` Changes:
  35. - The ``su`` program is now packaged in a separate "util-linux-su"
  36. package, which is only built when "pam" is listed in the
  37. :term:`DISTRO_FEATURES` variable.
  38. ``util-linux`` should not be installed unless it is needed because
  39. ``su`` is normally provided through the shadow file format. The
  40. main ``util-linux`` package has runtime dependencies (i.e.
  41. :term:`RDEPENDS`) on the ``util-linux-su`` package
  42. when "pam" is in :term:`DISTRO_FEATURES`.
  43. - The ``switch_root`` program is now packaged in a separate
  44. "util-linux-switch-root" package for small :term:`Initramfs` images that
  45. do not need the whole ``util-linux`` package or the busybox
  46. binary, which are both much larger than ``switch_root``. The main
  47. ``util-linux`` package has a recommended runtime dependency (i.e.
  48. :term:`RRECOMMENDS`) on the
  49. ``util-linux-switch-root`` package.
  50. - The ``ionice`` program is now packaged in a separate
  51. "util-linux-ionice" package. The main ``util-linux`` package has a
  52. recommended runtime dependency (i.e. :term:`RRECOMMENDS`) on the
  53. ``util-linux-ionice`` package.
  54. - ``initscripts``: The ``sushell`` program is now packaged in a
  55. separate "initscripts-sushell" package. This packaging change allows
  56. systems to pull ``sushell`` in when ``selinux`` is enabled. The
  57. change also eliminates needing to pull in the entire ``initscripts``
  58. package. The main ``initscripts`` package has a runtime dependency
  59. (i.e. :term:`RDEPENDS`) on the ``sushell`` package when "selinux" is in
  60. :term:`DISTRO_FEATURES`.
  61. - ``glib-2.0``: The ``glib-2.0`` package now has a recommended
  62. runtime dependency (i.e. :term:`RRECOMMENDS`) on the ``shared-mime-info``
  63. package, since large portions of GIO are not useful without the MIME
  64. database. You can remove the dependency by using the
  65. :term:`BAD_RECOMMENDATIONS` variable if
  66. ``shared-mime-info`` is too large and is not required.
  67. - *Go Standard Runtime:* The Go standard runtime has been split out
  68. from the main ``go`` recipe into a separate ``go-runtime`` recipe.
  69. .. _migration-2.4-removed-recipes:
  70. Removed Recipes
  71. ---------------
  72. - ``acpitests``: This recipe is not maintained.
  73. - ``autogen-native``: No longer required by Grub, oe-core, or
  74. meta-oe.
  75. - ``bdwgc``: Nothing in OpenEmbedded-Core requires this recipe. It
  76. has moved to meta-oe.
  77. - ``byacc``: This recipe was only needed by rpm 5.x and has moved to
  78. meta-oe.
  79. - ``gcc (5.4)``: The 5.4 series dropped the recipe in favor of 6.3 /
  80. 7.2.
  81. - ``gnome-common``: Deprecated upstream and no longer needed.
  82. - ``go-bootstrap-native``: Go 1.9 does its own bootstrapping so this
  83. recipe has been removed.
  84. - ``guile``: This recipe was only needed by ``autogen-native`` and
  85. ``remake``. The recipe is no longer needed by either of these
  86. programs.
  87. - ``libclass-isa-perl``: This recipe was previously needed for LSB 4,
  88. no longer needed.
  89. - ``libdumpvalue-perl``: This recipe was previously needed for LSB 4,
  90. no longer needed.
  91. - ``libenv-perl``: This recipe was previously needed for LSB 4, no
  92. longer needed.
  93. - ``libfile-checktree-perl``: This recipe was previously needed for
  94. LSB 4, no longer needed.
  95. - ``libi18n-collate-perl``: This recipe was previously needed for LSB
  96. 4, no longer needed.
  97. - ``libiconv``: This recipe was only needed for ``uclibc``, which was
  98. removed in the previous release. ``glibc`` and ``musl`` have their
  99. own implementations. ``meta-mingw`` still needs ``libiconv``, so it
  100. has been moved to ``meta-mingw``.
  101. - ``libpng12``: This recipe was previously needed for LSB. The
  102. current ``libpng`` is 1.6.x.
  103. - ``libpod-plainer-perl``: This recipe was previously needed for LSB
  104. 4, no longer needed.
  105. - ``linux-yocto (4.1)``: This recipe was removed in favor of 4.4,
  106. 4.9, 4.10 and 4.12.
  107. - ``mailx``: This recipe was previously only needed for LSB
  108. compatibility, and upstream is defunct.
  109. - ``mesa (git version only)``: The git version recipe was stale with
  110. respect to the release version.
  111. - ``ofono (git version only)``: The git version recipe was stale with
  112. respect to the release version.
  113. - ``portmap``: This recipe is obsolete and is superseded by
  114. ``rpcbind``.
  115. - ``python3-pygpgme``: This recipe is old and unmaintained. It was
  116. previously required by ``dnf``, which has switched to official
  117. ``gpgme`` Python bindings.
  118. - ``python-async``: This recipe has been removed in favor of the
  119. Python 3 version.
  120. - ``python-gitdb``: This recipe has been removed in favor of the
  121. Python 3 version.
  122. - ``python-git``: This recipe was removed in favor of the Python 3
  123. version.
  124. - ``python-mako``: This recipe was removed in favor of the Python 3
  125. version.
  126. - ``python-pexpect``: This recipe was removed in favor of the Python
  127. 3 version.
  128. - ``python-ptyprocess``: This recipe was removed in favor of Python
  129. the 3 version.
  130. - ``python-pycurl``: Nothing is using this recipe in
  131. OpenEmbedded-Core (i.e. ``meta-oe``).
  132. - ``python-six``: This recipe was removed in favor of the Python 3
  133. version.
  134. - ``python-smmap``: This recipe was removed in favor of the Python 3
  135. version.
  136. - ``remake``: Using ``remake`` as the provider of ``virtual/make`` is
  137. broken. Consequently, this recipe is not needed in OpenEmbedded-Core.
  138. .. _migration-2.4-kernel-device-tree-move:
  139. Kernel Device Tree Move
  140. -----------------------
  141. Kernel Device Tree support is now easier to enable in a kernel recipe.
  142. The Device Tree code has moved to a :ref:`ref-classes-kernel-devicetree` class.
  143. Functionality is automatically enabled for any recipe that inherits the
  144. :ref:`kernel <ref-classes-kernel>` class and sets the :term:`KERNEL_DEVICETREE`
  145. variable. The previous mechanism for doing this,
  146. ``meta/recipes-kernel/linux/linux-dtb.inc``, is still available to avoid
  147. breakage, but triggers a deprecation warning. Future releases of the
  148. Yocto Project will remove ``meta/recipes-kernel/linux/linux-dtb.inc``.
  149. It is advisable to remove any ``require`` statements that request
  150. ``meta/recipes-kernel/linux/linux-dtb.inc`` from any custom kernel
  151. recipes you might have. This will avoid breakage in post 2.4 releases.
  152. .. _migration-2.4-package-qa-changes:
  153. Package QA Changes
  154. ------------------
  155. - The "unsafe-references-in-scripts" QA check has been removed.
  156. - If you refer to ``${COREBASE}/LICENSE`` within
  157. :term:`LIC_FILES_CHKSUM` you receive a
  158. warning because this file is a description of the license for
  159. OE-Core. Use ``${COMMON_LICENSE_DIR}/MIT`` if your recipe is
  160. MIT-licensed and you cannot use the preferred method of referring to
  161. a file within the source tree.
  162. .. _migration-2.4-readme-changes:
  163. ``README`` File Changes
  164. -----------------------
  165. - The main Poky ``README`` file has been moved to the ``meta-poky``
  166. layer and has been renamed ``README.poky``. A symlink has been
  167. created so that references to the old location work.
  168. - The ``README.hardware`` file has been moved to ``meta-yocto-bsp``. A
  169. symlink has been created so that references to the old location work.
  170. - A ``README.qemu`` file has been created with coverage of the
  171. ``qemu*`` machines.
  172. .. _migration-2.4-miscellaneous-changes:
  173. Miscellaneous Changes
  174. ---------------------
  175. - The ``ROOTFS_PKGMANAGE_BOOTSTRAP`` variable and any references to it
  176. have been removed. You should remove this variable from any custom
  177. recipes.
  178. - The ``meta-yocto`` directory has been removed.
  179. .. note::
  180. In the Yocto Project 2.1 release
  181. meta-yocto
  182. was renamed to
  183. meta-poky
  184. and the
  185. meta-yocto
  186. subdirectory remained to avoid breaking existing configurations.
  187. - The ``maintainers.inc`` file, which tracks maintainers by listing a
  188. primary person responsible for each recipe in OE-Core, has been moved
  189. from ``meta-poky`` to OE-Core (i.e. from
  190. ``meta-poky/conf/distro/include`` to ``meta/conf/distro/include``).
  191. - The :ref:`ref-classes-buildhistory` class now makes
  192. a single commit per build rather than one commit per subdirectory in
  193. the repository. This behavior assumes the commits are enabled with
  194. :term:`BUILDHISTORY_COMMIT` = "1", which
  195. is typical. Previously, the :ref:`ref-classes-buildhistory` class made one commit
  196. per subdirectory in the repository in order to make it easier to see
  197. the changes for a particular subdirectory. To view a particular
  198. change, specify that subdirectory as the last parameter on the
  199. ``git show`` or ``git diff`` commands.
  200. - The ``x86-base.inc`` file, which is included by all x86-based machine
  201. configurations, now sets :term:`IMAGE_FSTYPES`
  202. using ``?=`` to "live" rather than appending with ``+=``. This change
  203. makes the default easier to override.
  204. - BitBake fires multiple "BuildStarted" events when multiconfig is
  205. enabled (one per configuration). For more information, see the
  206. ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:events`"
  207. section in the BitBake User Manual.
  208. - By default, the ``security_flags.inc`` file sets a
  209. :term:`GCCPIE` variable with an option to enable
  210. Position Independent Executables (PIE) within ``gcc``. Enabling PIE
  211. in the GNU C Compiler (GCC), makes Return Oriented Programming (ROP)
  212. attacks much more difficult to execute.
  213. - OE-Core now provides a ``bitbake-layers`` plugin that implements a
  214. "create-layer" subcommand. The implementation of this subcommand has
  215. resulted in the ``yocto-layer`` script being deprecated and will
  216. likely be removed in the next Yocto Project release.
  217. - The ``vmdk``, ``vdi``, and ``qcow2`` image file types are now used in
  218. conjunction with the "wic" image type through :term:`CONVERSION_CMD`.
  219. Consequently, the equivalent image types are now ``wic.vmdk``,
  220. ``wic.vdi``, and ``wic.qcow2``, respectively.
  221. - ``do_image_<type>[depends]`` has replaced ``IMAGE_DEPENDS_<type>``.
  222. If you have your own classes that implement custom image types, then
  223. you need to update them.
  224. - OpenSSL 1.1 has been introduced. However, the default is still 1.0.x
  225. through the :term:`PREFERRED_VERSION`
  226. variable. This preference is set is due to the remaining
  227. compatibility issues with other software. The
  228. :term:`PROVIDES` variable in the openssl 1.0 recipe
  229. now includes "openssl10" as a marker that can be used in
  230. :term:`DEPENDS` within recipes that build software
  231. that still depend on OpenSSL 1.0.
  232. - To ensure consistent behavior, BitBake's "-r" and "-R" options (i.e.
  233. prefile and postfile), which are used to read or post-read additional
  234. configuration files from the command line, now only affect the
  235. current BitBake command. Before these BitBake changes, these options
  236. would "stick" for future executions.