diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2024-03-05 19:36:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-06 16:54:54 +0000 |
commit | dbcb74ef818cb082e740f2d30482b2cfc2c54147 (patch) | |
tree | 3404a5c4acb04592ffb449fb4f88beaa5a4d623c /documentation | |
parent | f9e1cfe9e871d6e2e06fd4881a963fe4d93cd8cf (diff) | |
download | poky-dbcb74ef818cb082e740f2d30482b2cfc2c54147.tar.gz |
manuals: document VIRTUAL-RUNTIME variables
Document the convention to use variables prefixed by VIRTUAL_RUNTIME.
Add references to the new term where possible.
Another reason is that such variables are recommended
in a warning issued by meta/classes-global/insane.bbclass
(From yocto-docs rev: 11e1ba97edac979868f199e43c1004db6678044c)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reported-by: Tim Orling <ticotimo@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/dev-manual/device-manager.rst | 8 | ||||
-rw-r--r-- | documentation/ref-manual/variables.rst | 37 |
2 files changed, 36 insertions, 9 deletions
diff --git a/documentation/dev-manual/device-manager.rst b/documentation/dev-manual/device-manager.rst index 0343d19b9c..49fc785fec 100644 --- a/documentation/dev-manual/device-manager.rst +++ b/documentation/dev-manual/device-manager.rst | |||
@@ -60,10 +60,10 @@ kernel. | |||
60 | All devices created by ``devtmpfs`` will be owned by ``root`` and have | 60 | All devices created by ``devtmpfs`` will be owned by ``root`` and have |
61 | permissions ``0600``. | 61 | permissions ``0600``. |
62 | 62 | ||
63 | To have more control over the device nodes, you can use a device manager | 63 | To have more control over the device nodes, you can use a device manager like |
64 | like ``udev`` or ``busybox-mdev``. You choose the device manager by | 64 | ``udev`` or ``busybox-mdev``. You choose the device manager by defining the |
65 | defining the ``VIRTUAL-RUNTIME_dev_manager`` variable in your machine or | 65 | :term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` variable in your machine |
66 | distro configuration file. Alternatively, you can set this variable in | 66 | or distro configuration file. Alternatively, you can set this variable in |
67 | your ``local.conf`` configuration file:: | 67 | your ``local.conf`` configuration file:: |
68 | 68 | ||
69 | VIRTUAL-RUNTIME_dev_manager = "udev" | 69 | VIRTUAL-RUNTIME_dev_manager = "udev" |
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 9db1808cc2..6e66dc7358 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -6750,11 +6750,11 @@ system and gives an overview of their function and contents. | |||
6750 | 6750 | ||
6751 | .. note:: | 6751 | .. note:: |
6752 | 6752 | ||
6753 | A corresponding mechanism for virtual runtime dependencies | 6753 | A corresponding mechanism for virtual runtime dependencies (packages) |
6754 | (packages) exists. However, the mechanism does not depend on any | 6754 | exists. However, the mechanism does not depend on any special |
6755 | special functionality beyond ordinary variable assignments. For | 6755 | functionality beyond ordinary variable assignments. For example, |
6756 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of | 6756 | :term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` refers to the |
6757 | the component that manages the ``/dev`` directory. | 6757 | package of the component that manages the ``/dev`` directory. |
6758 | 6758 | ||
6759 | Setting the "preferred provider" for runtime dependencies is as | 6759 | Setting the "preferred provider" for runtime dependencies is as |
6760 | simple as using the following assignment in a configuration file:: | 6760 | simple as using the following assignment in a configuration file:: |
@@ -9866,6 +9866,33 @@ system and gives an overview of their function and contents. | |||
9866 | Additionally, you should also set the | 9866 | Additionally, you should also set the |
9867 | :term:`USERADD_ERROR_DYNAMIC` variable. | 9867 | :term:`USERADD_ERROR_DYNAMIC` variable. |
9868 | 9868 | ||
9869 | :term:`VIRTUAL-RUNTIME` | ||
9870 | :term:`VIRTUAL-RUNTIME` is a commonly used prefix for defining virtual | ||
9871 | packages for runtime usage, typically for use in :term:`RDEPENDS` | ||
9872 | or in image definitions. | ||
9873 | |||
9874 | An example is ``VIRTUAL-RUNTIME_base-utils`` that makes it possible | ||
9875 | to either use BusyBox based utilities:: | ||
9876 | |||
9877 | VIRTUAL-RUNTIME_base-utils = "busybox" | ||
9878 | |||
9879 | or their full featured implementations from GNU Coreutils | ||
9880 | and other projects:: | ||
9881 | |||
9882 | VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils" | ||
9883 | |||
9884 | Here are two examples using this virtual runtime package. The | ||
9885 | first one is in :yocto_git:`initramfs-framework_1.0.bb | ||
9886 | </poky/tree/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb?h=scarthgap>`:: | ||
9887 | |||
9888 | RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}" | ||
9889 | |||
9890 | The second example is in the :yocto_git:`core-image-initramfs-boot | ||
9891 | </poky/tree/meta/recipes-core/images/core-image-initramfs-boot.bb?h=scarthgap>` | ||
9892 | image definition:: | ||
9893 | |||
9894 | PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd" | ||
9895 | |||
9869 | :term:`VOLATILE_LOG_DIR` | 9896 | :term:`VOLATILE_LOG_DIR` |
9870 | Specifies the persistence of the target's ``/var/log`` directory, | 9897 | Specifies the persistence of the target's ``/var/log`` directory, |
9871 | which is used to house postinstall target log files. | 9898 | which is used to house postinstall target log files. |