From 19b9fde3b2b329b377ab406e2d4e52d04d06aa7f Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Thu, 10 Apr 2014 10:13:02 -0700 Subject: ref-manual: Updates to deal with installing packages in initramfs Fixes [YOCTO #4961] Documented the user requirement to use PACKAGE_INSTALL to specify packages for installation into an initramfs image. Normally, you use IMAGE_INSTALL. To account for this user model, I updated the PACKAGE_INSTALL and IMAGE_INSTALL variables. I also added a bit more information to the "Images" chapter item that talks about the core-image-minimal-initramfs image. (From yocto-docs rev: a1ad649cf310f281a7de584d5b9a1820ca99d4eb) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/ref-manual/ref-images.xml | 8 ++- documentation/ref-manual/ref-variables.xml | 78 ++++++++++++++++++++---------- 2 files changed, 58 insertions(+), 28 deletions(-) (limited to 'documentation/ref-manual') diff --git a/documentation/ref-manual/ref-images.xml b/documentation/ref-manual/ref-images.xml index 529decfc96..b12c49ac78 100644 --- a/documentation/ref-manual/ref-images.xml +++ b/documentation/ref-manual/ref-images.xml @@ -61,10 +61,14 @@ The image includes headers and libraries you can use in a host development environment. - core-image-minimal-initramfs: + core-image-minimal-initramfs: A core-image-minimal image that has the Minimal RAM-based - Initial Root Filesystem (initramfs) as part of the kernel, + Initial Root Filesystem (initramfs) as part of the kernel, which allows the system to find the first “init” program more efficiently. + See the + PACKAGE_INSTALL + variable for additional information helpful when working with + initramfs images. core-image-minimal-mtdutils: A core-image-minimal image that has support diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index 984d6b1e3d..0d62e67809 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -2962,33 +2962,52 @@ Specifies the packages to install into an image. - The IMAGE_INSTALL variable is a mechanism for an image - recipe and you should use it with care to avoid ordering issues. + The IMAGE_INSTALL variable is a + mechanism for an image recipe and you should use it + with care to avoid ordering issues. + + When working with an + core-image-minimal-initramfs + image, do not use the IMAGE_INSTALL + variable to specify packages for installation. + Instead, use the + PACKAGE_INSTALL + variable, which allows the initial RAM disk (initramfs) + recipe to use a fixed set of packages and not be + affected by IMAGE_INSTALL. + - Image recipes set IMAGE_INSTALL to specify the - packages to install into an image through image.bbclass. - Additionally, "helper" classes exist, such as core-image.bbclass, - that can take - IMAGE_FEATURES lists - and turn these into auto-generated entries in - IMAGE_INSTALL in addition to its default contents. + Image recipes set IMAGE_INSTALL + to specify the packages to install into an image through + image.bbclass. + Additionally, "helper" classes exist, such as + core-image.bbclass, that can take + IMAGE_FEATURES + lists and turn these into auto-generated entries in + IMAGE_INSTALL in addition to its + default contents. - Using IMAGE_INSTALL with the += - operator from the /conf/local.conf file or from within - an image recipe is not recommended as it can cause ordering issues. - Since core-image.bbclass sets IMAGE_INSTALL - to a default value using the ?= operator, using a - += operation against IMAGE_INSTALL - will result in unexpected behavior when used in + Using IMAGE_INSTALL with the + += operator from the + /conf/local.conf file or from within + an image recipe is not recommended as it can cause ordering + issues. + Since core-image.bbclass sets + IMAGE_INSTALL to a default value using + the ?= operator, using a + += operation against + IMAGE_INSTALL will result in + unexpected behavior when used in conf/local.conf. - Furthermore, the same operation from within an image recipe may or may not - succeed depending on the specific situation. - In both these cases, the behavior is contrary to how most users expect - the += operator to work. + Furthermore, the same operation from within an image + recipe may or may not succeed depending on the specific + situation. + In both these cases, the behavior is contrary to how most + users expect the += operator to work. @@ -2996,8 +3015,8 @@ IMAGE_INSTALL_append = " package-name" - Be sure to include the space between the quotation character and the start of the - package name or names. + Be sure to include the space between the quotation character + and the start of the package name or names. @@ -5196,18 +5215,25 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" The final list of packages passed to the package manager for installation into the image. + + + Because the package manager controls actual installation of all packages, the list of packages passed using PACKAGE_INSTALL is not the final list of packages that are actually installed. - - - This variable is internal to the image construction code. - Use the + Consequently, in general, you should use the IMAGE_INSTALL variable to specify packages for installation. + The exception to this is when working with + the + core-image-minimal-initramfs + image. + When working with an initial RAM disk (initramfs) + image, use the PACKAGE_INSTALL + variable. -- cgit v1.2.3-54-g00ecf