diff options
Diffstat (limited to 'documentation/ref-manual/variables.rst')
-rw-r--r-- | documentation/ref-manual/variables.rst | 118 |
1 files changed, 80 insertions, 38 deletions
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 2971654531..2e2e16574c 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -1242,24 +1242,24 @@ system and gives an overview of their function and contents. | |||
1242 | :term:`Source Directory`. | 1242 | :term:`Source Directory`. |
1243 | 1243 | ||
1244 | :term:`CONFIG_INITRAMFS_SOURCE` | 1244 | :term:`CONFIG_INITRAMFS_SOURCE` |
1245 | Identifies the initial RAM filesystem (initramfs) source files. The | 1245 | Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The |
1246 | OpenEmbedded build system receives and uses this kernel Kconfig | 1246 | OpenEmbedded build system receives and uses this kernel Kconfig |
1247 | variable as an environment variable. By default, the variable is set | 1247 | variable as an environment variable. By default, the variable is set |
1248 | to null (""). | 1248 | to null (""). |
1249 | 1249 | ||
1250 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive | 1250 | The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive |
1251 | with a ``.cpio`` suffix or a space-separated list of directories and | 1251 | with a ``.cpio`` suffix or a space-separated list of directories and |
1252 | files for building the initramfs image. A cpio archive should contain | 1252 | files for building the :term:`Initramfs` image. A cpio archive should contain |
1253 | a filesystem archive to be used as an initramfs image. Directories | 1253 | a filesystem archive to be used as an :term:`Initramfs` image. Directories |
1254 | should contain a filesystem layout to be included in the initramfs | 1254 | should contain a filesystem layout to be included in the :term:`Initramfs` |
1255 | image. Files should contain entries according to the format described | 1255 | image. Files should contain entries according to the format described |
1256 | by the ``usr/gen_init_cpio`` program in the kernel tree. | 1256 | by the ``usr/gen_init_cpio`` program in the kernel tree. |
1257 | 1257 | ||
1258 | If you specify multiple directories and files, the initramfs image | 1258 | If you specify multiple directories and files, the :term:`Initramfs` image |
1259 | will be the aggregate of all of them. | 1259 | will be the aggregate of all of them. |
1260 | 1260 | ||
1261 | For information on creating an initramfs, see the | 1261 | For information on creating an :term:`Initramfs`, see the |
1262 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section | 1262 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
1263 | in the Yocto Project Development Tasks Manual. | 1263 | in the Yocto Project Development Tasks Manual. |
1264 | 1264 | ||
1265 | :term:`CONFIG_SITE` | 1265 | :term:`CONFIG_SITE` |
@@ -3182,10 +3182,10 @@ system and gives an overview of their function and contents. | |||
3182 | image, do not use the :term:`IMAGE_INSTALL` variable to specify | 3182 | image, do not use the :term:`IMAGE_INSTALL` variable to specify |
3183 | packages for installation. Instead, use the | 3183 | packages for installation. Instead, use the |
3184 | :term:`PACKAGE_INSTALL` variable, which | 3184 | :term:`PACKAGE_INSTALL` variable, which |
3185 | allows the initial RAM filesystem (initramfs) recipe to use a | 3185 | allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a |
3186 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. | 3186 | fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. |
3187 | For information on creating an initramfs, see the | 3187 | For information on creating an :term:`Initramfs`, see the |
3188 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" | 3188 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" |
3189 | section in the Yocto Project Development Tasks Manual. | 3189 | section in the Yocto Project Development Tasks Manual. |
3190 | 3190 | ||
3191 | - Using :term:`IMAGE_INSTALL` with the | 3191 | - Using :term:`IMAGE_INSTALL` with the |
@@ -3265,7 +3265,7 @@ system and gives an overview of their function and contents. | |||
3265 | to distinguish the image file from other files created during image | 3265 | to distinguish the image file from other files created during image |
3266 | building; however if this suffix is redundant or not desired you can | 3266 | building; however if this suffix is redundant or not desired you can |
3267 | clear the value of this variable (set the value to ""). For example, | 3267 | clear the value of this variable (set the value to ""). For example, |
3268 | this is typically cleared in initramfs image recipes. | 3268 | this is typically cleared in :term:`Initramfs` image recipes. |
3269 | 3269 | ||
3270 | :term:`IMAGE_OVERHEAD_FACTOR` | 3270 | :term:`IMAGE_OVERHEAD_FACTOR` |
3271 | Defines a multiplier that the build system applies to the initial | 3271 | Defines a multiplier that the build system applies to the initial |
@@ -3632,37 +3632,79 @@ system and gives an overview of their function and contents. | |||
3632 | even if the toolchain's binaries are strippable, there are other files | 3632 | even if the toolchain's binaries are strippable, there are other files |
3633 | needed for the build that are not strippable. | 3633 | needed for the build that are not strippable. |
3634 | 3634 | ||
3635 | :term:`Initramfs` | ||
3636 | An Initial RAM Filesystem (:term:`Initramfs`) is an optionally compressed | ||
3637 | `cpio <https://en.wikipedia.org/wiki/Cpio>`__ archive which is extracted | ||
3638 | by the Linux kernel into RAM in a special `tmpfs <https://en.wikipedia.org/wiki/Tmpfs>`__ | ||
3639 | instance, used as the initial root filesystem. | ||
3640 | |||
3641 | This is a replacement for the legacy init RAM disk ("initrd") | ||
3642 | technique, booting on an emulated block device in RAM, but being less | ||
3643 | efficient because of the overhead of going through a filesystem and | ||
3644 | having to duplicate accessed file contents in the file cache in RAM, | ||
3645 | as for any block device. | ||
3646 | |||
3647 | .. note: | ||
3648 | |||
3649 | As far as bootloaders are concerned, :term:`Initramfs` and "initrd" | ||
3650 | images are still copied to RAM in the same way. That's why most | ||
3651 | most bootloaders refer to :term:`Initramfs` images as "initrd" | ||
3652 | or "init RAM disk". | ||
3653 | |||
3654 | This kind of mechanism is typically used for two reasons: | ||
3655 | |||
3656 | - For booting the same kernel binary on multiple systems requiring | ||
3657 | different device drivers. The Initramfs image is then customized | ||
3658 | for each type of system, to include the specific kernel modules | ||
3659 | necessary to access the final root filesystem. This technique | ||
3660 | is used on all GNU / Linux distributions for desktops and servers. | ||
3661 | |||
3662 | - For booting faster. As the root filesystem is extracted into RAM, | ||
3663 | accessing the first user-space applications is very fast, compared | ||
3664 | to having to initialize a block device, to access multiple blocks | ||
3665 | from it, and to go through a filesystem having its own overhead. | ||
3666 | For example, this allows to display a splashscreen very early, | ||
3667 | and to later take care of mounting the final root filesystem and | ||
3668 | loading less time-critical kernel drivers. | ||
3669 | |||
3670 | This cpio archive can either be loaded to RAM by the bootloader, | ||
3671 | or be included in the kernel binary. | ||
3672 | |||
3673 | For information on creating and using an :term:`Initramfs`, see the | ||
3674 | ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" | ||
3675 | section in the Yocto Project Development Tasks Manual. | ||
3676 | |||
3635 | :term:`INITRAMFS_DEPLOY_DIR_IMAGE` | 3677 | :term:`INITRAMFS_DEPLOY_DIR_IMAGE` |
3636 | Indicates the deploy directory used by ``do_bundle_initramfs`` where the | 3678 | Indicates the deploy directory used by ``do_bundle_initramfs`` where the |
3637 | :term:`INITRAMFS_IMAGE` will be fetched from. | 3679 | :term:`INITRAMFS_IMAGE` will be fetched from. |
3638 | This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the | 3680 | This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the |
3639 | :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed | 3681 | :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed |
3640 | when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`. | 3682 | when building an :term:`Initramfs` image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`. |
3641 | 3683 | ||
3642 | :term:`INITRAMFS_FSTYPES` | 3684 | :term:`INITRAMFS_FSTYPES` |
3643 | Defines the format for the output image of an initial RAM filesystem | 3685 | Defines the format for the output image of an initial RAM filesystem |
3644 | (initramfs), which is used during boot. Supported formats are the | 3686 | (:term:`Initramfs`), which is used during boot. Supported formats are the |
3645 | same as those supported by the | 3687 | same as those supported by the |
3646 | :term:`IMAGE_FSTYPES` variable. | 3688 | :term:`IMAGE_FSTYPES` variable. |
3647 | 3689 | ||
3648 | The default value of this variable, which is set in the | 3690 | The default value of this variable, which is set in the |
3649 | ``meta/conf/bitbake.conf`` configuration file in the | 3691 | ``meta/conf/bitbake.conf`` configuration file in the |
3650 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's | 3692 | :term:`Source Directory`, is "cpio.gz". The Linux kernel's |
3651 | initramfs mechanism, as opposed to the initial RAM filesystem | 3693 | :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem |
3652 | `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects | 3694 | `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects |
3653 | an optionally compressed cpio archive. | 3695 | an optionally compressed cpio archive. |
3654 | 3696 | ||
3655 | :term:`INITRAMFS_IMAGE` | 3697 | :term:`INITRAMFS_IMAGE` |
3656 | Specifies the :term:`PROVIDES` name of an image | 3698 | Specifies the :term:`PROVIDES` name of an image |
3657 | recipe that is used to build an initial RAM filesystem (initramfs) | 3699 | recipe that is used to build an initial RAM filesystem (:term:`Initramfs`) |
3658 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an | 3700 | image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an |
3659 | additional recipe to be built as a dependency to whatever root | 3701 | additional recipe to be built as a dependency to whatever root |
3660 | filesystem recipe you might be using (e.g. ``core-image-sato``). The | 3702 | filesystem recipe you might be using (e.g. ``core-image-sato``). The |
3661 | initramfs image recipe you provide should set | 3703 | :term:`Initramfs` image recipe you provide should set |
3662 | :term:`IMAGE_FSTYPES` to | 3704 | :term:`IMAGE_FSTYPES` to |
3663 | :term:`INITRAMFS_FSTYPES`. | 3705 | :term:`INITRAMFS_FSTYPES`. |
3664 | 3706 | ||
3665 | An initramfs image provides a temporary root filesystem used for | 3707 | An :term:`Initramfs` image provides a temporary root filesystem used for |
3666 | early system initialization (e.g. loading of modules needed to locate | 3708 | early system initialization (e.g. loading of modules needed to locate |
3667 | and mount the "real" root filesystem). | 3709 | and mount the "real" root filesystem). |
3668 | 3710 | ||
@@ -3670,8 +3712,8 @@ system and gives an overview of their function and contents. | |||
3670 | 3712 | ||
3671 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` | 3713 | See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` |
3672 | recipe in the :term:`Source Directory` | 3714 | recipe in the :term:`Source Directory` |
3673 | for an example initramfs recipe. To select this sample recipe as | 3715 | for an example :term:`Initramfs` recipe. To select this sample recipe as |
3674 | the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE` | 3716 | the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE` |
3675 | to "core-image-minimal-initramfs". | 3717 | to "core-image-minimal-initramfs". |
3676 | 3718 | ||
3677 | You can also find more information by referencing the | 3719 | You can also find more information by referencing the |
@@ -3681,13 +3723,13 @@ system and gives an overview of their function and contents. | |||
3681 | class to see how to use the :term:`INITRAMFS_IMAGE` variable. | 3723 | class to see how to use the :term:`INITRAMFS_IMAGE` variable. |
3682 | 3724 | ||
3683 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no | 3725 | If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no |
3684 | initramfs image is built. | 3726 | :term:`Initramfs` image is built. |
3685 | 3727 | ||
3686 | For more information, you can also see the | 3728 | For more information, you can also see the |
3687 | :term:`INITRAMFS_IMAGE_BUNDLE` | 3729 | :term:`INITRAMFS_IMAGE_BUNDLE` |
3688 | variable, which allows the generated image to be bundled inside the | 3730 | variable, which allows the generated image to be bundled inside the |
3689 | kernel image. Additionally, for information on creating an initramfs | 3731 | kernel image. Additionally, for information on creating an :term:`Initramfs` |
3690 | image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section | 3732 | image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
3691 | in the Yocto Project Development Tasks Manual. | 3733 | in the Yocto Project Development Tasks Manual. |
3692 | 3734 | ||
3693 | :term:`INITRAMFS_IMAGE_BUNDLE` | 3735 | :term:`INITRAMFS_IMAGE_BUNDLE` |
@@ -3696,32 +3738,32 @@ system and gives an overview of their function and contents. | |||
3696 | extra pass | 3738 | extra pass |
3697 | (:ref:`ref-tasks-bundle_initramfs`) during | 3739 | (:ref:`ref-tasks-bundle_initramfs`) during |
3698 | kernel compilation in order to build a single binary that contains | 3740 | kernel compilation in order to build a single binary that contains |
3699 | both the kernel image and the initial RAM filesystem (initramfs) | 3741 | both the kernel image and the initial RAM filesystem (:term:`Initramfs`) |
3700 | image. This makes use of the | 3742 | image. This makes use of the |
3701 | :term:`CONFIG_INITRAMFS_SOURCE` kernel | 3743 | :term:`CONFIG_INITRAMFS_SOURCE` kernel |
3702 | feature. | 3744 | feature. |
3703 | 3745 | ||
3704 | .. note:: | 3746 | .. note:: |
3705 | 3747 | ||
3706 | Bundling the initramfs with the kernel conflates the code in the | 3748 | Bundling the :term:`Initramfs` with the kernel conflates the code in the |
3707 | initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 | 3749 | :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 |
3708 | compatible software may be part of a bundled initramfs. | 3750 | compatible software may be part of a bundled :term:`Initramfs`. |
3709 | 3751 | ||
3710 | .. note:: | 3752 | .. note:: |
3711 | 3753 | ||
3712 | Using an extra compilation pass to bundle the initramfs avoids a | 3754 | Using an extra compilation pass to bundle the :term:`Initramfs` avoids a |
3713 | circular dependency between the kernel recipe and the initramfs | 3755 | circular dependency between the kernel recipe and the :term:`Initramfs` |
3714 | recipe should the initramfs include kernel modules. Should that be | 3756 | recipe should the :term:`Initramfs` include kernel modules. Should that be |
3715 | the case, the initramfs recipe depends on the kernel for the | 3757 | the case, the :term:`Initramfs` recipe depends on the kernel for the |
3716 | kernel modules, and the kernel depends on the initramfs recipe | 3758 | kernel modules, and the kernel depends on the :term:`Initramfs` recipe |
3717 | since the initramfs is bundled inside the kernel image. | 3759 | since the :term:`Initramfs` is bundled inside the kernel image. |
3718 | 3760 | ||
3719 | The combined binary is deposited into the ``tmp/deploy`` directory, | 3761 | The combined binary is deposited into the ``tmp/deploy`` directory, |
3720 | which is part of the :term:`Build Directory`. | 3762 | which is part of the :term:`Build Directory`. |
3721 | 3763 | ||
3722 | Setting the variable to "1" in a configuration file causes the | 3764 | Setting the variable to "1" in a configuration file causes the |
3723 | OpenEmbedded build system to generate a kernel image with the | 3765 | OpenEmbedded build system to generate a kernel image with the |
3724 | initramfs specified in :term:`INITRAMFS_IMAGE` bundled within:: | 3766 | :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within:: |
3725 | 3767 | ||
3726 | INITRAMFS_IMAGE_BUNDLE = "1" | 3768 | INITRAMFS_IMAGE_BUNDLE = "1" |
3727 | 3769 | ||
@@ -3739,7 +3781,7 @@ system and gives an overview of their function and contents. | |||
3739 | See the | 3781 | See the |
3740 | :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>` | 3782 | :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>` |
3741 | file for additional information. Also, for information on creating an | 3783 | file for additional information. Also, for information on creating an |
3742 | initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section | 3784 | :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
3743 | in the Yocto Project Development Tasks Manual. | 3785 | in the Yocto Project Development Tasks Manual. |
3744 | 3786 | ||
3745 | :term:`INITRAMFS_LINK_NAME` | 3787 | :term:`INITRAMFS_LINK_NAME` |
@@ -3764,7 +3806,7 @@ system and gives an overview of their function and contents. | |||
3764 | This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from | 3806 | This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from |
3765 | a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. | 3807 | a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. |
3766 | 3808 | ||
3767 | For more information on how to bundle an initramfs image from a separate | 3809 | For more information on how to bundle an :term:`Initramfs` image from a separate |
3768 | multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`" | 3810 | multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`" |
3769 | section in the Yocto Project Development Tasks Manual. | 3811 | section in the Yocto Project Development Tasks Manual. |
3770 | 3812 | ||
@@ -4240,7 +4282,7 @@ system and gives an overview of their function and contents. | |||
4240 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data | 4282 | :term:`KERNELDEPMODDEPEND` does not control whether or not that data |
4241 | exists, but simply whether or not it is used. If you do not need to | 4283 | exists, but simply whether or not it is used. If you do not need to |
4242 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your | 4284 | use the data, set the :term:`KERNELDEPMODDEPEND` variable in your |
4243 | ``initramfs`` recipe. Setting the variable there when the data is not | 4285 | :term:`Initramfs` recipe. Setting the variable there when the data is not |
4244 | needed avoids a potential dependency loop. | 4286 | needed avoids a potential dependency loop. |
4245 | 4287 | ||
4246 | :term:`KFEATURE_DESCRIPTION` | 4288 | :term:`KFEATURE_DESCRIPTION` |
@@ -5395,9 +5437,9 @@ system and gives an overview of their function and contents. | |||
5395 | :term:`IMAGE_INSTALL` variable to specify | 5437 | :term:`IMAGE_INSTALL` variable to specify |
5396 | packages for installation. The exception to this is when working with | 5438 | packages for installation. The exception to this is when working with |
5397 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` | 5439 | the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` |
5398 | image. When working with an initial RAM filesystem (initramfs) image, | 5440 | image. When working with an initial RAM filesystem (:term:`Initramfs`) image, |
5399 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an | 5441 | use the :term:`PACKAGE_INSTALL` variable. For information on creating an |
5400 | initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section | 5442 | :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section |
5401 | in the Yocto Project Development Tasks Manual. | 5443 | in the Yocto Project Development Tasks Manual. |
5402 | 5444 | ||
5403 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` | 5445 | :term:`PACKAGE_INSTALL_ATTEMPTONLY` |