summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2024-03-05 19:36:46 +0100
committerSteve Sakoman <steve@sakoman.com>2024-03-25 04:11:26 -1000
commitb6f6c729453cb88961488e3332046517e2fe99bb (patch)
treed373ef857e34fa15615df504bf79c716af0ac9a2
parentccb4e6abb480c90811130fa11570948f5d11ac1c (diff)
downloadpoky-b6f6c729453cb88961488e3332046517e2fe99bb.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: db88c2021062c95fe49b54351952753390d45a6a) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reported-by: Tim Orling <ticotimo@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--documentation/dev-manual/device-manager.rst8
-rw-r--r--documentation/ref-manual/variables.rst37
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.
60All devices created by ``devtmpfs`` will be owned by ``root`` and have 60All devices created by ``devtmpfs`` will be owned by ``root`` and have
61permissions ``0600``. 61permissions ``0600``.
62 62
63To have more control over the device nodes, you can use a device manager 63To have more control over the device nodes, you can use a device manager like
64like ``udev`` or ``busybox-mdev``. You choose the device manager by 64``udev`` or ``busybox-mdev``. You choose the device manager by defining the
65defining the ``VIRTUAL-RUNTIME_dev_manager`` variable in your machine or 65:term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` variable in your machine
66distro configuration file. Alternatively, you can set this variable in 66or distro configuration file. Alternatively, you can set this variable in
67your ``local.conf`` configuration file:: 67your ``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 0f9e114771..ccd1963339 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -6364,11 +6364,11 @@ system and gives an overview of their function and contents.
6364 6364
6365 .. note:: 6365 .. note::
6366 6366
6367 A corresponding mechanism for virtual runtime dependencies 6367 A corresponding mechanism for virtual runtime dependencies (packages)
6368 (packages) exists. However, the mechanism does not depend on any 6368 exists. However, the mechanism does not depend on any special
6369 special functionality beyond ordinary variable assignments. For 6369 functionality beyond ordinary variable assignments. For example,
6370 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of 6370 :term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` refers to the
6371 the component that manages the ``/dev`` directory. 6371 package of the component that manages the ``/dev`` directory.
6372 6372
6373 Setting the "preferred provider" for runtime dependencies is as 6373 Setting the "preferred provider" for runtime dependencies is as
6374 simple as using the following assignment in a configuration file:: 6374 simple as using the following assignment in a configuration file::
@@ -9385,6 +9385,33 @@ system and gives an overview of their function and contents.
9385 Additionally, you should also set the 9385 Additionally, you should also set the
9386 :term:`USERADD_ERROR_DYNAMIC` variable. 9386 :term:`USERADD_ERROR_DYNAMIC` variable.
9387 9387
9388 :term:`VIRTUAL-RUNTIME`
9389 :term:`VIRTUAL-RUNTIME` is a commonly used prefix for defining virtual
9390 packages for runtime usage, typically for use in :term:`RDEPENDS`
9391 or in image definitions.
9392
9393 An example is ``VIRTUAL-RUNTIME_base-utils`` that makes it possible
9394 to either use BusyBox based utilities::
9395
9396 VIRTUAL-RUNTIME_base-utils = "busybox"
9397
9398 or their full featured implementations from GNU Coreutils
9399 and other projects::
9400
9401 VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
9402
9403 Here are two examples using this virtual runtime package. The
9404 first one is in :yocto_git:`initramfs-framework_1.0.bb
9405 </poky/tree/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb?h=scarthgap>`::
9406
9407 RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}"
9408
9409 The second example is in the :yocto_git:`core-image-initramfs-boot
9410 </poky/tree/meta/recipes-core/images/core-image-initramfs-boot.bb?h=scarthgap>`
9411 image definition::
9412
9413 PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd"
9414
9388 :term:`VOLATILE_LOG_DIR` 9415 :term:`VOLATILE_LOG_DIR`
9389 Specifies the persistence of the target's ``/var/log`` directory, 9416 Specifies the persistence of the target's ``/var/log`` directory,
9390 which is used to house postinstall target log files. 9417 which is used to house postinstall target log files.