migration-2.6.rst 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 2.6 (thud)
  3. ==================
  4. This section provides migration information for moving to the Yocto
  5. Project 2.6 Release (codename "thud") from the prior release.
  6. .. _migration-2.6-gcc-changes:
  7. GCC 8.2 is Now Used by Default
  8. ------------------------------
  9. The GNU Compiler Collection version 8.2 is now used by default for
  10. compilation. For more information on what has changed in the GCC 8.x
  11. release, see https://gcc.gnu.org/gcc-8/changes.html.
  12. If you still need to compile with version 7.x, GCC 7.3 is also provided.
  13. You can select this version by setting the and can be selected by
  14. setting the :term:`GCCVERSION` variable to "7.%" in
  15. your configuration.
  16. .. _migration-2.6-removed-recipes:
  17. Removed Recipes
  18. ---------------
  19. The following recipes have been removed:
  20. - *beecrypt*: No longer needed since moving to RPM 4.
  21. - *bigreqsproto*: Replaced by ``xorgproto``.
  22. - *calibrateproto*: Removed in favor of ``xinput``.
  23. - *compositeproto*: Replaced by ``xorgproto``.
  24. - *damageproto*: Replaced by ``xorgproto``.
  25. - *dmxproto*: Replaced by ``xorgproto``.
  26. - *dri2proto*: Replaced by ``xorgproto``.
  27. - *dri3proto*: Replaced by ``xorgproto``.
  28. - *eee-acpi-scripts*: Became obsolete.
  29. - *fixesproto*: Replaced by ``xorgproto``.
  30. - *fontsproto*: Replaced by ``xorgproto``.
  31. - *fstests*: Became obsolete.
  32. - *gccmakedep*: No longer used.
  33. - *glproto*: Replaced by ``xorgproto``.
  34. - *gnome-desktop3*: No longer needed. This recipe has moved to ``meta-oe``.
  35. - *icon-naming-utils*: No longer used since the Sato theme was removed in 2016.
  36. - *inputproto*: Replaced by ``xorgproto``.
  37. - *kbproto*: Replaced by ``xorgproto``.
  38. - *libusb-compat*: Became obsolete.
  39. - *libuser*: Became obsolete.
  40. - *libnfsidmap*: No longer an external requirement since ``nfs-utils`` 2.2.1. ``libnfsidmap`` is now integrated.
  41. - *libxcalibrate*: No longer needed with ``xinput``
  42. - *mktemp*: Became obsolete. The ``mktemp`` command is provided by both ``busybox`` and ``coreutils``.
  43. - *ossp-uuid*: Is not being maintained and has mostly been replaced by ``uuid.h`` in ``util-linux``.
  44. - *pax-utils*: No longer needed. Previous QA tests that did use this recipe are now done at build time.
  45. - *pcmciautils*: Became obsolete.
  46. - *pixz*: No longer needed. ``xz`` now supports multi-threaded compression.
  47. - *presentproto*: Replaced by ``xorgproto``.
  48. - *randrproto*: Replaced by ``xorgproto``.
  49. - *recordproto*: Replaced by ``xorgproto``.
  50. - *renderproto*: Replaced by ``xorgproto``.
  51. - *resourceproto*: Replaced by ``xorgproto``.
  52. - *scrnsaverproto*: Replaced by ``xorgproto``.
  53. - *trace-cmd*: Became obsolete. ``perf`` replaced this recipe's functionally.
  54. - *videoproto*: Replaced by ``xorgproto``.
  55. - *wireless-tools*: Became obsolete. Superseded by ``iw``.
  56. - *xcmiscproto*: Replaced by ``xorgproto``.
  57. - *xextproto*: Replaced by ``xorgproto``.
  58. - *xf86dgaproto*: Replaced by ``xorgproto``.
  59. - *xf86driproto*: Replaced by ``xorgproto``.
  60. - *xf86miscproto*: Replaced by ``xorgproto``.
  61. - *xf86-video-omapfb*: Became obsolete. Use kernel modesetting driver instead.
  62. - *xf86-video-omap*: Became obsolete. Use kernel modesetting driver instead.
  63. - *xf86vidmodeproto*: Replaced by ``xorgproto``.
  64. - *xineramaproto*: Replaced by ``xorgproto``.
  65. - *xproto*: Replaced by ``xorgproto``.
  66. - *yasm*: No longer needed since previous usages are now satisfied by ``nasm``.
  67. .. _migration-2.6-packaging-changes:
  68. Packaging Changes
  69. -----------------
  70. The following packaging changes have been made:
  71. - *cmake*: ``cmake.m4`` and ``toolchain`` files have been moved to
  72. the main package.
  73. - *iptables*: The ``iptables`` modules have been split into
  74. separate packages.
  75. - *alsa-lib*: ``libasound`` is now in the main ``alsa-lib`` package
  76. instead of ``libasound``.
  77. - *glibc*: ``libnss-db`` is now in its own package along with a
  78. ``/var/db/makedbs.sh`` script to update databases.
  79. - *python and python3*: The main package has been removed from
  80. the recipe. You must install specific packages or ``python-modules``
  81. / ``python3-modules`` for everything.
  82. - *systemtap*: Moved ``systemtap-exporter`` into its own package.
  83. .. _migration-2.6-xorg-protocol-dependencies:
  84. XOrg Protocol dependencies
  85. --------------------------
  86. The ``*proto`` upstream repositories have been combined into one
  87. "xorgproto" repository. Thus, the corresponding recipes have also been
  88. combined into a single ``xorgproto`` recipe. Any recipes that depend
  89. upon the older ``*proto`` recipes need to be changed to depend on the
  90. newer ``xorgproto`` recipe instead.
  91. For names of recipes removed because of this repository change, see the
  92. :ref:`migration-guides/migration-2.6:removed recipes` section.
  93. .. _migration-2.6-distutils-distutils3-fetching-dependencies:
  94. ``distutils`` and ``distutils3`` Now Prevent Fetching Dependencies During the ``do_configure`` Task
  95. ---------------------------------------------------------------------------------------------------
  96. Previously, it was possible for Python recipes that inherited the
  97. ``distutils`` and ``distutils3`` classes to fetch code
  98. during the :ref:`ref-tasks-configure` task to satisfy
  99. dependencies mentioned in ``setup.py`` if those dependencies were not
  100. provided in the sysroot (i.e. recipes providing the dependencies were
  101. missing from :term:`DEPENDS`).
  102. .. note::
  103. This change affects classes beyond just the two mentioned (i.e. ``distutils``
  104. and ``distutils3``). Any recipe that inherits ``distutils*`` classes are
  105. affected. For example, the ``setuptools`` and :ref:`ref-classes-setuptools3`
  106. recipes are affected since they inherit the ``distutils*`` classes.
  107. Fetching these types of dependencies that are not provided in the
  108. sysroot negatively affects the ability to reproduce builds. This type of
  109. fetching is now explicitly disabled. Consequently, any missing
  110. dependencies in Python recipes that use these classes now result in an
  111. error during the :ref:`ref-tasks-configure` task.
  112. .. _migration-2.6-linux-yocto-configuration-audit-issues-now-correctly-reported:
  113. ``linux-yocto`` Configuration Audit Issues Now Correctly Reported
  114. -----------------------------------------------------------------
  115. Due to a bug, the kernel configuration audit functionality was not
  116. writing out any resulting warnings during the build. This issue is now
  117. corrected. You might notice these warnings now if you have a custom
  118. kernel configuration with a ``linux-yocto`` style kernel recipe.
  119. .. _migration-2.6-image-kernel-artifact-naming-changes:
  120. Image/Kernel Artifact Naming Changes
  121. ------------------------------------
  122. The following changes have been made:
  123. - Name variables (e.g. :term:`IMAGE_NAME`) use a new
  124. :term:`IMAGE_VERSION_SUFFIX` variable instead of
  125. :term:`DATETIME`. Using :term:`IMAGE_VERSION_SUFFIX`
  126. allows easier and more direct changes.
  127. The :term:`IMAGE_VERSION_SUFFIX` variable is set in the ``bitbake.conf``
  128. configuration file as follows::
  129. IMAGE_VERSION_SUFFIX = "-${DATETIME}"
  130. - Several variables have changed names for consistency::
  131. Old Variable Name New Variable Name
  132. ========================================================
  133. KERNEL_IMAGE_BASE_NAME KERNEL_IMAGE_NAME
  134. KERNEL_IMAGE_SYMLINK_NAME KERNEL_IMAGE_LINK_NAME
  135. MODULE_TARBALL_BASE_NAME MODULE_TARBALL_NAME
  136. MODULE_TARBALL_SYMLINK_NAME MODULE_TARBALL_LINK_NAME
  137. INITRAMFS_BASE_NAME INITRAMFS_NAME
  138. - The ``MODULE_IMAGE_BASE_NAME`` variable has been removed. The module
  139. tarball name is now controlled directly with the
  140. :term:`MODULE_TARBALL_NAME` variable.
  141. - The :term:`KERNEL_DTB_NAME` and
  142. :term:`KERNEL_DTB_LINK_NAME` variables
  143. have been introduced to control kernel Device Tree Binary (DTB)
  144. artifact names instead of mangling ``KERNEL_IMAGE_*`` variables.
  145. - The :term:`KERNEL_FIT_NAME` and
  146. :term:`KERNEL_FIT_LINK_NAME` variables
  147. have been introduced to specify the name of flattened image tree
  148. (FIT) kernel images similar to other deployed artifacts.
  149. - The :term:`MODULE_TARBALL_NAME` and
  150. :term:`MODULE_TARBALL_LINK_NAME`
  151. variable values no longer include the "module-" prefix or ".tgz"
  152. suffix. These parts are now hardcoded so that the values are
  153. consistent with other artifact naming variables.
  154. - Added the :term:`INITRAMFS_LINK_NAME`
  155. variable so that the symlink can be controlled similarly to other
  156. artifact types.
  157. - :term:`INITRAMFS_NAME` now uses
  158. "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" instead
  159. of "${PV}-${PR}-${MACHINE}-${DATETIME}", which makes it consistent
  160. with other variables.
  161. .. _migration-2.6-serial-console-deprecated:
  162. ``SERIAL_CONSOLE`` Deprecated
  163. -----------------------------
  164. The ``SERIAL_CONSOLE`` variable has been functionally replaced by the
  165. :term:`SERIAL_CONSOLES` variable for some time. With the Yocto Project 2.6
  166. release, ``SERIAL_CONSOLE`` has been officially deprecated.
  167. ``SERIAL_CONSOLE`` will continue to work as before for the 2.6 release.
  168. However, for the sake of future compatibility, it is recommended that
  169. you replace all instances of ``SERIAL_CONSOLE`` with :term:`SERIAL_CONSOLES`.
  170. .. note::
  171. The only difference in usage is that :term:`SERIAL_CONSOLES`
  172. expects entries to be separated using semicolons as compared to
  173. ``SERIAL_CONSOLE``, which expects spaces.
  174. .. _migration-2.6-poky-sets-unknown-configure-option-to-qa-error:
  175. Configure Script Reports Unknown Options as Errors
  176. --------------------------------------------------
  177. If the configure script reports an unknown option, this now triggers a
  178. QA error instead of a warning. Any recipes that previously got away with
  179. specifying such unknown options now need to be fixed.
  180. .. _migration-2.6-override-changes:
  181. Override Changes
  182. ----------------
  183. The following changes have occurred:
  184. - The ``virtclass-native`` and ``virtclass-nativesdk`` Overrides Have
  185. Been Removed: The ``virtclass-native`` and ``virtclass-nativesdk``
  186. overrides have been deprecated since 2012 in favor of
  187. ``class-native`` and ``class-nativesdk``, respectively. Both
  188. ``virtclass-native`` and ``virtclass-nativesdk`` are now dropped.
  189. .. note::
  190. The ``virtclass-multilib-`` overrides for multilib are still valid.
  191. - The ``forcevariable`` Override Now Has a Higher Priority Than
  192. ``libc`` Overrides: The ``forcevariable`` override is documented to
  193. be the highest priority override. However, due to a long-standing
  194. quirk of how :term:`OVERRIDES` is set, the ``libc``
  195. overrides (e.g. ``libc-glibc``, ``libc-musl``, and so forth)
  196. erroneously had a higher priority. This issue is now corrected.
  197. It is likely this change will not cause any problems. However, it is
  198. possible with some unusual configurations that you might see a change
  199. in behavior if you were relying on the previous behavior. Be sure to
  200. check how you use ``forcevariable`` and ``libc-*`` overrides in your
  201. custom layers and configuration files to ensure they make sense.
  202. - The ``build-${BUILD_OS}`` Override Has Been Removed: The
  203. ``build-${BUILD_OS}``, which is typically ``build-linux``, override
  204. has been removed because building on a host operating system other
  205. than a recent version of Linux is neither supported nor recommended.
  206. Dropping the override avoids giving the impression that other host
  207. operating systems might be supported.
  208. - The "_remove" operator now preserves whitespace. Consequently, when
  209. specifying list items to remove, be aware that leading and trailing
  210. whitespace resulting from the removal is retained.
  211. See the ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:removal (override style syntax)`"
  212. section in the BitBake User Manual for a detailed example.
  213. .. _migration-2.6-systemd-configuration-now-split-out-to-systemd-conf:
  214. ``systemd`` Configuration is Now Split Into ``systemd-conf``
  215. ------------------------------------------------------------
  216. The configuration for the ``systemd`` recipe has been moved into a
  217. ``systemd-conf`` recipe. Moving this configuration to a separate recipe
  218. avoids the ``systemd`` recipe from becoming machine-specific for cases
  219. where machine-specific configurations need to be applied (e.g. for
  220. ``qemu*`` machines).
  221. Currently, the new recipe packages the following files::
  222. ${sysconfdir}/machine-id
  223. ${sysconfdir}/systemd/coredump.conf
  224. ${sysconfdir}/systemd/journald.conf
  225. ${sysconfdir}/systemd/logind.conf
  226. ${sysconfdir}/systemd/system.conf
  227. ${sysconfdir}/systemd/user.conf
  228. If you previously used bbappend files to append the ``systemd`` recipe to
  229. change any of the listed files, you must do so for the ``systemd-conf``
  230. recipe instead.
  231. .. _migration-2.6-automatic-testing-changes:
  232. Automatic Testing Changes
  233. -------------------------
  234. This section provides information about automatic testing changes:
  235. - ``TEST_IMAGE`` Variable Removed: Prior to this release, you set the
  236. ``TEST_IMAGE`` variable to "1" to enable automatic testing for
  237. successfully built images. The ``TEST_IMAGE`` variable no longer
  238. exists and has been replaced by the
  239. :term:`TESTIMAGE_AUTO` variable.
  240. - Inheriting the :ref:`ref-classes-testimage` and :ref:`ref-classes-testsdk`
  241. classes: best practices now dictate that you use the :term:`IMAGE_CLASSES`
  242. variable rather than the :term:`INHERIT` variable when you inherit the
  243. :ref:`ref-classes-testimage` and :ref:`ref-classes-testsdk` classes used
  244. for automatic testing.
  245. .. _migration-2.6-openssl-changes:
  246. OpenSSL Changes
  247. ---------------
  248. `OpenSSL <https://www.openssl.org/>`__ has been upgraded from 1.0 to
  249. 1.1. By default, this upgrade could cause problems for recipes that have
  250. both versions in their dependency chains. The problem is that both
  251. versions cannot be installed together at build time.
  252. .. note::
  253. It is possible to have both versions of the library at runtime.
  254. .. _migration-2.6-bitbake-changes:
  255. BitBake Changes
  256. ---------------
  257. The server logfile ``bitbake-cookerdaemon.log`` is now always placed in
  258. the :term:`Build Directory` instead of the current directory.
  259. .. _migration-2.6-security-changes:
  260. Security Changes
  261. ----------------
  262. The Poky distribution now uses security compiler flags by default.
  263. Inclusion of these flags could cause new failures due to stricter
  264. checking for various potential security issues in code.
  265. .. _migration-2.6-post-installation-changes:
  266. Post Installation Changes
  267. -------------------------
  268. You must explicitly mark post installs to defer to the target. If you
  269. want to explicitly defer a postinstall to first boot on the target
  270. rather than at root filesystem creation time, use ``pkg_postinst_ontarget()`` or
  271. call ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
  272. Any failure of a ``pkg_postinst()`` script (including exit 1) triggers
  273. an error during the :ref:`ref-tasks-rootfs` task.
  274. For more information on post-installation behavior, see the
  275. ":ref:`dev-manual/new-recipe:post-installation scripts`"
  276. section in the Yocto Project Development Tasks Manual.
  277. .. _migration-2.6-python-3-profile-guided-optimizations:
  278. Python 3 Profile-Guided Optimization
  279. ------------------------------------
  280. The ``python3`` recipe now enables profile-guided optimization. Using
  281. this optimization requires a little extra build time in exchange for
  282. improved performance on the target at runtime. Additionally, the
  283. optimization is only enabled if the current
  284. :term:`MACHINE` has support for user-mode emulation in
  285. QEMU (i.e. "qemu-usermode" is in
  286. :term:`MACHINE_FEATURES`, which it is by
  287. default).
  288. If you wish to disable Python profile-guided optimization regardless of
  289. the value of :term:`MACHINE_FEATURES`, then ensure that
  290. :term:`PACKAGECONFIG` for the ``python3`` recipe
  291. does not contain "pgo". You could accomplish the latter using the
  292. following at the configuration level::
  293. PACKAGECONFIG_remove_pn-python3 = "pgo"
  294. Alternatively, you can set :term:`PACKAGECONFIG` using an append file
  295. for the ``python3`` recipe.
  296. .. _migration-2.6-miscellaneous-changes:
  297. Miscellaneous Changes
  298. ---------------------
  299. The following miscellaneous changes occurred:
  300. - Default to using the Thumb-2 instruction set for armv7a and above. If
  301. you have any custom recipes that build software that needs to be
  302. built with the ARM instruction set, change the recipe to set the
  303. instruction set as follows::
  304. ARM_INSTRUCTION_SET = "arm"
  305. - ``run-postinsts`` no longer uses ``/etc/*-postinsts`` for
  306. ``dpkg/opkg`` in favor of built-in postinst support. RPM behavior
  307. remains unchanged.
  308. - The ``NOISO`` and ``NOHDD`` variables are no longer used. You now
  309. control building ``*.iso`` and ``*.hddimg`` image types directly by
  310. using the :term:`IMAGE_FSTYPES` variable.
  311. - The ``scripts/contrib/mkefidisk.sh`` has been removed in favor of
  312. Wic.
  313. - ``kernel-modules`` has been removed from
  314. :term:`RRECOMMENDS` for ``qemumips`` and
  315. ``qemumips64`` machines. Removal also impacts the ``x86-base.inc``
  316. file.
  317. .. note::
  318. ``genericx86`` and ``genericx86-64`` retain ``kernel-modules`` as part of
  319. the :term:`RRECOMMENDS` variable setting.
  320. - The ``LGPLv2_WHITELIST_GPL-3.0`` variable has been removed. If you
  321. are setting this variable in your configuration, set or append it to
  322. the ``WHITELIST_GPL-3.0`` variable instead.
  323. - ``${ASNEEDED}`` is now included in the
  324. :term:`TARGET_LDFLAGS` variable directly. The
  325. remaining definitions from ``meta/conf/distro/include/as-needed.inc``
  326. have been moved to corresponding recipes.
  327. - Support for DSA host keys has been dropped from the OpenSSH recipes.
  328. If you are still using DSA keys, you must switch over to a more
  329. secure algorithm as recommended by OpenSSH upstream.
  330. - The ``dhcp`` recipe now uses the ``dhcpd6.conf`` configuration file
  331. in ``dhcpd6.service`` for IPv6 DHCP rather than re-using
  332. ``dhcpd.conf``, which is now reserved for IPv4.