What is the difference between IMAGE_INSTALL and IMAGE_FEATURES in Yocto.
I have seen to enable splash screen in Yocto. We need to write the following to local.conf
IMAGE_FEATURES += "splash"
Why can't I use IMAGE_INSTALL here
IMAGE_INSTALL += "splash"
Can anyone please tell me when should I use IMAGE_FEATURES and IMAGE_INSTALL?
You can think of IMAGE_FEATURES
(and EXTRA_IMAGE_FEATURES
) as a variable containing a list of "switches" (features, selected from a predefined feature list, that depend on the base class of the target image) that tells the build system to automatically append a given set of packages, and/or different package configurations, to the IMAGE_INSTALL
variable. Recipes can check (and append) for specific features in this variable in order to change its default configuration/build process accordingly.
Hence, by adding "splash" to IMAGE_FEATURES
you're telling the build system to add the "psplash" package (by default, you can choose other package to provide this feature by modifying the SPLASH
variable) to IMAGE_INSTALL
through the FEATURE_PACKAGES_splash = ${SPLASH}
statement in poky/meta/classes/image.bbclass
.
However, you can directly add "psplash" to IMAGE_INSTALL
but it is highly likely that some additional packages relating to the "splash" feature will be misconfigured since they won't notice about it (maybe, this is not a big deal in this case...but it definitely could lead to issues in others). That's why you can't (shouldn't) simply add "splash" to IMAGE_INSTALL
(in addition to the fact that there is no pacakge named "splash"); the IMAGE_INSTALL
variable just keeps a list of packages to be installed in the target image.
For further information refer to the manual.
IMAGE_FEATURES
is made to enable special features for your image, such as empty password for root, debug image, special packages, x11, splash, ssh-server...
You can find the description and the feature list here.
For the splash
example, this feature add a recipe psplash
:
splash: Enables showing a splash screen during boot. By default, this screen is provided by psplash, which does allow customization. If you prefer to use an alternative splash screen package, you can do so by setting the SPLASH variable to a different package name (or names) within the image recipe or at the distro configuration level.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With