migration-2.6.rst 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  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.
  104. ``distutils`` and ``distutils3``). Any recipe that inherits ``distutils*``
  105. classes are affected. For example, the ``setuptools`` and
  106. :ref:`setuptools3 <ref-classes-setuptools3>`
  107. recipes are affected since they inherit the ``distutils*`` classes.
  108. Fetching these types of dependencies that are not provided in the
  109. sysroot negatively affects the ability to reproduce builds. This type of
  110. fetching is now explicitly disabled. Consequently, any missing
  111. dependencies in Python recipes that use these classes now result in an
  112. error during the :ref:`ref-tasks-configure` task.
  113. .. _migration-2.6-linux-yocto-configuration-audit-issues-now-correctly-reported:
  114. ``linux-yocto`` Configuration Audit Issues Now Correctly Reported
  115. -----------------------------------------------------------------
  116. Due to a bug, the kernel configuration audit functionality was not
  117. writing out any resulting warnings during the build. This issue is now
  118. corrected. You might notice these warnings now if you have a custom
  119. kernel configuration with a ``linux-yocto`` style kernel recipe.
  120. .. _migration-2.6-image-kernel-artifact-naming-changes:
  121. Image/Kernel Artifact Naming Changes
  122. ------------------------------------
  123. The following changes have been made:
  124. - Name variables (e.g. :term:`IMAGE_NAME`) use a new
  125. :term:`IMAGE_VERSION_SUFFIX` variable instead of
  126. :term:`DATETIME`. Using :term:`IMAGE_VERSION_SUFFIX`
  127. allows easier and more direct changes.
  128. The :term:`IMAGE_VERSION_SUFFIX` variable is set in the ``bitbake.conf``
  129. configuration file as follows::
  130. IMAGE_VERSION_SUFFIX = "-${DATETIME}"
  131. - Several variables have changed names for consistency::
  132. Old Variable Name New Variable Name
  133. ========================================================
  134. KERNEL_IMAGE_BASE_NAME KERNEL_IMAGE_NAME
  135. KERNEL_IMAGE_SYMLINK_NAME KERNEL_IMAGE_LINK_NAME
  136. MODULE_TARBALL_BASE_NAME MODULE_TARBALL_NAME
  137. MODULE_TARBALL_SYMLINK_NAME MODULE_TARBALL_LINK_NAME
  138. INITRAMFS_BASE_NAME INITRAMFS_NAME
  139. - The ``MODULE_IMAGE_BASE_NAME`` variable has been removed. The module
  140. tarball name is now controlled directly with the
  141. :term:`MODULE_TARBALL_NAME` variable.
  142. - The :term:`KERNEL_DTB_NAME` and
  143. :term:`KERNEL_DTB_LINK_NAME` variables
  144. have been introduced to control kernel Device Tree Binary (DTB)
  145. artifact names instead of mangling ``KERNEL_IMAGE_*`` variables.
  146. - The :term:`KERNEL_FIT_NAME` and
  147. :term:`KERNEL_FIT_LINK_NAME` variables
  148. have been introduced to specify the name of flattened image tree
  149. (FIT) kernel images similar to other deployed artifacts.
  150. - The :term:`MODULE_TARBALL_NAME` and
  151. :term:`MODULE_TARBALL_LINK_NAME`
  152. variable values no longer include the "module-" prefix or ".tgz"
  153. suffix. These parts are now hardcoded so that the values are
  154. consistent with other artifact naming variables.
  155. - Added the :term:`INITRAMFS_LINK_NAME`
  156. variable so that the symlink can be controlled similarly to other
  157. artifact types.
  158. - :term:`INITRAMFS_NAME` now uses
  159. "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" instead
  160. of "${PV}-${PR}-${MACHINE}-${DATETIME}", which makes it consistent
  161. with other variables.
  162. .. _migration-2.6-serial-console-deprecated:
  163. ``SERIAL_CONSOLE`` Deprecated
  164. -----------------------------
  165. The :term:`SERIAL_CONSOLE` variable has been
  166. functionally replaced by the
  167. :term:`SERIAL_CONSOLES` variable for some time.
  168. With the Yocto Project 2.6 release, :term:`SERIAL_CONSOLE` has been
  169. officially deprecated.
  170. :term:`SERIAL_CONSOLE` will continue to work as before for the 2.6 release.
  171. However, for the sake of future compatibility, it is recommended that
  172. you replace all instances of :term:`SERIAL_CONSOLE` with
  173. :term:`SERIAL_CONSOLES`.
  174. .. note::
  175. The only difference in usage is that :term:`SERIAL_CONSOLES`
  176. expects entries to be separated using semicolons as compared to
  177. :term:`SERIAL_CONSOLE`, which expects spaces.
  178. .. _migration-2.6-poky-sets-unknown-configure-option-to-qa-error:
  179. Configure Script Reports Unknown Options as Errors
  180. --------------------------------------------------
  181. If the configure script reports an unknown option, this now triggers a
  182. QA error instead of a warning. Any recipes that previously got away with
  183. specifying such unknown options now need to be fixed.
  184. .. _migration-2.6-override-changes:
  185. Override Changes
  186. ----------------
  187. The following changes have occurred:
  188. - The ``virtclass-native`` and ``virtclass-nativesdk`` Overrides Have
  189. Been Removed: The ``virtclass-native`` and ``virtclass-nativesdk``
  190. overrides have been deprecated since 2012 in favor of
  191. ``class-native`` and ``class-nativesdk``, respectively. Both
  192. ``virtclass-native`` and ``virtclass-nativesdk`` are now dropped.
  193. .. note::
  194. The ``virtclass-multilib-`` overrides for multilib are still valid.
  195. - The ``forcevariable`` Override Now Has a Higher Priority Than
  196. ``libc`` Overrides: The ``forcevariable`` override is documented to
  197. be the highest priority override. However, due to a long-standing
  198. quirk of how :term:`OVERRIDES` is set, the ``libc``
  199. overrides (e.g. ``libc-glibc``, ``libc-musl``, and so forth)
  200. erroneously had a higher priority. This issue is now corrected.
  201. It is likely this change will not cause any problems. However, it is
  202. possible with some unusual configurations that you might see a change
  203. in behavior if you were relying on the previous behavior. Be sure to
  204. check how you use ``forcevariable`` and ``libc-*`` overrides in your
  205. custom layers and configuration files to ensure they make sense.
  206. - The ``build-${BUILD_OS}`` Override Has Been Removed: The
  207. ``build-${BUILD_OS}``, which is typically ``build-linux``, override
  208. has been removed because building on a host operating system other
  209. than a recent version of Linux is neither supported nor recommended.
  210. Dropping the override avoids giving the impression that other host
  211. operating systems might be supported.
  212. - The "_remove" operator now preserves whitespace. Consequently, when
  213. specifying list items to remove, be aware that leading and trailing
  214. whitespace resulting from the removal is retained.
  215. See the ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:removal (override style syntax)`"
  216. section in the BitBake User Manual for a detailed example.
  217. .. _migration-2.6-systemd-configuration-now-split-out-to-system-conf:
  218. ``systemd`` Configuration is Now Split Into ``systemd-conf``
  219. ------------------------------------------------------------
  220. The configuration for the ``systemd`` recipe has been moved into a
  221. ``system-conf`` recipe. Moving this configuration to a separate recipe
  222. avoids the ``systemd`` recipe from becoming machine-specific for cases
  223. where machine-specific configurations need to be applied (e.g. for
  224. ``qemu*`` machines).
  225. Currently, the new recipe packages the following files::
  226. ${sysconfdir}/machine-id
  227. ${sysconfdir}/systemd/coredump.conf
  228. ${sysconfdir}/systemd/journald.conf
  229. ${sysconfdir}/systemd/logind.conf
  230. ${sysconfdir}/systemd/system.conf
  231. ${sysconfdir}/systemd/user.conf
  232. If you previously used bbappend files to append the ``systemd`` recipe to
  233. change any of the listed files, you must do so for the ``systemd-conf``
  234. recipe instead.
  235. .. _migration-2.6-automatic-testing-changes:
  236. Automatic Testing Changes
  237. -------------------------
  238. This section provides information about automatic testing changes:
  239. - ``TEST_IMAGE`` Variable Removed: Prior to this release, you set the
  240. ``TEST_IMAGE`` variable to "1" to enable automatic testing for
  241. successfully built images. The ``TEST_IMAGE`` variable no longer
  242. exists and has been replaced by the
  243. :term:`TESTIMAGE_AUTO` variable.
  244. - Inheriting the :ref:`testimage <ref-classes-testimage>` and
  245. :ref:`testsdk <ref-classes-testsdk>` classes: best practices now dictate
  246. that you use the :term:`IMAGE_CLASSES` variable rather than the
  247. :term:`INHERIT` variable when you inherit the
  248. :ref:`testimage <ref-classes-testimage>` and
  249. :ref:`testsdk <ref-classes-testsdk>` classes used for automatic testing.
  250. .. _migration-2.6-openssl-changes:
  251. OpenSSL Changes
  252. ---------------
  253. `OpenSSL <https://www.openssl.org/>`__ has been upgraded from 1.0 to
  254. 1.1. By default, this upgrade could cause problems for recipes that have
  255. both versions in their dependency chains. The problem is that both
  256. versions cannot be installed together at build time.
  257. .. note::
  258. It is possible to have both versions of the library at runtime.
  259. .. _migration-2.6-bitbake-changes:
  260. BitBake Changes
  261. ---------------
  262. The server logfile ``bitbake-cookerdaemon.log`` is now always placed in
  263. the :term:`Build Directory` instead of the current directory.
  264. .. _migration-2.6-security-changes:
  265. Security Changes
  266. ----------------
  267. The Poky distribution now uses security compiler flags by default.
  268. Inclusion of these flags could cause new failures due to stricter
  269. checking for various potential security issues in code.
  270. .. _migration-2.6-post-installation-changes:
  271. Post Installation Changes
  272. -------------------------
  273. You must explicitly mark post installs to defer to the target. If you
  274. want to explicitly defer a postinstall to first boot on the target
  275. rather than at root filesystem creation time, use ``pkg_postinst_ontarget()`` or
  276. call ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
  277. Any failure of a ``pkg_postinst()`` script (including exit 1) triggers
  278. an error during the :ref:`ref-tasks-rootfs` task.
  279. For more information on post-installation behavior, see the
  280. ":ref:`dev-manual/new-recipe:post-installation scripts`"
  281. section in the Yocto Project Development Tasks Manual.
  282. .. _migration-2.6-python-3-profile-guided-optimizations:
  283. Python 3 Profile-Guided Optimization
  284. ------------------------------------
  285. The ``python3`` recipe now enables profile-guided optimization. Using
  286. this optimization requires a little extra build time in exchange for
  287. improved performance on the target at runtime. Additionally, the
  288. optimization is only enabled if the current
  289. :term:`MACHINE` has support for user-mode emulation in
  290. QEMU (i.e. "qemu-usermode" is in
  291. :term:`MACHINE_FEATURES`, which it is by
  292. default).
  293. If you wish to disable Python profile-guided optimization regardless of
  294. the value of :term:`MACHINE_FEATURES`, then ensure that
  295. :term:`PACKAGECONFIG` for the ``python3`` recipe
  296. does not contain "pgo". You could accomplish the latter using the
  297. following at the configuration level::
  298. PACKAGECONFIG_remove_pn-python3 = "pgo"
  299. Alternatively, you can set :term:`PACKAGECONFIG` using an append file
  300. for the ``python3`` recipe.
  301. .. _migration-2.6-miscellaneous-changes:
  302. Miscellaneous Changes
  303. ---------------------
  304. The following miscellaneous changes occurred:
  305. - Default to using the Thumb-2 instruction set for armv7a and above. If
  306. you have any custom recipes that build software that needs to be
  307. built with the ARM instruction set, change the recipe to set the
  308. instruction set as follows::
  309. ARM_INSTRUCTION_SET = "arm"
  310. - ``run-postinsts`` no longer uses ``/etc/*-postinsts`` for
  311. ``dpkg/opkg`` in favor of built-in postinst support. RPM behavior
  312. remains unchanged.
  313. - The ``NOISO`` and ``NOHDD`` variables are no longer used. You now
  314. control building ``*.iso`` and ``*.hddimg`` image types directly by
  315. using the :term:`IMAGE_FSTYPES` variable.
  316. - The ``scripts/contrib/mkefidisk.sh`` has been removed in favor of
  317. Wic.
  318. - ``kernel-modules`` has been removed from
  319. :term:`RRECOMMENDS` for ``qemumips`` and
  320. ``qemumips64`` machines. Removal also impacts the ``x86-base.inc``
  321. file.
  322. .. note::
  323. ``genericx86`` and ``genericx86-64`` retain ``kernel-modules`` as part of
  324. the :term:`RRECOMMENDS` variable setting.
  325. - The ``LGPLv2_WHITELIST_GPL-3.0`` variable has been removed. If you
  326. are setting this variable in your configuration, set or append it to
  327. the ``WHITELIST_GPL-3.0`` variable instead.
  328. - ``${ASNEEDED}`` is now included in the
  329. :term:`TARGET_LDFLAGS` variable directly. The
  330. remaining definitions from ``meta/conf/distro/include/as-needed.inc``
  331. have been moved to corresponding recipes.
  332. - Support for DSA host keys has been dropped from the OpenSSH recipes.
  333. If you are still using DSA keys, you must switch over to a more
  334. secure algorithm as recommended by OpenSSH upstream.
  335. - The ``dhcp`` recipe now uses the ``dhcpd6.conf`` configuration file
  336. in ``dhcpd6.service`` for IPv6 DHCP rather than re-using
  337. ``dhcpd.conf``, which is now reserved for IPv4.