diff options
Diffstat (limited to 'documentation/ref-manual/ref-classes.rst')
| -rw-r--r-- | documentation/ref-manual/ref-classes.rst | 436 |
1 files changed, 258 insertions, 178 deletions
diff --git a/documentation/ref-manual/ref-classes.rst b/documentation/ref-manual/ref-classes.rst index ace69e15a7..60ce8efd21 100644 --- a/documentation/ref-manual/ref-classes.rst +++ b/documentation/ref-manual/ref-classes.rst | |||
| @@ -47,7 +47,7 @@ splitting out of debug symbols during packaging). | |||
| 47 | even if the recipes do not produce architecture-specific output. | 47 | even if the recipes do not produce architecture-specific output. |
| 48 | 48 | ||
| 49 | Configuring such recipes for all architectures causes the | 49 | Configuring such recipes for all architectures causes the |
| 50 | ```do_package_write_*`` <#ref-tasks-package_write_deb>`__ tasks to | 50 | ```do_package_write_*`` tasks to |
| 51 | have different signatures for the machines with different tunings. | 51 | have different signatures for the machines with different tunings. |
| 52 | Additionally, unnecessary rebuilds occur every time an image for a | 52 | Additionally, unnecessary rebuilds occur every time an image for a |
| 53 | different ``MACHINE`` is built even when the recipe never changes. | 53 | different ``MACHINE`` is built even when the recipe never changes. |
| @@ -67,9 +67,8 @@ inherit the ``allarch`` class. | |||
| 67 | The ``archiver`` class supports releasing source code and other | 67 | The ``archiver`` class supports releasing source code and other |
| 68 | materials with the binaries. | 68 | materials with the binaries. |
| 69 | 69 | ||
| 70 | For more details on the source archiver, see the "`Maintaining Open | 70 | For more details on the source archiver, see the |
| 71 | Source License Compliance During Your Product's | 71 | ":ref:`dev-manual/dev-manual-common-tasks:maintaining open source license compliance during your product's lifecycle`" |
| 72 | Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__" | ||
| 73 | section in the Yocto Project Development Tasks Manual. You can also see | 72 | section in the Yocto Project Development Tasks Manual. You can also see |
| 74 | the :term:`ARCHIVER_MODE` variable for information | 73 | the :term:`ARCHIVER_MODE` variable for information |
| 75 | about the variable flags (varflags) that help control archive creation. | 74 | about the variable flags (varflags) that help control archive creation. |
| @@ -86,8 +85,8 @@ standardization. This class defines a set of tasks (e.g. ``configure``, | |||
| 86 | ``compile`` and so forth) that work for all Autotooled packages. It | 85 | ``compile`` and so forth) that work for all Autotooled packages. It |
| 87 | should usually be enough to define a few standard variables and then | 86 | should usually be enough to define a few standard variables and then |
| 88 | simply ``inherit autotools``. These classes can also work with software | 87 | simply ``inherit autotools``. These classes can also work with software |
| 89 | that emulates Autotools. For more information, see the "`Autotooled | 88 | that emulates Autotools. For more information, see the |
| 90 | Package <&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package>`__" section | 89 | ":ref:`new-recipe-autotooled-package`" section |
| 91 | in the Yocto Project Development Tasks Manual. | 90 | in the Yocto Project Development Tasks Manual. |
| 92 | 91 | ||
| 93 | By default, the ``autotools*`` classes use out-of-tree builds (i.e. | 92 | By default, the ``autotools*`` classes use out-of-tree builds (i.e. |
| @@ -177,7 +176,7 @@ example use for this class. | |||
| 177 | :: | 176 | :: |
| 178 | 177 | ||
| 179 | SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}" | 178 | SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}" |
| 180 | 179 | ||
| 181 | 180 | ||
| 182 | See the " | 181 | See the " |
| 183 | Fetchers | 182 | Fetchers |
| @@ -229,8 +228,10 @@ value as a variable flag (varflag) and provide a reason, which is | |||
| 229 | reported, if the package is requested to be built as the value. For | 228 | reported, if the package is requested to be built as the value. For |
| 230 | example, if you want to blacklist a recipe called "exoticware", you add | 229 | example, if you want to blacklist a recipe called "exoticware", you add |
| 231 | the following to your ``local.conf`` or distribution configuration: | 230 | the following to your ``local.conf`` or distribution configuration: |
| 232 | INHERIT += "blacklist" PNBLACKLIST[exoticware] = "Not supported by our | 231 | :: |
| 233 | organization." | 232 | |
| 233 | INHERIT += "blacklist" | ||
| 234 | PNBLACKLIST[exoticware] = "Not supported by our organization." | ||
| 234 | 235 | ||
| 235 | .. _ref-classes-buildhistory: | 236 | .. _ref-classes-buildhistory: |
| 236 | 237 | ||
| @@ -240,8 +241,8 @@ organization." | |||
| 240 | The ``buildhistory`` class records a history of build output metadata, | 241 | The ``buildhistory`` class records a history of build output metadata, |
| 241 | which can be used to detect possible regressions as well as used for | 242 | which can be used to detect possible regressions as well as used for |
| 242 | analysis of the build output. For more information on using Build | 243 | analysis of the build output. For more information on using Build |
| 243 | History, see the "`Maintaining Build Output | 244 | History, see the |
| 244 | Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__" | 245 | ":ref:`dev-manual/dev-manual-common-tasks:maintaining build output quality`" |
| 245 | section in the Yocto Project Development Tasks Manual. | 246 | section in the Yocto Project Development Tasks Manual. |
| 246 | 247 | ||
| 247 | .. _ref-classes-buildstats: | 248 | .. _ref-classes-buildstats: |
| @@ -411,8 +412,7 @@ cross-compilation tools. | |||
| 411 | 412 | ||
| 412 | The ``cross-canadian`` class provides support for the recipes that build | 413 | The ``cross-canadian`` class provides support for the recipes that build |
| 413 | the Canadian Cross-compilation tools for SDKs. See the | 414 | the Canadian Cross-compilation tools for SDKs. See the |
| 414 | "`Cross-Development Toolchain | 415 | ":ref:`overview-manual/overview-manual-concepts:cross-development toolchain generation`" |
| 415 | Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__" | ||
| 416 | section in the Yocto Project Overview and Concepts Manual for more | 416 | section in the Yocto Project Overview and Concepts Manual for more |
| 417 | discussion on these cross-compilation tools. | 417 | discussion on these cross-compilation tools. |
| 418 | 418 | ||
| @@ -423,8 +423,7 @@ discussion on these cross-compilation tools. | |||
| 423 | 423 | ||
| 424 | The ``crosssdk`` class provides support for the recipes that build the | 424 | The ``crosssdk`` class provides support for the recipes that build the |
| 425 | cross-compilation tools used for building SDKs. See the | 425 | cross-compilation tools used for building SDKs. See the |
| 426 | "`Cross-Development Toolchain | 426 | ":ref:`overview-manual/overview-manual-concepts:cross-development toolchain generation`" |
| 427 | Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__" | ||
| 428 | section in the Yocto Project Overview and Concepts Manual for more | 427 | section in the Yocto Project Overview and Concepts Manual for more |
| 429 | discussion on these cross-compilation tools. | 428 | discussion on these cross-compilation tools. |
| 430 | 429 | ||
| @@ -465,8 +464,7 @@ staging the files from ``DEPLOYDIR`` to ``DEPLOY_DIR_IMAGE``. | |||
| 465 | ==================== | 464 | ==================== |
| 466 | 465 | ||
| 467 | The ``devshell`` class adds the ``do_devshell`` task. Distribution | 466 | The ``devshell`` class adds the ``do_devshell`` task. Distribution |
| 468 | policy dictates whether to include this class. See the "`Using a | 467 | policy dictates whether to include this class. See the ":ref:`platdev-appdev-devshell`" |
| 469 | Development Shell <&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell>`__" | ||
| 470 | section in the Yocto Project Development Tasks Manual for more | 468 | section in the Yocto Project Development Tasks Manual for more |
| 471 | information about using ``devshell``. | 469 | information about using ``devshell``. |
| 472 | 470 | ||
| @@ -478,16 +476,26 @@ information about using ``devshell``. | |||
| 478 | The ``devupstream`` class uses | 476 | The ``devupstream`` class uses |
| 479 | :term:`BBCLASSEXTEND` to add a variant of the | 477 | :term:`BBCLASSEXTEND` to add a variant of the |
| 480 | recipe that fetches from an alternative URI (e.g. Git) instead of a | 478 | recipe that fetches from an alternative URI (e.g. Git) instead of a |
| 481 | tarball. Following is an example: BBCLASSEXTEND = "devupstream:target" | 479 | tarball. Following is an example: |
| 482 | SRC_URI_class-devupstream = "git://git.example.com/example" | 480 | :: |
| 483 | SRCREV_class-devupstream = "abcd1234" Adding the above statements to | 481 | |
| 484 | your recipe creates a variant that has | 482 | BBCLASSEXTEND = "devupstream:target" |
| 483 | SRC_URI_class-devupstream = "git://git.example.com/example" | ||
| 484 | SRCREV_class-devupstream = "abcd1234" | ||
| 485 | |||
| 486 | Adding the above statements to your recipe creates a variant that has | ||
| 485 | :term:`DEFAULT_PREFERENCE` set to "-1". | 487 | :term:`DEFAULT_PREFERENCE` set to "-1". |
| 486 | Consequently, you need to select the variant of the recipe to use it. | 488 | Consequently, you need to select the variant of the recipe to use it. |
| 487 | Any development-specific adjustments can be done by using the | 489 | Any development-specific adjustments can be done by using the |
| 488 | ``class-devupstream`` override. Here is an example: | 490 | ``class-devupstream`` override. Here is an example: |
| 489 | DEPENDS_append_class-devupstream = " gperf-native" | 491 | :: |
| 490 | do_configure_prepend_class-devupstream() { touch ${S}/README } The class | 492 | |
| 493 | DEPENDS_append_class-devupstream = " gperf-native" | ||
| 494 | do_configure_prepend_class-devupstream() { | ||
| 495 | touch ${S}/README | ||
| 496 | } | ||
| 497 | |||
| 498 | The class | ||
| 491 | currently only supports creating a development variant of the target | 499 | currently only supports creating a development variant of the target |
| 492 | recipe, not ``native`` or ``nativesdk`` variants. | 500 | recipe, not ``native`` or ``nativesdk`` variants. |
| 493 | 501 | ||
| @@ -587,15 +595,19 @@ that use the :term:`B` variable to point to the directory in | |||
| 587 | which the OpenEmbedded build system places the generated objects built | 595 | which the OpenEmbedded build system places the generated objects built |
| 588 | from the recipes. By default, the ``B`` directory is set to the | 596 | from the recipes. By default, the ``B`` directory is set to the |
| 589 | following, which is separate from the source directory (``S``): | 597 | following, which is separate from the source directory (``S``): |
| 590 | ${WORKDIR}/${BPN}/{PV}/ See these variables for more information: | 598 | :: |
| 599 | |||
| 600 | ${WORKDIR}/${BPN}/{PV}/ | ||
| 601 | |||
| 602 | See these variables for more information: | ||
| 591 | :term:`WORKDIR`, :term:`BPN`, and | 603 | :term:`WORKDIR`, :term:`BPN`, and |
| 592 | :term:`PV`, | 604 | :term:`PV`, |
| 593 | 605 | ||
| 594 | For more information on the ``externalsrc`` class, see the comments in | 606 | For more information on the ``externalsrc`` class, see the comments in |
| 595 | ``meta/classes/externalsrc.bbclass`` in the :term:`Source Directory`. | 607 | ``meta/classes/externalsrc.bbclass`` in the :term:`Source Directory`. |
| 596 | For information on how to use the | 608 | For information on how to use the |
| 597 | ``externalsrc`` class, see the "`Building Software from an External | 609 | ``externalsrc`` class, see the |
| 598 | Source <&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source>`__" | 610 | ":ref:`dev-manual/dev-manual-common-tasks:building software from an external source`" |
| 599 | section in the Yocto Project Development Tasks Manual. | 611 | section in the Yocto Project Development Tasks Manual. |
| 600 | 612 | ||
| 601 | .. _ref-classes-extrausers: | 613 | .. _ref-classes-extrausers: |
| @@ -619,15 +631,36 @@ be performed using the | |||
| 619 | useradd | 631 | useradd |
| 620 | class to add user and group configuration to a specific recipe. | 632 | class to add user and group configuration to a specific recipe. |
| 621 | 633 | ||
| 622 | Here is an example that uses this class in an image recipe: inherit | 634 | Here is an example that uses this class in an image recipe: |
| 623 | extrausers EXTRA_USERS_PARAMS = "\\ useradd -p '' tester; \\ groupadd | 635 | :: |
| 624 | developers; \\ userdel nobody; \\ groupdel -g video; \\ groupmod -g 1020 | 636 | |
| 625 | developers; \\ usermod -s /bin/sh tester; \\ " Here is an example that | 637 | inherit extrausers |
| 626 | adds two users named "tester-jim" and "tester-sue" and assigns | 638 | EXTRA_USERS_PARAMS = "\ |
| 627 | passwords: inherit extrausers EXTRA_USERS_PARAMS = "\\ useradd -P | 639 | useradd -p '' tester; \ |
| 628 | tester01 tester-jim; \\ useradd -P tester01 tester-sue; \\ " Finally, | 640 | groupadd developers; \ |
| 629 | here is an example that sets the root password to "1876*18": inherit | 641 | userdel nobody; \ |
| 630 | extrausers EXTRA_USERS_PARAMS = "\\ usermod -P 1876*18 root; \\ " | 642 | groupdel -g video; \ |
| 643 | groupmod -g 1020 developers; \ | ||
| 644 | usermod -s /bin/sh tester; \ | ||
| 645 | " | ||
| 646 | |||
| 647 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns | ||
| 648 | passwords: | ||
| 649 | :: | ||
| 650 | |||
| 651 | inherit extrausers | ||
| 652 | EXTRA_USERS_PARAMS = "\ | ||
| 653 | useradd -P tester01 tester-jim; \ | ||
| 654 | useradd -P tester01 tester-sue; \ | ||
| 655 | " | ||
| 656 | |||
| 657 | Finally, here is an example that sets the root password to "1876*18": | ||
| 658 | :: | ||
| 659 | |||
| 660 | inherit extrausers | ||
| 661 | EXTRA_USERS_PARAMS = "\ | ||
| 662 | usermod -P 1876*18 root; \ | ||
| 663 | " | ||
| 631 | 664 | ||
| 632 | .. _ref-classes-fontcache: | 665 | .. _ref-classes-fontcache: |
| 633 | 666 | ||
| @@ -837,8 +870,7 @@ provided by the recipe ``icecc-create-env-native.bb``. | |||
| 837 | .. note:: | 870 | .. note:: |
| 838 | 871 | ||
| 839 | This script is a modified version and not the one that comes with | 872 | This script is a modified version and not the one that comes with |
| 840 | icecc | 873 | icecc. |
| 841 | . | ||
| 842 | 874 | ||
| 843 | If you do not want the Icecream distributed compile support to apply to | 875 | If you do not want the Icecream distributed compile support to apply to |
| 844 | specific recipes or classes, you can effectively "blacklist" them by | 876 | specific recipes or classes, you can effectively "blacklist" them by |
| @@ -863,10 +895,18 @@ At the distribution level, you can inherit the ``icecc`` class to be | |||
| 863 | sure that all builders start with the same sstate signatures. After | 895 | sure that all builders start with the same sstate signatures. After |
| 864 | inheriting the class, you can then disable the feature by setting the | 896 | inheriting the class, you can then disable the feature by setting the |
| 865 | :term:`ICECC_DISABLED` variable to "1" as follows: | 897 | :term:`ICECC_DISABLED` variable to "1" as follows: |
| 866 | INHERIT_DISTRO_append = " icecc" ICECC_DISABLED ??= "1" This practice | 898 | :: |
| 899 | |||
| 900 | INHERIT_DISTRO_append = " icecc" | ||
| 901 | ICECC_DISABLED ??= "1" | ||
| 902 | |||
| 903 | This practice | ||
| 867 | makes sure everyone is using the same signatures but also requires | 904 | makes sure everyone is using the same signatures but also requires |
| 868 | individuals that do want to use Icecream to enable the feature | 905 | individuals that do want to use Icecream to enable the feature |
| 869 | individually as follows in your ``local.conf`` file: ICECC_DISABLED = "" | 906 | individually as follows in your ``local.conf`` file: |
| 907 | :: | ||
| 908 | |||
| 909 | ICECC_DISABLED = "" | ||
| 870 | 910 | ||
| 871 | .. _ref-classes-image: | 911 | .. _ref-classes-image: |
| 872 | 912 | ||
| @@ -884,11 +924,11 @@ then one or more image files are created. | |||
| 884 | - The ``IMAGE_INSTALL`` variable controls the list of packages to | 924 | - The ``IMAGE_INSTALL`` variable controls the list of packages to |
| 885 | install into the image. | 925 | install into the image. |
| 886 | 926 | ||
| 887 | For information on customizing images, see the "`Customizing | 927 | For information on customizing images, see the |
| 888 | Images <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage>`__" section | 928 | ":ref:`usingpoky-extend-customimage`" section |
| 889 | in the Yocto Project Development Tasks Manual. For information on how | 929 | in the Yocto Project Development Tasks Manual. For information on how |
| 890 | images are created, see the | 930 | images are created, see the |
| 891 | "`Images <&YOCTO_DOCS_OM_URL;#images-dev-environment>`__" section in the | 931 | ":ref:`images-dev-environment`" section in the |
| 892 | Yocto Project Overview and Concpets Manual. | 932 | Yocto Project Overview and Concpets Manual. |
| 893 | 933 | ||
| 894 | .. _ref-classes-image-buildinfo: | 934 | .. _ref-classes-image-buildinfo: |
| @@ -912,19 +952,19 @@ types. | |||
| 912 | 952 | ||
| 913 | By default, the :ref:`image <ref-classes-image>` class automatically | 953 | By default, the :ref:`image <ref-classes-image>` class automatically |
| 914 | enables the ``image_types`` class. The ``image`` class uses the | 954 | enables the ``image_types`` class. The ``image`` class uses the |
| 915 | ``IMGCLASSES`` variable as follows: IMGCLASSES = | 955 | ``IMGCLASSES`` variable as follows: |
| 916 | "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" IMGCLASSES += | 956 | :: |
| 917 | "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in | 957 | |
| 918 | d.getVar("SDK_OS")]}" IMGCLASSES += | 958 | IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" |
| 919 | "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', | 959 | IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}" |
| 920 | 'image-live', '', d)}" IMGCLASSES += | 960 | IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}" |
| 921 | "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', | 961 | IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}" |
| 922 | '', d)}" IMGCLASSES += "image_types_wic" IMGCLASSES += | 962 | IMGCLASSES += "image_types_wic" |
| 923 | "rootfs-postcommands" IMGCLASSES += "image-postinst-intercepts" inherit | 963 | IMGCLASSES += "rootfs-postcommands" |
| 924 | ${IMGCLASSES} | 964 | IMGCLASSES += "image-postinst-intercepts" |
| 925 | 965 | inherit ${IMGCLASSES} | |
| 926 | The ``image_types`` class also handles conversion and compression of | 966 | |
| 927 | images. | 967 | The ``image_types`` class also handles conversion and compression of images. |
| 928 | 968 | ||
| 929 | .. note:: | 969 | .. note:: |
| 930 | 970 | ||
| @@ -957,7 +997,9 @@ the size of libraries contained in the image. | |||
| 957 | 997 | ||
| 958 | By default, the class is enabled in the ``local.conf.template`` using | 998 | By default, the class is enabled in the ``local.conf.template`` using |
| 959 | the :term:`USER_CLASSES` variable as follows: | 999 | the :term:`USER_CLASSES` variable as follows: |
| 960 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" | 1000 | :: |
| 1001 | |||
| 1002 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" | ||
| 961 | 1003 | ||
| 962 | .. _ref-classes-image-prelink: | 1004 | .. _ref-classes-image-prelink: |
| 963 | 1005 | ||
| @@ -971,7 +1013,9 @@ time. | |||
| 971 | 1013 | ||
| 972 | By default, the class is enabled in the ``local.conf.template`` using | 1014 | By default, the class is enabled in the ``local.conf.template`` using |
| 973 | the :term:`USER_CLASSES` variable as follows: | 1015 | the :term:`USER_CLASSES` variable as follows: |
| 974 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" | 1016 | :: |
| 1017 | |||
| 1018 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" | ||
| 975 | 1019 | ||
| 976 | .. _ref-classes-insane: | 1020 | .. _ref-classes-insane: |
| 977 | 1021 | ||
| @@ -1000,32 +1044,36 @@ should use :term:`INSANE_SKIP`. For example, to skip | |||
| 1000 | the check for symbolic link ``.so`` files in the main package of a | 1044 | the check for symbolic link ``.so`` files in the main package of a |
| 1001 | recipe, add the following to the recipe. You need to realize that the | 1045 | recipe, add the following to the recipe. You need to realize that the |
| 1002 | package name override, in this example ``${PN}``, must be used: | 1046 | package name override, in this example ``${PN}``, must be used: |
| 1003 | INSANE_SKIP_${PN} += "dev-so" Please keep in mind that the QA checks | 1047 | :: |
| 1048 | |||
| 1049 | INSANE_SKIP_${PN} += "dev-so" | ||
| 1050 | |||
| 1051 | Please keep in mind that the QA checks | ||
| 1004 | exist in order to detect real or potential problems in the packaged | 1052 | exist in order to detect real or potential problems in the packaged |
| 1005 | output. So exercise caution when disabling these checks. | 1053 | output. So exercise caution when disabling these checks. |
| 1006 | 1054 | ||
| 1007 | The following list shows the tests you can list with the ``WARN_QA`` and | 1055 | The following list shows the tests you can list with the ``WARN_QA`` and |
| 1008 | ``ERROR_QA`` variables: | 1056 | ``ERROR_QA`` variables: |
| 1009 | 1057 | ||
| 1010 | - *``already-stripped:``* Checks that produced binaries have not | 1058 | - ``already-stripped:`` Checks that produced binaries have not |
| 1011 | already been stripped prior to the build system extracting debug | 1059 | already been stripped prior to the build system extracting debug |
| 1012 | symbols. It is common for upstream software projects to default to | 1060 | symbols. It is common for upstream software projects to default to |
| 1013 | stripping debug symbols for output binaries. In order for debugging | 1061 | stripping debug symbols for output binaries. In order for debugging |
| 1014 | to work on the target using ``-dbg`` packages, this stripping must be | 1062 | to work on the target using ``-dbg`` packages, this stripping must be |
| 1015 | disabled. | 1063 | disabled. |
| 1016 | 1064 | ||
| 1017 | - *``arch:``* Checks the Executable and Linkable Format (ELF) type, bit | 1065 | - ``arch:`` Checks the Executable and Linkable Format (ELF) type, bit |
| 1018 | size, and endianness of any binaries to ensure they match the target | 1066 | size, and endianness of any binaries to ensure they match the target |
| 1019 | architecture. This test fails if any binaries do not match the type | 1067 | architecture. This test fails if any binaries do not match the type |
| 1020 | since there would be an incompatibility. The test could indicate that | 1068 | since there would be an incompatibility. The test could indicate that |
| 1021 | the wrong compiler or compiler options have been used. Sometimes | 1069 | the wrong compiler or compiler options have been used. Sometimes |
| 1022 | software, like bootloaders, might need to bypass this check. | 1070 | software, like bootloaders, might need to bypass this check. |
| 1023 | 1071 | ||
| 1024 | - *``buildpaths:``* Checks for paths to locations on the build host | 1072 | - ``buildpaths:`` Checks for paths to locations on the build host |
| 1025 | inside the output files. Currently, this test triggers too many false | 1073 | inside the output files. Currently, this test triggers too many false |
| 1026 | positives and thus is not normally enabled. | 1074 | positives and thus is not normally enabled. |
| 1027 | 1075 | ||
| 1028 | - *``build-deps:``* Determines if a build-time dependency that is | 1076 | - ``build-deps:`` Determines if a build-time dependency that is |
| 1029 | specified through :term:`DEPENDS`, explicit | 1077 | specified through :term:`DEPENDS`, explicit |
| 1030 | :term:`RDEPENDS`, or task-level dependencies exists | 1078 | :term:`RDEPENDS`, or task-level dependencies exists |
| 1031 | to match any runtime dependency. This determination is particularly | 1079 | to match any runtime dependency. This determination is particularly |
| @@ -1045,20 +1093,20 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1045 | ``initscripts`` recipe is actually built and thus the | 1093 | ``initscripts`` recipe is actually built and thus the |
| 1046 | ``initscripts-functions`` package is made available. | 1094 | ``initscripts-functions`` package is made available. |
| 1047 | 1095 | ||
| 1048 | - *``compile-host-path:``* Checks the | 1096 | - ``compile-host-path:`` Checks the |
| 1049 | :ref:`ref-tasks-compile` log for indications that | 1097 | :ref:`ref-tasks-compile` log for indications that |
| 1050 | paths to locations on the build host were used. Using such paths | 1098 | paths to locations on the build host were used. Using such paths |
| 1051 | might result in host contamination of the build output. | 1099 | might result in host contamination of the build output. |
| 1052 | 1100 | ||
| 1053 | - *``debug-deps:``* Checks that all packages except ``-dbg`` packages | 1101 | - ``debug-deps:`` Checks that all packages except ``-dbg`` packages |
| 1054 | do not depend on ``-dbg`` packages, which would cause a packaging | 1102 | do not depend on ``-dbg`` packages, which would cause a packaging |
| 1055 | bug. | 1103 | bug. |
| 1056 | 1104 | ||
| 1057 | - *``debug-files:``* Checks for ``.debug`` directories in anything but | 1105 | - ``debug-files:`` Checks for ``.debug`` directories in anything but |
| 1058 | the ``-dbg`` package. The debug files should all be in the ``-dbg`` | 1106 | the ``-dbg`` package. The debug files should all be in the ``-dbg`` |
| 1059 | package. Thus, anything packaged elsewhere is incorrect packaging. | 1107 | package. Thus, anything packaged elsewhere is incorrect packaging. |
| 1060 | 1108 | ||
| 1061 | - *``dep-cmp:``* Checks for invalid version comparison statements in | 1109 | - ``dep-cmp:`` Checks for invalid version comparison statements in |
| 1062 | runtime dependency relationships between packages (i.e. in | 1110 | runtime dependency relationships between packages (i.e. in |
| 1063 | :term:`RDEPENDS`, | 1111 | :term:`RDEPENDS`, |
| 1064 | :term:`RRECOMMENDS`, | 1112 | :term:`RRECOMMENDS`, |
| @@ -1069,22 +1117,22 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1069 | comparisons might trigger failures or undesirable behavior when | 1117 | comparisons might trigger failures or undesirable behavior when |
| 1070 | passed to the package manager. | 1118 | passed to the package manager. |
| 1071 | 1119 | ||
| 1072 | - *``desktop:``* Runs the ``desktop-file-validate`` program against any | 1120 | - ``desktop:`` Runs the ``desktop-file-validate`` program against any |
| 1073 | ``.desktop`` files to validate their contents against the | 1121 | ``.desktop`` files to validate their contents against the |
| 1074 | specification for ``.desktop`` files. | 1122 | specification for ``.desktop`` files. |
| 1075 | 1123 | ||
| 1076 | - *``dev-deps:``* Checks that all packages except ``-dev`` or | 1124 | - ``dev-deps:`` Checks that all packages except ``-dev`` or |
| 1077 | ``-staticdev`` packages do not depend on ``-dev`` packages, which | 1125 | ``-staticdev`` packages do not depend on ``-dev`` packages, which |
| 1078 | would be a packaging bug. | 1126 | would be a packaging bug. |
| 1079 | 1127 | ||
| 1080 | - *``dev-so:``* Checks that the ``.so`` symbolic links are in the | 1128 | - ``dev-so:`` Checks that the ``.so`` symbolic links are in the |
| 1081 | ``-dev`` package and not in any of the other packages. In general, | 1129 | ``-dev`` package and not in any of the other packages. In general, |
| 1082 | these symlinks are only useful for development purposes. Thus, the | 1130 | these symlinks are only useful for development purposes. Thus, the |
| 1083 | ``-dev`` package is the correct location for them. Some very rare | 1131 | ``-dev`` package is the correct location for them. Some very rare |
| 1084 | cases do exist for dynamically loaded modules where these symlinks | 1132 | cases do exist for dynamically loaded modules where these symlinks |
| 1085 | are needed instead in the main package. | 1133 | are needed instead in the main package. |
| 1086 | 1134 | ||
| 1087 | - *``file-rdeps:``* Checks that file-level dependencies identified by | 1135 | - ``file-rdeps:`` Checks that file-level dependencies identified by |
| 1088 | the OpenEmbedded build system at packaging time are satisfied. For | 1136 | the OpenEmbedded build system at packaging time are satisfied. For |
| 1089 | example, a shell script might start with the line ``#!/bin/bash``. | 1137 | example, a shell script might start with the line ``#!/bin/bash``. |
| 1090 | This line would translate to a file dependency on ``/bin/bash``. Of | 1138 | This line would translate to a file dependency on ``/bin/bash``. Of |
| @@ -1097,10 +1145,10 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1097 | :term:`RDEPENDS` exist to handle any file-level | 1145 | :term:`RDEPENDS` exist to handle any file-level |
| 1098 | dependency detected in packaged files. | 1146 | dependency detected in packaged files. |
| 1099 | 1147 | ||
| 1100 | - *``files-invalid:``* Checks for :term:`FILES` variable | 1148 | - ``files-invalid:`` Checks for :term:`FILES` variable |
| 1101 | values that contain "//", which is invalid. | 1149 | values that contain "//", which is invalid. |
| 1102 | 1150 | ||
| 1103 | - *``host-user-contaminated:``* Checks that no package produced by the | 1151 | - ``host-user-contaminated:`` Checks that no package produced by the |
| 1104 | recipe contains any files outside of ``/home`` with a user or group | 1152 | recipe contains any files outside of ``/home`` with a user or group |
| 1105 | ID that matches the user running BitBake. A match usually indicates | 1153 | ID that matches the user running BitBake. A match usually indicates |
| 1106 | that the files are being installed with an incorrect UID/GID, since | 1154 | that the files are being installed with an incorrect UID/GID, since |
| @@ -1108,16 +1156,16 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1108 | see the section describing the | 1156 | see the section describing the |
| 1109 | :ref:`ref-tasks-install` task. | 1157 | :ref:`ref-tasks-install` task. |
| 1110 | 1158 | ||
| 1111 | - *``incompatible-license:``* Report when packages are excluded from | 1159 | - ``incompatible-license:`` Report when packages are excluded from |
| 1112 | being created due to being marked with a license that is in | 1160 | being created due to being marked with a license that is in |
| 1113 | :term:`INCOMPATIBLE_LICENSE`. | 1161 | :term:`INCOMPATIBLE_LICENSE`. |
| 1114 | 1162 | ||
| 1115 | - *``install-host-path:``* Checks the | 1163 | - ``install-host-path:`` Checks the |
| 1116 | :ref:`ref-tasks-install` log for indications that | 1164 | :ref:`ref-tasks-install` log for indications that |
| 1117 | paths to locations on the build host were used. Using such paths | 1165 | paths to locations on the build host were used. Using such paths |
| 1118 | might result in host contamination of the build output. | 1166 | might result in host contamination of the build output. |
| 1119 | 1167 | ||
| 1120 | - *``installed-vs-shipped:``* Reports when files have been installed | 1168 | - ``installed-vs-shipped:`` Reports when files have been installed |
| 1121 | within ``do_install`` but have not been included in any package by | 1169 | within ``do_install`` but have not been included in any package by |
| 1122 | way of the :term:`FILES` variable. Files that do not | 1170 | way of the :term:`FILES` variable. Files that do not |
| 1123 | appear in any package cannot be present in an image later on in the | 1171 | appear in any package cannot be present in an image later on in the |
| @@ -1125,67 +1173,69 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1125 | installed at all. These files can be deleted at the end of | 1173 | installed at all. These files can be deleted at the end of |
| 1126 | ``do_install`` if the files are not needed in any package. | 1174 | ``do_install`` if the files are not needed in any package. |
| 1127 | 1175 | ||
| 1128 | - *``invalid-chars:``* Checks that the recipe metadata variables | 1176 | - ``invalid-chars:`` Checks that the recipe metadata variables |
| 1129 | :term:`DESCRIPTION`, | 1177 | :term:`DESCRIPTION`, |
| 1130 | :term:`SUMMARY`, :term:`LICENSE`, and | 1178 | :term:`SUMMARY`, :term:`LICENSE`, and |
| 1131 | :term:`SECTION` do not contain non-UTF-8 characters. | 1179 | :term:`SECTION` do not contain non-UTF-8 characters. |
| 1132 | Some package managers do not support such characters. | 1180 | Some package managers do not support such characters. |
| 1133 | 1181 | ||
| 1134 | - *``invalid-packageconfig:``* Checks that no undefined features are | 1182 | - ``invalid-packageconfig:`` Checks that no undefined features are |
| 1135 | being added to :term:`PACKAGECONFIG`. For | 1183 | being added to :term:`PACKAGECONFIG`. For |
| 1136 | example, any name "foo" for which the following form does not exist: | 1184 | example, any name "foo" for which the following form does not exist: |
| 1137 | PACKAGECONFIG[foo] = "..." | 1185 | :: |
| 1186 | |||
| 1187 | PACKAGECONFIG[foo] = "..." | ||
| 1138 | 1188 | ||
| 1139 | - *``la:``* Checks ``.la`` files for any ``TMPDIR`` paths. Any ``.la`` | 1189 | - ``la:`` Checks ``.la`` files for any ``TMPDIR`` paths. Any ``.la`` |
| 1140 | file containing these paths is incorrect since ``libtool`` adds the | 1190 | file containing these paths is incorrect since ``libtool`` adds the |
| 1141 | correct sysroot prefix when using the files automatically itself. | 1191 | correct sysroot prefix when using the files automatically itself. |
| 1142 | 1192 | ||
| 1143 | - *``ldflags:``* Ensures that the binaries were linked with the | 1193 | - ``ldflags:`` Ensures that the binaries were linked with the |
| 1144 | :term:`LDFLAGS` options provided by the build system. | 1194 | :term:`LDFLAGS` options provided by the build system. |
| 1145 | If this test fails, check that the ``LDFLAGS`` variable is being | 1195 | If this test fails, check that the ``LDFLAGS`` variable is being |
| 1146 | passed to the linker command. | 1196 | passed to the linker command. |
| 1147 | 1197 | ||
| 1148 | - *``libdir:``* Checks for libraries being installed into incorrect | 1198 | - ``libdir:`` Checks for libraries being installed into incorrect |
| 1149 | (possibly hardcoded) installation paths. For example, this test will | 1199 | (possibly hardcoded) installation paths. For example, this test will |
| 1150 | catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is | 1200 | catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is |
| 1151 | "lib32". Another example is when recipes install | 1201 | "lib32". Another example is when recipes install |
| 1152 | ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". | 1202 | ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". |
| 1153 | 1203 | ||
| 1154 | - *``libexec:``* Checks if a package contains files in | 1204 | - ``libexec:`` Checks if a package contains files in |
| 1155 | ``/usr/libexec``. This check is not performed if the ``libexecdir`` | 1205 | ``/usr/libexec``. This check is not performed if the ``libexecdir`` |
| 1156 | variable has been set explicitly to ``/usr/libexec``. | 1206 | variable has been set explicitly to ``/usr/libexec``. |
| 1157 | 1207 | ||
| 1158 | - *``packages-list:``* Checks for the same package being listed | 1208 | - ``packages-list:`` Checks for the same package being listed |
| 1159 | multiple times through the :term:`PACKAGES` variable | 1209 | multiple times through the :term:`PACKAGES` variable |
| 1160 | value. Installing the package in this manner can cause errors during | 1210 | value. Installing the package in this manner can cause errors during |
| 1161 | packaging. | 1211 | packaging. |
| 1162 | 1212 | ||
| 1163 | - *``perm-config:``* Reports lines in ``fs-perms.txt`` that have an | 1213 | - ``perm-config:`` Reports lines in ``fs-perms.txt`` that have an |
| 1164 | invalid format. | 1214 | invalid format. |
| 1165 | 1215 | ||
| 1166 | - *``perm-line:``* Reports lines in ``fs-perms.txt`` that have an | 1216 | - ``perm-line:`` Reports lines in ``fs-perms.txt`` that have an |
| 1167 | invalid format. | 1217 | invalid format. |
| 1168 | 1218 | ||
| 1169 | - *``perm-link:``* Reports lines in ``fs-perms.txt`` that specify | 1219 | - ``perm-link:`` Reports lines in ``fs-perms.txt`` that specify |
| 1170 | 'link' where the specified target already exists. | 1220 | 'link' where the specified target already exists. |
| 1171 | 1221 | ||
| 1172 | - *``perms:``* Currently, this check is unused but reserved. | 1222 | - ``perms:`` Currently, this check is unused but reserved. |
| 1173 | 1223 | ||
| 1174 | - *``pkgconfig:``* Checks ``.pc`` files for any | 1224 | - ``pkgconfig:`` Checks ``.pc`` files for any |
| 1175 | :term:`TMPDIR`/:term:`WORKDIR` paths. | 1225 | :term:`TMPDIR`/:term:`WORKDIR` paths. |
| 1176 | Any ``.pc`` file containing these paths is incorrect since | 1226 | Any ``.pc`` file containing these paths is incorrect since |
| 1177 | ``pkg-config`` itself adds the correct sysroot prefix when the files | 1227 | ``pkg-config`` itself adds the correct sysroot prefix when the files |
| 1178 | are accessed. | 1228 | are accessed. |
| 1179 | 1229 | ||
| 1180 | - *``pkgname:``* Checks that all packages in | 1230 | - ``pkgname:`` Checks that all packages in |
| 1181 | :term:`PACKAGES` have names that do not contain | 1231 | :term:`PACKAGES` have names that do not contain |
| 1182 | invalid characters (i.e. characters other than 0-9, a-z, ., +, and | 1232 | invalid characters (i.e. characters other than 0-9, a-z, ., +, and |
| 1183 | -). | 1233 | -). |
| 1184 | 1234 | ||
| 1185 | - *``pkgv-undefined:``* Checks to see if the ``PKGV`` variable is | 1235 | - ``pkgv-undefined:`` Checks to see if the ``PKGV`` variable is |
| 1186 | undefined during :ref:`ref-tasks-package`. | 1236 | undefined during :ref:`ref-tasks-package`. |
| 1187 | 1237 | ||
| 1188 | - *``pkgvarcheck:``* Checks through the variables | 1238 | - ``pkgvarcheck:`` Checks through the variables |
| 1189 | :term:`RDEPENDS`, | 1239 | :term:`RDEPENDS`, |
| 1190 | :term:`RRECOMMENDS`, | 1240 | :term:`RRECOMMENDS`, |
| 1191 | :term:`RSUGGESTS`, | 1241 | :term:`RSUGGESTS`, |
| @@ -1199,7 +1249,7 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1199 | unnecessarily complicate dependencies of other packages within the | 1249 | unnecessarily complicate dependencies of other packages within the |
| 1200 | same recipe or have other unintended consequences. | 1250 | same recipe or have other unintended consequences. |
| 1201 | 1251 | ||
| 1202 | - *``pn-overrides:``* Checks that a recipe does not have a name | 1252 | - ``pn-overrides:`` Checks that a recipe does not have a name |
| 1203 | (:term:`PN`) value that appears in | 1253 | (:term:`PN`) value that appears in |
| 1204 | :term:`OVERRIDES`. If a recipe is named such that | 1254 | :term:`OVERRIDES`. If a recipe is named such that |
| 1205 | its ``PN`` value matches something already in ``OVERRIDES`` (e.g. | 1255 | its ``PN`` value matches something already in ``OVERRIDES`` (e.g. |
| @@ -1208,43 +1258,43 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1208 | For example, assignments such as ``FILES_${PN} = "xyz"`` effectively | 1258 | For example, assignments such as ``FILES_${PN} = "xyz"`` effectively |
| 1209 | turn into ``FILES = "xyz"``. | 1259 | turn into ``FILES = "xyz"``. |
| 1210 | 1260 | ||
| 1211 | - *``rpaths:``* Checks for rpaths in the binaries that contain build | 1261 | - ``rpaths:`` Checks for rpaths in the binaries that contain build |
| 1212 | system paths such as ``TMPDIR``. If this test fails, bad ``-rpath`` | 1262 | system paths such as ``TMPDIR``. If this test fails, bad ``-rpath`` |
| 1213 | options are being passed to the linker commands and your binaries | 1263 | options are being passed to the linker commands and your binaries |
| 1214 | have potential security issues. | 1264 | have potential security issues. |
| 1215 | 1265 | ||
| 1216 | - *``split-strip:``* Reports that splitting or stripping debug symbols | 1266 | - ``split-strip:`` Reports that splitting or stripping debug symbols |
| 1217 | from binaries has failed. | 1267 | from binaries has failed. |
| 1218 | 1268 | ||
| 1219 | - *``staticdev:``* Checks for static library files (``*.a``) in | 1269 | - ``staticdev:`` Checks for static library files (``*.a``) in |
| 1220 | non-``staticdev`` packages. | 1270 | non-``staticdev`` packages. |
| 1221 | 1271 | ||
| 1222 | - *``symlink-to-sysroot:``* Checks for symlinks in packages that point | 1272 | - ``symlink-to-sysroot:`` Checks for symlinks in packages that point |
| 1223 | into :term:`TMPDIR` on the host. Such symlinks will | 1273 | into :term:`TMPDIR` on the host. Such symlinks will |
| 1224 | work on the host, but are clearly invalid when running on the target. | 1274 | work on the host, but are clearly invalid when running on the target. |
| 1225 | 1275 | ||
| 1226 | - *``textrel:``* Checks for ELF binaries that contain relocations in | 1276 | - ``textrel:`` Checks for ELF binaries that contain relocations in |
| 1227 | their ``.text`` sections, which can result in a performance impact at | 1277 | their ``.text`` sections, which can result in a performance impact at |
| 1228 | runtime. See the explanation for the | 1278 | runtime. See the explanation for the |
| 1229 | ```ELF binary`` <#qa-issue-textrel>`__ message for more information | 1279 | ```ELF binary`` <#qa-issue-textrel>`__ message for more information |
| 1230 | regarding runtime performance issues. | 1280 | regarding runtime performance issues. |
| 1231 | 1281 | ||
| 1232 | - *``unlisted-pkg-lics:``* Checks that all declared licenses applying | 1282 | - ``unlisted-pkg-lics:`` Checks that all declared licenses applying |
| 1233 | for a package are also declared on the recipe level (i.e. any license | 1283 | for a package are also declared on the recipe level (i.e. any license |
| 1234 | in ``LICENSE_*`` should appear in :term:`LICENSE`). | 1284 | in ``LICENSE_*`` should appear in :term:`LICENSE`). |
| 1235 | 1285 | ||
| 1236 | - *``useless-rpaths:``* Checks for dynamic library load paths (rpaths) | 1286 | - ``useless-rpaths:`` Checks for dynamic library load paths (rpaths) |
| 1237 | in the binaries that by default on a standard system are searched by | 1287 | in the binaries that by default on a standard system are searched by |
| 1238 | the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will | 1288 | the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will |
| 1239 | not cause any breakage, they do waste space and are unnecessary. | 1289 | not cause any breakage, they do waste space and are unnecessary. |
| 1240 | 1290 | ||
| 1241 | - *``var-undefined:``* Reports when variables fundamental to packaging | 1291 | - ``var-undefined:`` Reports when variables fundamental to packaging |
| 1242 | (i.e. :term:`WORKDIR`, | 1292 | (i.e. :term:`WORKDIR`, |
| 1243 | :term:`DEPLOY_DIR`, :term:`D`, | 1293 | :term:`DEPLOY_DIR`, :term:`D`, |
| 1244 | :term:`PN`, and :term:`PKGD`) are undefined | 1294 | :term:`PN`, and :term:`PKGD`) are undefined |
| 1245 | during :ref:`ref-tasks-package`. | 1295 | during :ref:`ref-tasks-package`. |
| 1246 | 1296 | ||
| 1247 | - *``version-going-backwards:``* If Build History is enabled, reports | 1297 | - ``version-going-backwards:`` If Build History is enabled, reports |
| 1248 | when a package being written out has a lower version than the | 1298 | when a package being written out has a lower version than the |
| 1249 | previously written package under the same name. If you are placing | 1299 | previously written package under the same name. If you are placing |
| 1250 | output packages into a feed and upgrading packages on a target system | 1300 | output packages into a feed and upgrading packages on a target system |
| @@ -1257,7 +1307,7 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
| 1257 | If you are not using runtime package management on your target | 1307 | If you are not using runtime package management on your target |
| 1258 | system, then you do not need to worry about this situation. | 1308 | system, then you do not need to worry about this situation. |
| 1259 | 1309 | ||
| 1260 | - *``xorg-driver-abi:``* Checks that all packages containing Xorg | 1310 | - ``xorg-driver-abi:`` Checks that all packages containing Xorg |
| 1261 | drivers have ABI dependencies. The ``xserver-xorg`` recipe provides | 1311 | drivers have ABI dependencies. The ``xserver-xorg`` recipe provides |
| 1262 | driver ABI names. All drivers should depend on the ABI versions that | 1312 | driver ABI names. All drivers should depend on the ABI versions that |
| 1263 | they have been built against. Driver recipes that include | 1313 | they have been built against. Driver recipes that include |
| @@ -1293,9 +1343,8 @@ packages such as ``kernel-vmlinux``. | |||
| 1293 | 1343 | ||
| 1294 | The ``kernel`` class contains logic that allows you to embed an initial | 1344 | The ``kernel`` class contains logic that allows you to embed an initial |
| 1295 | RAM filesystem (initramfs) image when you build the kernel image. For | 1345 | RAM filesystem (initramfs) image when you build the kernel image. For |
| 1296 | information on how to build an initramfs, see the "`Building an Initial | 1346 | information on how to build an initramfs, see the |
| 1297 | RAM Filesystem (initramfs) | 1347 | ":ref:`building-an-initramfs-image`" section in |
| 1298 | Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__" section in | ||
| 1299 | the Yocto Project Development Tasks Manual. | 1348 | the Yocto Project Development Tasks Manual. |
| 1300 | 1349 | ||
| 1301 | Various other classes are used by the ``kernel`` and ``module`` classes | 1350 | Various other classes are used by the ``kernel`` and ``module`` classes |
| @@ -1545,8 +1594,7 @@ and implements the :ref:`ref-tasks-compile` and | |||
| 1545 | everything needed to build and package a kernel module. | 1594 | everything needed to build and package a kernel module. |
| 1546 | 1595 | ||
| 1547 | For general information on out-of-tree Linux kernel modules, see the | 1596 | For general information on out-of-tree Linux kernel modules, see the |
| 1548 | "`Incorporating Out-of-Tree | 1597 | ":ref:`kernel-dev/kernel-dev-common:incorporating out-of-tree modules`" |
| 1549 | Modules <&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules>`__" | ||
| 1550 | section in the Yocto Project Linux Kernel Development Manual. | 1598 | section in the Yocto Project Linux Kernel Development Manual. |
| 1551 | 1599 | ||
| 1552 | .. _ref-classes-module-base: | 1600 | .. _ref-classes-module-base: |
| @@ -1569,9 +1617,8 @@ The ``multilib*`` classes provide support for building libraries with | |||
| 1569 | different target optimizations or target architectures and installing | 1617 | different target optimizations or target architectures and installing |
| 1570 | them side-by-side in the same image. | 1618 | them side-by-side in the same image. |
| 1571 | 1619 | ||
| 1572 | For more information on using the Multilib feature, see the "`Combining | 1620 | For more information on using the Multilib feature, see the |
| 1573 | Multiple Versions of Library Files into One | 1621 | ":ref:`combining-multiple-versions-library-files-into-one-image`" |
| 1574 | Image <&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image>`__" | ||
| 1575 | section in the Yocto Project Development Tasks Manual. | 1622 | section in the Yocto Project Development Tasks Manual. |
| 1576 | 1623 | ||
| 1577 | .. _ref-classes-native: | 1624 | .. _ref-classes-native: |
| @@ -1597,14 +1644,18 @@ a couple different ways: | |||
| 1597 | naming convention: | 1644 | naming convention: |
| 1598 | :: | 1645 | :: |
| 1599 | 1646 | ||
| 1600 | myrecipe-native.bb | 1647 | myrecipe-native.bb |
| 1601 | 1648 | ||
| 1602 | 1649 | ||
| 1603 | Not using this naming convention can lead to subtle problems | 1650 | Not using this naming convention can lead to subtle problems |
| 1604 | caused by existing code that depends on that naming convention. | 1651 | caused by existing code that depends on that naming convention. |
| 1605 | 1652 | ||
| 1606 | - Create or modify a target recipe that contains the following: | 1653 | - Create or modify a target recipe that contains the following: |
| 1607 | :term:`BBCLASSEXTEND` = "native" Inside the | 1654 | :: |
| 1655 | |||
| 1656 | BBCLASSEXTEND = "native" | ||
| 1657 | |||
| 1658 | Inside the | ||
| 1608 | recipe, use ``_class-native`` and ``_class-target`` overrides to | 1659 | recipe, use ``_class-native`` and ``_class-target`` overrides to |
| 1609 | specify any functionality specific to the respective native or target | 1660 | specify any functionality specific to the respective native or target |
| 1610 | case. | 1661 | case. |
| @@ -1632,7 +1683,11 @@ couple different ways: | |||
| 1632 | that the ``nativesdk`` class is inherited last. | 1683 | that the ``nativesdk`` class is inherited last. |
| 1633 | 1684 | ||
| 1634 | - Create a ``nativesdk`` variant of any recipe by adding the following: | 1685 | - Create a ``nativesdk`` variant of any recipe by adding the following: |
| 1635 | :term:`BBCLASSEXTEND` = "nativesdk" Inside the | 1686 | :: |
| 1687 | |||
| 1688 | BBCLASSEXTEND = "nativesdk" | ||
| 1689 | |||
| 1690 | Inside the | ||
| 1636 | recipe, use ``_class-nativesdk`` and ``_class-target`` overrides to | 1691 | recipe, use ``_class-nativesdk`` and ``_class-target`` overrides to |
| 1637 | specify any functionality specific to the respective SDK machine or | 1692 | specify any functionality specific to the respective SDK machine or |
| 1638 | target case. | 1693 | target case. |
| @@ -1643,7 +1698,7 @@ couple different ways: | |||
| 1643 | :: | 1698 | :: |
| 1644 | 1699 | ||
| 1645 | nativesdk-myrecipe.bb | 1700 | nativesdk-myrecipe.bb |
| 1646 | 1701 | ||
| 1647 | 1702 | ||
| 1648 | Not doing so can lead to subtle problems because code exists that | 1703 | Not doing so can lead to subtle problems because code exists that |
| 1649 | depends on the naming convention. | 1704 | depends on the naming convention. |
| @@ -1675,9 +1730,8 @@ package manager (NPM) <https://en.wikipedia.org/wiki/Npm_(software)>`__. | |||
| 1675 | npm:// | 1730 | npm:// |
| 1676 | fetcher to have dependencies fetched and packaged automatically. | 1731 | fetcher to have dependencies fetched and packaged automatically. |
| 1677 | 1732 | ||
| 1678 | For information on how to create NPM packages, see the "`Creating Node | 1733 | For information on how to create NPM packages, see the |
| 1679 | Package Manager (NPM) | 1734 | ":ref:`dev-manual/dev-manual-common-tasks:creating node package manager (npm) packages`" |
| 1680 | Packages <&YOCTO_DOCS_DEV_URL;#creating-node-package-manager-npm-packages>`__" | ||
| 1681 | section in the Yocto Project Development Tasks Manual. | 1735 | section in the Yocto Project Development Tasks Manual. |
| 1682 | 1736 | ||
| 1683 | .. _ref-classes-oelint: | 1737 | .. _ref-classes-oelint: |
| @@ -1706,8 +1760,12 @@ before attempting to fetch it from the upstream specified in | |||
| 1706 | 1760 | ||
| 1707 | To use this class, inherit it globally and specify | 1761 | To use this class, inherit it globally and specify |
| 1708 | :term:`SOURCE_MIRROR_URL`. Here is an example: | 1762 | :term:`SOURCE_MIRROR_URL`. Here is an example: |
| 1709 | INHERIT += "own-mirrors" SOURCE_MIRROR_URL = | 1763 | :: |
| 1710 | "http://example.com/my-source-mirror" You can specify only a single URL | 1764 | |
| 1765 | INHERIT += "own-mirrors" | ||
| 1766 | SOURCE_MIRROR_URL = "http://example.com/my-source-mirror" | ||
| 1767 | |||
| 1768 | You can specify only a single URL | ||
| 1711 | in ``SOURCE_MIRROR_URL``. | 1769 | in ``SOURCE_MIRROR_URL``. |
| 1712 | 1770 | ||
| 1713 | .. _ref-classes-package: | 1771 | .. _ref-classes-package: |
| @@ -1742,9 +1800,8 @@ first class listed in this variable is used for image generation. | |||
| 1742 | If you take the optional step to set up a repository (package feed) on | 1800 | If you take the optional step to set up a repository (package feed) on |
| 1743 | the development host that can be used by DNF, you can install packages | 1801 | the development host that can be used by DNF, you can install packages |
| 1744 | from the feed while you are running the image on the target (i.e. | 1802 | from the feed while you are running the image on the target (i.e. |
| 1745 | runtime installation of packages). For more information, see the "`Using | 1803 | runtime installation of packages). For more information, see the |
| 1746 | Runtime Package | 1804 | ":ref:`dev-manual/dev-manual-common-tasks:using runtime package management`" |
| 1747 | Management <&YOCTO_DOCS_DEV_URL;#using-runtime-package-management>`__" | ||
| 1748 | section in the Yocto Project Development Tasks Manual. | 1805 | section in the Yocto Project Development Tasks Manual. |
| 1749 | 1806 | ||
| 1750 | The package-specific class you choose can affect build-time performance | 1807 | The package-specific class you choose can affect build-time performance |
| @@ -1774,9 +1831,9 @@ consider some further things about using RPM: | |||
| 1774 | You can find additional information on the effects of the package class | 1831 | You can find additional information on the effects of the package class |
| 1775 | at these two Yocto Project mailing list links: | 1832 | at these two Yocto Project mailing list links: |
| 1776 | 1833 | ||
| 1777 | - `https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html <&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html>`__ | 1834 | - https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html |
| 1778 | 1835 | ||
| 1779 | - `https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html <&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html>`__ | 1836 | - https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html |
| 1780 | 1837 | ||
| 1781 | .. _ref-classes-package_deb: | 1838 | .. _ref-classes-package_deb: |
| 1782 | 1839 | ||
| @@ -1870,9 +1927,8 @@ group recipes (e.g. ``PACKAGES``, ``PACKAGE_ARCH``, ``ALLOW_EMPTY``, and | |||
| 1870 | so forth). It is highly recommended that all package group recipes | 1927 | so forth). It is highly recommended that all package group recipes |
| 1871 | inherit this class. | 1928 | inherit this class. |
| 1872 | 1929 | ||
| 1873 | For information on how to use this class, see the "`Customizing Images | 1930 | For information on how to use this class, see the |
| 1874 | Using Custom Package | 1931 | ":ref:`usingpoky-extend-customimage-customtasks`" |
| 1875 | Groups <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks>`__" | ||
| 1876 | section in the Yocto Project Development Tasks Manual. | 1932 | section in the Yocto Project Development Tasks Manual. |
| 1877 | 1933 | ||
| 1878 | Previously, this class was called the ``task`` class. | 1934 | Previously, this class was called the ``task`` class. |
| @@ -1937,8 +1993,7 @@ files. | |||
| 1937 | The ``populate_sdk`` class provides support for SDK-only recipes. For | 1993 | The ``populate_sdk`` class provides support for SDK-only recipes. For |
| 1938 | information on advantages gained when building a cross-development | 1994 | information on advantages gained when building a cross-development |
| 1939 | toolchain using the :ref:`ref-tasks-populate_sdk` | 1995 | toolchain using the :ref:`ref-tasks-populate_sdk` |
| 1940 | task, see the "`Building an SDK | 1996 | task, see the ":ref:`sdk-manual/sdk-appendix-obtain:building an sdk installer`" |
| 1941 | Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__" | ||
| 1942 | section in the Yocto Project Application Development and the Extensible | 1997 | section in the Yocto Project Application Development and the Extensible |
| 1943 | Software Development Kit (eSDK) manual. | 1998 | Software Development Kit (eSDK) manual. |
| 1944 | 1999 | ||
| @@ -1950,19 +2005,19 @@ Software Development Kit (eSDK) manual. | |||
| 1950 | The ``populate_sdk_*`` classes support SDK creation and consist of the | 2005 | The ``populate_sdk_*`` classes support SDK creation and consist of the |
| 1951 | following classes: | 2006 | following classes: |
| 1952 | 2007 | ||
| 1953 | - *``populate_sdk_base``:* The base class supporting SDK creation under | 2008 | - ``populate_sdk_base``: The base class supporting SDK creation under |
| 1954 | all package managers (i.e. DEB, RPM, and opkg). | 2009 | all package managers (i.e. DEB, RPM, and opkg). |
| 1955 | 2010 | ||
| 1956 | - *``populate_sdk_deb``:* Supports creation of the SDK given the Debian | 2011 | - ``populate_sdk_deb``: Supports creation of the SDK given the Debian |
| 1957 | package manager. | 2012 | package manager. |
| 1958 | 2013 | ||
| 1959 | - *``populate_sdk_rpm``:* Supports creation of the SDK given the RPM | 2014 | - ``populate_sdk_rpm``: Supports creation of the SDK given the RPM |
| 1960 | package manager. | 2015 | package manager. |
| 1961 | 2016 | ||
| 1962 | - *``populate_sdk_ipk``:* Supports creation of the SDK given the opkg | 2017 | - ``populate_sdk_ipk``: Supports creation of the SDK given the opkg |
| 1963 | (IPK format) package manager. | 2018 | (IPK format) package manager. |
| 1964 | 2019 | ||
| 1965 | - *``populate_sdk_ext``:* Supports extensible SDK creation under all | 2020 | - ``populate_sdk_ext``: Supports extensible SDK creation under all |
| 1966 | package managers. | 2021 | package managers. |
| 1967 | 2022 | ||
| 1968 | The ``populate_sdk_base`` class inherits the appropriate | 2023 | The ``populate_sdk_base`` class inherits the appropriate |
| @@ -1977,8 +2032,10 @@ contains the cross-compiler and associated tooling, and the target, | |||
| 1977 | which contains a target root filesystem that is configured for the SDK | 2032 | which contains a target root filesystem that is configured for the SDK |
| 1978 | usage. These two images reside in :term:`SDK_OUTPUT`, | 2033 | usage. These two images reside in :term:`SDK_OUTPUT`, |
| 1979 | which consists of the following: | 2034 | which consists of the following: |
| 1980 | ${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs | 2035 | :: |
| 1981 | ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs | 2036 | |
| 2037 | ${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs | ||
| 2038 | ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs | ||
| 1982 | 2039 | ||
| 1983 | Finally, the base populate SDK class creates the toolchain environment | 2040 | Finally, the base populate SDK class creates the toolchain environment |
| 1984 | setup script, the tarball of the SDK, and the installer. | 2041 | setup script, the tarball of the SDK, and the installer. |
| @@ -1989,13 +2046,12 @@ These classes are inherited by and used with the ``populate_sdk_base`` | |||
| 1989 | class. | 2046 | class. |
| 1990 | 2047 | ||
| 1991 | For more information on the cross-development toolchain generation, see | 2048 | For more information on the cross-development toolchain generation, see |
| 1992 | the "`Cross-Development Toolchain | 2049 | the ":ref:`overview-manual/overview-manual-concepts:cross-development toolchain generation`" |
| 1993 | Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__" | ||
| 1994 | section in the Yocto Project Overview and Concepts Manual. For | 2050 | section in the Yocto Project Overview and Concepts Manual. For |
| 1995 | information on advantages gained when building a cross-development | 2051 | information on advantages gained when building a cross-development |
| 1996 | toolchain using the :ref:`ref-tasks-populate_sdk` | 2052 | toolchain using the :ref:`ref-tasks-populate_sdk` |
| 1997 | task, see the "`Building an SDK | 2053 | task, see the |
| 1998 | Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__" | 2054 | ":ref:`sdk-manual/sdk-appendix-obtain:building an sdk installer`" |
| 1999 | section in the Yocto Project Application Development and the Extensible | 2055 | section in the Yocto Project Application Development and the Extensible |
| 2000 | Software Development Kit (eSDK) manual. | 2056 | Software Development Kit (eSDK) manual. |
| 2001 | 2057 | ||
| @@ -2034,8 +2090,8 @@ The ``primport`` class provides functionality for importing | |||
| 2034 | ``prserv.bbclass`` | 2090 | ``prserv.bbclass`` |
| 2035 | ================== | 2091 | ================== |
| 2036 | 2092 | ||
| 2037 | The ``prserv`` class provides functionality for using a `PR | 2093 | The ``prserv`` class provides functionality for using a :ref:`PR |
| 2038 | service <&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service>`__ in order to | 2094 | service <dev-manual/dev-manual-common-tasks:working with a pr service>` in order to |
| 2039 | automatically manage the incrementing of the :term:`PR` | 2095 | automatically manage the incrementing of the :term:`PR` |
| 2040 | variable for each recipe. | 2096 | variable for each recipe. |
| 2041 | 2097 | ||
| @@ -2054,11 +2110,10 @@ runtime tests for recipes that build software that provides these tests. | |||
| 2054 | 2110 | ||
| 2055 | This class is intended to be inherited by individual recipes. However, | 2111 | This class is intended to be inherited by individual recipes. However, |
| 2056 | the class' functionality is largely disabled unless "ptest" appears in | 2112 | the class' functionality is largely disabled unless "ptest" appears in |
| 2057 | :term:`DISTRO_FEATURES`. See the "`Testing | 2113 | :term:`DISTRO_FEATURES`. See the |
| 2058 | Packages With | 2114 | ":ref:`dev-manual/dev-manual-common-tasks:testing packages with ptest`" |
| 2059 | ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in | 2115 | section in the Yocto Project Development Tasks Manual for more information |
| 2060 | the Yocto Project Development Tasks Manual for more information on | 2116 | on ptest. |
| 2061 | ptest. | ||
| 2062 | 2117 | ||
| 2063 | .. _ref-classes-ptest-gnome: | 2118 | .. _ref-classes-ptest-gnome: |
| 2064 | 2119 | ||
| @@ -2068,10 +2123,9 @@ ptest. | |||
| 2068 | Enables package tests (ptests) specifically for GNOME packages, which | 2123 | Enables package tests (ptests) specifically for GNOME packages, which |
| 2069 | have tests intended to be executed with ``gnome-desktop-testing``. | 2124 | have tests intended to be executed with ``gnome-desktop-testing``. |
| 2070 | 2125 | ||
| 2071 | For information on setting up and running ptests, see the "`Testing | 2126 | For information on setting up and running ptests, see the |
| 2072 | Packages With | 2127 | ":ref:`dev-manual/dev-manual-common-tasks:testing packages with ptest`" |
| 2073 | ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in | 2128 | section in the Yocto Project Development Tasks Manual. |
| 2074 | the Yocto Project Development Tasks Manual. | ||
| 2075 | 2129 | ||
| 2076 | .. _ref-classes-python-dir: | 2130 | .. _ref-classes-python-dir: |
| 2077 | 2131 | ||
| @@ -2142,7 +2196,9 @@ absent from both the sysroot and target packages. | |||
| 2142 | 2196 | ||
| 2143 | If a recipe needs the ``.la`` files to be installed, then the recipe can | 2197 | If a recipe needs the ``.la`` files to be installed, then the recipe can |
| 2144 | override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows: | 2198 | override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows: |
| 2145 | REMOVE_LIBTOOL_LA = "0" | 2199 | :: |
| 2200 | |||
| 2201 | REMOVE_LIBTOOL_LA = "0" | ||
| 2146 | 2202 | ||
| 2147 | .. note:: | 2203 | .. note:: |
| 2148 | 2204 | ||
| @@ -2155,9 +2211,9 @@ REMOVE_LIBTOOL_LA = "0" | |||
| 2155 | ``report-error.bbclass`` | 2211 | ``report-error.bbclass`` |
| 2156 | ======================== | 2212 | ======================== |
| 2157 | 2213 | ||
| 2158 | The ``report-error`` class supports enabling the `error reporting | 2214 | The ``report-error`` class supports enabling the :ref:`error reporting |
| 2159 | tool <&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool>`__, which | 2215 | tool <dev-manual/dev-manual-common-tasks:using the error reporting tool>`", |
| 2160 | allows you to submit build error information to a central database. | 2216 | which allows you to submit build error information to a central database. |
| 2161 | 2217 | ||
| 2162 | The class collects debug information for recipe, recipe version, task, | 2218 | The class collects debug information for recipe, recipe version, task, |
| 2163 | machine, distro, build system, target system, host distro, branch, | 2219 | machine, distro, build system, target system, host distro, branch, |
| @@ -2182,14 +2238,20 @@ preserves these files for inspection and possible debugging purposes. If | |||
| 2182 | you would rather have these files deleted to save disk space as the | 2238 | you would rather have these files deleted to save disk space as the |
| 2183 | build progresses, you can enable ``rm_work`` by adding the following to | 2239 | build progresses, you can enable ``rm_work`` by adding the following to |
| 2184 | your ``local.conf`` file, which is found in the :term:`Build Directory`. | 2240 | your ``local.conf`` file, which is found in the :term:`Build Directory`. |
| 2185 | INHERIT += "rm_work" If you are | 2241 | :: |
| 2242 | |||
| 2243 | INHERIT += "rm_work" | ||
| 2244 | |||
| 2245 | If you are | ||
| 2186 | modifying and building source code out of the work directory for a | 2246 | modifying and building source code out of the work directory for a |
| 2187 | recipe, enabling ``rm_work`` will potentially result in your changes to | 2247 | recipe, enabling ``rm_work`` will potentially result in your changes to |
| 2188 | the source being lost. To exclude some recipes from having their work | 2248 | the source being lost. To exclude some recipes from having their work |
| 2189 | directories deleted by ``rm_work``, you can add the names of the recipe | 2249 | directories deleted by ``rm_work``, you can add the names of the recipe |
| 2190 | or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which | 2250 | or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which |
| 2191 | can also be set in your ``local.conf`` file. Here is an example: | 2251 | can also be set in your ``local.conf`` file. Here is an example: |
| 2192 | RM_WORK_EXCLUDE += "busybox glibc" | 2252 | :: |
| 2253 | |||
| 2254 | RM_WORK_EXCLUDE += "busybox glibc" | ||
| 2193 | 2255 | ||
| 2194 | .. _ref-classes-rootfs*: | 2256 | .. _ref-classes-rootfs*: |
| 2195 | 2257 | ||
| @@ -2219,8 +2281,7 @@ The root filesystem is created from packages using one of the | |||
| 2219 | :term:`PACKAGE_CLASSES` variable. | 2281 | :term:`PACKAGE_CLASSES` variable. |
| 2220 | 2282 | ||
| 2221 | For information on how root filesystem images are created, see the | 2283 | For information on how root filesystem images are created, see the |
| 2222 | "`Image | 2284 | :ref:`image-generation-dev-environment`" |
| 2223 | Generation <&YOCTO_DOCS_OM_URL;#image-generation-dev-environment>`__" | ||
| 2224 | section in the Yocto Project Overview and Concepts Manual. | 2285 | section in the Yocto Project Overview and Concepts Manual. |
| 2225 | 2286 | ||
| 2226 | .. _ref-classes-sanity: | 2287 | .. _ref-classes-sanity: |
| @@ -2339,9 +2400,9 @@ The ``sstate`` class provides support for Shared State (sstate). By | |||
| 2339 | default, the class is enabled through the | 2400 | default, the class is enabled through the |
| 2340 | :term:`INHERIT_DISTRO` variable's default value. | 2401 | :term:`INHERIT_DISTRO` variable's default value. |
| 2341 | 2402 | ||
| 2342 | For more information on sstate, see the "`Shared State | 2403 | For more information on sstate, see the |
| 2343 | Cache <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__" section in the Yocto | 2404 | ":ref:`overview-manual/overview-manual-concepts:shared state cache`" |
| 2344 | Project Overview and Concepts Manual. | 2405 | section in the Yocto Project Overview and Concepts Manual. |
| 2345 | 2406 | ||
| 2346 | .. _ref-classes-staging: | 2407 | .. _ref-classes-staging: |
| 2347 | 2408 | ||
| @@ -2510,14 +2571,17 @@ You should set :term:`SYSTEMD_SERVICE` to the | |||
| 2510 | name of the service file. You should also use a package name override to | 2571 | name of the service file. You should also use a package name override to |
| 2511 | indicate the package to which the value applies. If the value applies to | 2572 | indicate the package to which the value applies. If the value applies to |
| 2512 | the recipe's main package, use ``${``\ :term:`PN`\ ``}``. Here | 2573 | the recipe's main package, use ``${``\ :term:`PN`\ ``}``. Here |
| 2513 | is an example from the connman recipe: SYSTEMD_SERVICE_${PN} = | 2574 | is an example from the connman recipe: |
| 2514 | "connman.service" Services are set up to start on boot automatically | 2575 | :: |
| 2576 | |||
| 2577 | SYSTEMD_SERVICE_${PN} = "connman.service" | ||
| 2578 | |||
| 2579 | Services are set up to start on boot automatically | ||
| 2515 | unless you have set | 2580 | unless you have set |
| 2516 | :term:`SYSTEMD_AUTO_ENABLE` to "disable". | 2581 | :term:`SYSTEMD_AUTO_ENABLE` to "disable". |
| 2517 | 2582 | ||
| 2518 | For more information on ``systemd``, see the "`Selecting an | 2583 | For more information on ``systemd``, see the |
| 2519 | Initialization | 2584 | ":ref:`dev-manual/dev-manual-common-tasks:selecting an initialization manager`" |
| 2520 | Manager <&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager>`__" | ||
| 2521 | section in the Yocto Project Development Tasks Manual. | 2585 | section in the Yocto Project Development Tasks Manual. |
| 2522 | 2586 | ||
| 2523 | .. _ref-classes-systemd-boot: | 2587 | .. _ref-classes-systemd-boot: |
| @@ -2593,13 +2657,17 @@ The tests are commands that run on the target system over ``ssh``. Each | |||
| 2593 | test is written in Python and makes use of the ``unittest`` module. | 2657 | test is written in Python and makes use of the ``unittest`` module. |
| 2594 | 2658 | ||
| 2595 | The ``testimage.bbclass`` runs tests on an image when called using the | 2659 | The ``testimage.bbclass`` runs tests on an image when called using the |
| 2596 | following: $ bitbake -c testimage image The ``testimage-auto`` class | 2660 | following: |
| 2661 | :: | ||
| 2662 | |||
| 2663 | $ bitbake -c testimage image | ||
| 2664 | |||
| 2665 | The ``testimage-auto`` class | ||
| 2597 | runs tests on an image after the image is constructed (i.e. | 2666 | runs tests on an image after the image is constructed (i.e. |
| 2598 | :term:`TESTIMAGE_AUTO` must be set to "1"). | 2667 | :term:`TESTIMAGE_AUTO` must be set to "1"). |
| 2599 | 2668 | ||
| 2600 | For information on how to enable, run, and create new tests, see the | 2669 | For information on how to enable, run, and create new tests, see the |
| 2601 | "`Performing Automated Runtime | 2670 | ":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`" |
| 2602 | Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__" | ||
| 2603 | section in the Yocto Project Development Tasks Manual. | 2671 | section in the Yocto Project Development Tasks Manual. |
| 2604 | 2672 | ||
| 2605 | .. _ref-classes-testsdk: | 2673 | .. _ref-classes-testsdk: |
| @@ -2609,7 +2677,10 @@ section in the Yocto Project Development Tasks Manual. | |||
| 2609 | 2677 | ||
| 2610 | This class supports running automated tests against software development | 2678 | This class supports running automated tests against software development |
| 2611 | kits (SDKs). The ``testsdk`` class runs tests on an SDK when called | 2679 | kits (SDKs). The ``testsdk`` class runs tests on an SDK when called |
| 2612 | using the following: $ bitbake -c testsdk image | 2680 | using the following: |
| 2681 | :: | ||
| 2682 | |||
| 2683 | $ bitbake -c testsdk image | ||
| 2613 | 2684 | ||
| 2614 | .. note:: | 2685 | .. note:: |
| 2615 | 2686 | ||
| @@ -2682,7 +2753,9 @@ The ``typecheck`` class provides support for validating the values of | |||
| 2682 | variables set at the configuration level against their defined types. | 2753 | variables set at the configuration level against their defined types. |
| 2683 | The OpenEmbedded build system allows you to define the type of a | 2754 | The OpenEmbedded build system allows you to define the type of a |
| 2684 | variable using the "type" varflag. Here is an example: | 2755 | variable using the "type" varflag. Here is an example: |
| 2685 | IMAGE_FEATURES[type] = "list" | 2756 | :: |
| 2757 | |||
| 2758 | IMAGE_FEATURES[type] = "list" | ||
| 2686 | 2759 | ||
| 2687 | .. _ref-classes-uboot-config: | 2760 | .. _ref-classes-uboot-config: |
| 2688 | 2761 | ||
| @@ -2690,11 +2763,18 @@ IMAGE_FEATURES[type] = "list" | |||
| 2690 | ======================== | 2763 | ======================== |
| 2691 | 2764 | ||
| 2692 | The ``uboot-config`` class provides support for U-Boot configuration for | 2765 | The ``uboot-config`` class provides support for U-Boot configuration for |
| 2693 | a machine. Specify the machine in your recipe as follows: UBOOT_CONFIG | 2766 | a machine. Specify the machine in your recipe as follows: |
| 2694 | ??= <default> UBOOT_CONFIG[foo] = "config,images" You can also specify | 2767 | :: |
| 2695 | the machine using this method: UBOOT_MACHINE = "config" See the | 2768 | |
| 2696 | :term:`UBOOT_CONFIG` and | 2769 | UBOOT_CONFIG ??= <default> |
| 2697 | :term:`UBOOT_MACHINE` variables for additional | 2770 | UBOOT_CONFIG[foo] = "config,images" |
| 2771 | |||
| 2772 | You can also specify the machine using this method: | ||
| 2773 | :: | ||
| 2774 | |||
| 2775 | UBOOT_MACHINE = "config" | ||
| 2776 | |||
| 2777 | See the :term:`UBOOT_CONFIG` and :term:`UBOOT_MACHINE` variables for additional | ||
| 2698 | information. | 2778 | information. |
| 2699 | 2779 | ||
| 2700 | .. _ref-classes-uninative: | 2780 | .. _ref-classes-uninative: |
