migration-2.2.rst 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. Release 2.2 (morty)
  2. ===================
  3. This section provides migration information for moving to the Yocto
  4. Project 2.2 Release (codename "morty") from the prior release.
  5. .. _migration-2.2-minimum-kernel-version:
  6. Minimum Kernel Version
  7. ----------------------
  8. The minimum kernel version for the target system and for SDK is now
  9. 3.2.0, due to the upgrade to ``glibc 2.24``. Specifically, for
  10. AArch64-based targets the version is 3.14. For Nios II-based targets,
  11. the minimum kernel version is 3.19.
  12. .. note::
  13. For x86 and x86_64, you can reset :term:`OLDEST_KERNEL`
  14. to anything down to 2.6.32 if desired.
  15. .. _migration-2.2-staging-directories-in-sysroot-simplified:
  16. Staging Directories in Sysroot Has Been Simplified
  17. --------------------------------------------------
  18. The way directories are staged in sysroot has been simplified and
  19. introduces the new :term:`SYSROOT_DIRS`,
  20. :term:`SYSROOT_DIRS_NATIVE`, and ``SYSROOT_DIRS_BLACKLIST``
  21. (replaced by :term:`SYSROOT_DIRS_IGNORE` in version 3.5). See the
  22. :oe_lists:`v2 patch series on the OE-Core Mailing List
  23. </pipermail/openembedded-core/2016-May/121365.html>`
  24. for additional information.
  25. .. _migration-2.2-removal-of-old-images-from-tmp-deploy-now-enabled:
  26. Removal of Old Images and Other Files in ``tmp/deploy`` Now Enabled
  27. -------------------------------------------------------------------
  28. Removal of old images and other files in ``tmp/deploy/`` is now enabled
  29. by default due to a new staging method used for those files. As a result
  30. of this change, the ``RM_OLD_IMAGE`` variable is now redundant.
  31. .. _migration-2.2-python-changes:
  32. Python Changes
  33. --------------
  34. The following changes for Python occurred:
  35. .. _migration-2.2-bitbake-now-requires-python-3.4:
  36. BitBake Now Requires Python 3.4+
  37. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38. BitBake requires Python 3.4 or greater.
  39. .. _migration-2.2-utf-8-locale-required-on-build-host:
  40. UTF-8 Locale Required on Build Host
  41. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. A UTF-8 locale is required on the build host due to Python 3. Since
  43. C.UTF-8 is not a standard, the default is en_US.UTF-8.
  44. .. _migration-2.2-metadata-now-must-use-python-3-syntax:
  45. Metadata Must Now Use Python 3 Syntax
  46. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  47. The metadata is now required to use Python 3 syntax. For help preparing
  48. metadata, see any of the many Python 3 porting guides available.
  49. Alternatively, you can reference the conversion commits for BitBake and
  50. you can use :term:`OpenEmbedded-Core (OE-Core)` as a guide for changes. Following are
  51. particular areas of interest:
  52. - subprocess command-line pipes needing locale decoding
  53. - the syntax for octal values changed
  54. - the ``iter*()`` functions changed name
  55. - iterators now return views, not lists
  56. - changed names for Python modules
  57. .. _migration-2.2-target-python-recipes-switched-to-python-3:
  58. Target Python Recipes Switched to Python 3
  59. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  60. Most target Python recipes have now been switched to Python 3.
  61. Unfortunately, systems using RPM as a package manager and providing
  62. online package-manager support through SMART still require Python 2.
  63. .. note::
  64. Python 2 and recipes that use it can still be built for the target as
  65. with previous versions.
  66. .. _migration-2.2-buildtools-tarball-includes-python-3:
  67. ``buildtools-tarball`` Includes Python 3
  68. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  69. ``buildtools-tarball`` now includes Python 3.
  70. .. _migration-2.2-uclibc-replaced-by-musl:
  71. uClibc Replaced by musl
  72. -----------------------
  73. uClibc has been removed in favor of musl. Musl has matured, is better
  74. maintained, and is compatible with a wider range of applications as
  75. compared to uClibc.
  76. .. _migration-2.2-B-no-longer-default-working-directory-for-tasks:
  77. ``${B}`` No Longer Default Working Directory for Tasks
  78. ------------------------------------------------------
  79. ``${``\ :term:`B`\ ``}`` is no longer the default working
  80. directory for tasks. Consequently, any custom tasks you define now need
  81. to either have the
  82. ``[``\ :ref:`dirs <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` flag
  83. set, or the task needs to change into the appropriate working directory
  84. manually (e.g using ``cd`` for a shell task).
  85. .. note::
  86. The preferred method is to use the
  87. [dirs]
  88. flag.
  89. .. _migration-2.2-runqemu-ported-to-python:
  90. ``runqemu`` Ported to Python
  91. ----------------------------
  92. ``runqemu`` has been ported to Python and has changed behavior in some
  93. cases. Previous usage patterns continue to be supported.
  94. The new ``runqemu`` is a Python script. Machine knowledge is no longer
  95. hardcoded into ``runqemu``. You can choose to use the ``qemuboot``
  96. configuration file to define the BSP's own arguments and to make it
  97. bootable with ``runqemu``. If you use a configuration file, use the
  98. following form::
  99. image-name-machine.qemuboot.conf
  100. The configuration file
  101. enables fine-grained tuning of options passed to QEMU without the
  102. ``runqemu`` script hard-coding any knowledge about different machines.
  103. Using a configuration file is particularly convenient when trying to use
  104. QEMU with machines other than the ``qemu*`` machines in
  105. :term:`OpenEmbedded-Core (OE-Core)`. The ``qemuboot.conf`` file is generated by the
  106. ``qemuboot`` class when the root filesystem is being built (i.e. build
  107. rootfs). QEMU boot arguments can be set in BSP's configuration file and
  108. the ``qemuboot`` class will save them to ``qemuboot.conf``.
  109. If you want to use ``runqemu`` without a configuration file, use the
  110. following command form::
  111. $ runqemu machine rootfs kernel [options]
  112. Supported machines are as follows:
  113. - qemuarm
  114. - qemuarm64
  115. - qemux86
  116. - qemux86-64
  117. - qemuppc
  118. - qemumips
  119. - qemumips64
  120. - qemumipsel
  121. - qemumips64el
  122. Consider the
  123. following example, which uses the ``qemux86-64`` machine, provides a
  124. root filesystem, provides an image, and uses the ``nographic`` option::
  125. $ runqemu qemux86-64 tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4 tmp/deploy/images/qemux86-64/bzImage nographic
  126. Following is a list of variables that can be set in configuration files
  127. such as ``bsp.conf`` to enable the BSP to be booted by ``runqemu``:
  128. .. note::
  129. "QB" means "QEMU Boot".
  130. ::
  131. QB_SYSTEM_NAME: QEMU name (e.g. "qemu-system-i386")
  132. QB_OPT_APPEND: Options to append to QEMU (e.g. "-show-cursor")
  133. QB_DEFAULT_KERNEL: Default kernel to boot (e.g. "bzImage")
  134. QB_DEFAULT_FSTYPE: Default FSTYPE to boot (e.g. "ext4")
  135. QB_MEM: Memory (e.g. "-m 512")
  136. QB_MACHINE: QEMU machine (e.g. "-machine virt")
  137. QB_CPU: QEMU cpu (e.g. "-cpu qemu32")
  138. QB_CPU_KVM: Similar to QB_CPU except used for kvm support (e.g. "-cpu kvm64")
  139. QB_KERNEL_CMDLINE_APPEND: Options to append to the kernel's -append
  140. option (e.g. "console=ttyS0 console=tty")
  141. QB_DTB: QEMU dtb name
  142. QB_AUDIO_DRV: QEMU audio driver (e.g. "alsa", set it when support audio)
  143. QB_AUDIO_OPT: QEMU audio option (e.g. "-soundhw ac97,es1370"), which is used
  144. when QB_AUDIO_DRV is set.
  145. QB_KERNEL_ROOT: Kernel's root (e.g. /dev/vda)
  146. QB_TAP_OPT: Network option for 'tap' mode (e.g.
  147. "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0").
  148. runqemu will replace "@TAP@" with the one that is used, such as tap0, tap1 ...
  149. QB_SLIRP_OPT: Network option for SLIRP mode (e.g. "-netdev user,id=net0 -device virtio-net-device,netdev=net0")
  150. QB_ROOTFS_OPT: Used as rootfs (e.g.
  151. "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0").
  152. runqemu will replace "@ROOTFS@" with the one which is used, such as
  153. core-image-minimal-qemuarm64.ext4.
  154. QB_SERIAL_OPT: Serial port (e.g. "-serial mon:stdio")
  155. QB_TCPSERIAL_OPT: tcp serial port option (e.g.
  156. " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
  157. runqemu will replace "@PORT@" with the port number which is used.
  158. To use ``runqemu``, set :term:`IMAGE_CLASSES` as
  159. follows and run ``runqemu``:
  160. .. note::
  161. For command-line syntax, use ``runqemu help``.
  162. ::
  163. IMAGE_CLASSES += "qemuboot"
  164. .. _migration-2.2-default-linker-hash-style-changed:
  165. Default Linker Hash Style Changed
  166. ---------------------------------
  167. The default linker hash style for ``gcc-cross`` is now "sysv" in order
  168. to catch recipes that are building software without using the
  169. OpenEmbedded :term:`LDFLAGS`. This change could result in
  170. seeing some "No GNU_HASH in the elf binary" QA issues when building such
  171. recipes. You need to fix these recipes so that they use the expected
  172. :term:`LDFLAGS`. Depending on how the software is built, the build system
  173. used by the software (e.g. a Makefile) might need to be patched.
  174. However, sometimes making this fix is as simple as adding the following
  175. to the recipe::
  176. TARGET_CC_ARCH += "${LDFLAGS}"
  177. .. _migration-2.2-kernel-image-base-name-no-longer-uses-kernel-imagetype:
  178. ``KERNEL_IMAGE_BASE_NAME`` no Longer Uses ``KERNEL_IMAGETYPE``
  179. --------------------------------------------------------------
  180. The ``KERNEL_IMAGE_BASE_NAME`` variable no longer uses the
  181. :term:`KERNEL_IMAGETYPE` variable to create the
  182. image's base name. Because the OpenEmbedded build system can now build
  183. multiple kernel image types, this part of the kernel image base name as
  184. been removed leaving only the following::
  185. KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
  186. If you have recipes or
  187. classes that use ``KERNEL_IMAGE_BASE_NAME`` directly, you might need to
  188. update the references to ensure they continue to work.
  189. .. _migration-2.2-imgdeploydir-replaces-deploy-dir-image-for-most-use-cases:
  190. ``IMGDEPLOYDIR`` Replaces ``DEPLOY_DIR_IMAGE`` for Most Use Cases
  191. -----------------------------------------------------------------
  192. The :term:`IMGDEPLOYDIR` variable was introduced to allow sstate caching of
  193. image creation results. Image recipes defining custom :term:`IMAGE_CMD` or
  194. doing postprocessing on the generated images need to be adapted to use
  195. :term:`IMGDEPLOYDIR` instead of :term:`DEPLOY_DIR_IMAGE`. :term:`IMAGE_MANIFEST`
  196. creation and symlinking of the most recent image file will fail otherwise.
  197. .. _migration-2.2-bitbake-changes:
  198. BitBake Changes
  199. ---------------
  200. The following changes took place for BitBake:
  201. - The "goggle" UI and standalone image-writer tool have been removed as
  202. they both require GTK+ 2.0 and were not being maintained.
  203. - The Perforce fetcher now supports :term:`SRCREV` for
  204. specifying the source revision to use, be it
  205. ``${``\ :term:`AUTOREV`\ ``}``, changelist number,
  206. p4date, or label, in preference to separate
  207. :term:`SRC_URI` parameters to specify these. This
  208. change is more in-line with how the other fetchers work for source
  209. control systems. Recipes that fetch from Perforce will need to be
  210. updated to use :term:`SRCREV` in place of specifying the source revision
  211. within :term:`SRC_URI`.
  212. - Some of BitBake's internal code structures for accessing the recipe
  213. cache needed to be changed to support the new multi-configuration
  214. functionality. These changes will affect external tools that use
  215. BitBake's tinfoil module. For information on these changes, see the
  216. changes made to the scripts supplied with OpenEmbedded-Core:
  217. :yocto_git:`1 </poky/commit/?id=189371f8393971d00bca0fceffd67cc07784f6ee>`
  218. and
  219. :yocto_git:`2 </poky/commit/?id=4a5aa7ea4d07c2c90a1654b174873abb018acc67>`.
  220. - The task management code has been rewritten to avoid using ID
  221. indirection in order to improve performance. This change is unlikely
  222. to cause any problems for most users. However, the setscene
  223. verification function as pointed to by
  224. ``BB_SETSCENE_VERIFY_FUNCTION`` needed to change signature.
  225. Consequently, a new variable named ``BB_SETSCENE_VERIFY_FUNCTION2``
  226. has been added allowing multiple versions of BitBake to work with
  227. suitably written metadata, which includes OpenEmbedded-Core and Poky.
  228. Anyone with custom BitBake task scheduler code might also need to
  229. update the code to handle the new structure.
  230. .. _migration-2.2-swabber-has-been-removed:
  231. Swabber has Been Removed
  232. ------------------------
  233. Swabber, a tool that was intended to detect host contamination in the
  234. build process, has been removed, as it has been unmaintained and unused
  235. for some time and was never particularly effective. The OpenEmbedded
  236. build system has since incorporated a number of mechanisms including
  237. enhanced QA checks that mean that there is less of a need for such a
  238. tool.
  239. .. _migration-2.2-removed-recipes:
  240. Removed Recipes
  241. ---------------
  242. The following recipes have been removed:
  243. - ``augeas``: No longer needed and has been moved to ``meta-oe``.
  244. - ``directfb``: Unmaintained and has been moved to ``meta-oe``.
  245. - ``gcc``: Removed 4.9 version. Versions 5.4 and 6.2 are still present.
  246. - ``gnome-doc-utils``: No longer needed.
  247. - ``gtk-doc-stub``: Replaced by ``gtk-doc``.
  248. - ``gtk-engines``: No longer needed and has been moved to
  249. ``meta-gnome``.
  250. - ``gtk-sato-engine``: Became obsolete.
  251. - ``libglade``: No longer needed and has been moved to ``meta-oe``.
  252. - ``libmad``: Unmaintained and functionally replaced by ``libmpg123``.
  253. ``libmad`` has been moved to ``meta-oe``.
  254. - ``libowl``: Became obsolete.
  255. - ``libxsettings-client``: No longer needed.
  256. - ``oh-puzzles``: Functionally replaced by ``puzzles``.
  257. - ``oprofileui``: Became obsolete. OProfile has been largely supplanted
  258. by perf.
  259. - ``packagegroup-core-directfb.bb``: Removed.
  260. - ``core-image-directfb.bb``: Removed.
  261. - ``pointercal``: No longer needed and has been moved to ``meta-oe``.
  262. - ``python-imaging``: No longer needed and moved to ``meta-python``
  263. - ``python-pyrex``: No longer needed and moved to ``meta-python``.
  264. - ``sato-icon-theme``: Became obsolete.
  265. - ``swabber-native``: Swabber has been removed. See the :ref:`entry on
  266. Swabber <migration-guides/migration-2.2:swabber has been removed>`.
  267. - ``tslib``: No longer needed and has been moved to ``meta-oe``.
  268. - ``uclibc``: Removed in favor of musl.
  269. - ``xtscal``: No longer needed and moved to ``meta-oe``
  270. .. _migration-2.2-removed-classes:
  271. Removed Classes
  272. ---------------
  273. The following classes have been removed:
  274. - ``distutils-native-base``: No longer needed.
  275. - ``distutils3-native-base``: No longer needed.
  276. - ``sdl``: Only set :term:`DEPENDS` and
  277. :term:`SECTION`, which are better set within the
  278. recipe instead.
  279. - ``sip``: Mostly unused.
  280. - ``swabber``: See the :ref:`entry on
  281. Swabber <migration-guides/migration-2.2:swabber has been removed>`.
  282. .. _migration-2.2-minor-packaging-changes:
  283. Minor Packaging Changes
  284. -----------------------
  285. The following minor packaging changes have occurred:
  286. - ``grub``: Split ``grub-editenv`` into its own package.
  287. - ``systemd``: Split container and vm related units into a new package,
  288. systemd-container.
  289. - ``util-linux``: Moved ``prlimit`` to a separate
  290. ``util-linux-prlimit`` package.
  291. .. _migration-2.2-miscellaneous-changes:
  292. Miscellaneous Changes
  293. ---------------------
  294. The following miscellaneous changes have occurred:
  295. - ``package_regex.inc``: Removed because the definitions
  296. ``package_regex.inc`` previously contained have been moved to their
  297. respective recipes.
  298. - Both ``devtool add`` and ``recipetool create`` now use a fixed
  299. :term:`SRCREV` by default when fetching from a Git
  300. repository. You can override this in either case to use
  301. ``${``\ :term:`AUTOREV`\ ``}`` instead by using the
  302. ``-a`` or ``--autorev`` command-line option
  303. - ``distcc``: GTK+ UI is now disabled by default.
  304. - ``packagegroup-core-tools-testapps``: Removed Piglit.
  305. - :ref:`ref-classes-image`: Renamed COMPRESS(ION) to CONVERSION. This change
  306. means that ``COMPRESSIONTYPES``, ``COMPRESS_DEPENDS`` and
  307. ``COMPRESS_CMD`` are deprecated in favor of ``CONVERSIONTYPES``,
  308. ``CONVERSION_DEPENDS`` and ``CONVERSION_CMD``. The ``COMPRESS*``
  309. variable names will still work in the 2.2 release but metadata that
  310. does not need to be backwards-compatible should be changed to use the
  311. new names as the ``COMPRESS*`` ones will be removed in a future
  312. release.
  313. - ``gtk-doc``: A full version of ``gtk-doc`` is now made available.
  314. However, some old software might not be capable of using the current
  315. version of ``gtk-doc`` to build documentation. You need to change
  316. recipes that build such software so that they explicitly disable
  317. building documentation with ``gtk-doc``.