Search code examples
embedded-linuxyoctobitbakerecipe

IMAGE_INSTALL vs PACKAGE_FEATURES - what's the difference?


I am trying to create my own customized linux image and I am trying to figure out how to install packages I need and found that there were multiple ways of installing packages.

I read through the yoctoproject manual and read through definitions of 'IMAGE_INSTALL' and 'FEATURE_PACKAGES' in which IMAGE_INSTALL 'specifies the packages to install into an image through image.bbclass' and FEATURE_PACKAGES 'Defines one or more packages to include in an image'. I have seen both used in the core-image.bbclass file and both use packagegroup-* so it's still unclear which is appropriate to use for what kinds of package installs.

Any human explanation of the difference between the two and what each is intended to be used for?


Solution

  • Answer from @Nayfe :

    IMAGE_INSTALL is used if you want to install any and all packages.

    FEATURE_PACKAGES is only used if you want to install packages if a FEATURE is enabled through the use of IMAGE_FEATURES.

    Original Comment:

    FEATURE_PACKAGES is intended to use in conjunction with IMAGE_FEATURES, as when an image feature xxx is enabled, corresponding packages defined in FEATURE_PACKAGES_xxx are added to image.