[oe] defining FEATURE_PACKAGES_* in core-image.bbclass vs image.bbclass

Rudolf Streif rstreif at linuxfoundation.org
Mon Jul 14 22:43:26 UTC 2014


>
>
>   then i noticed that the "splash" feature is defined, not in
> core-image.bbclass, but in the more basic image.bbclass, as is
> package-management:
>
> FEATURE_PACKAGES_package-management = "${ROOTFS_PKGMANAGE}"
> SPLASH ?= "psplash"
> FEATURE_PACKAGES_splash = "${SPLASH}"
>
> And then there is debug-tweaks for which the hooks are defined in
image.bbclass including the function zap_empty_root_password but the
post-processing is added to the variable by core-image.bbclass:

core-image.bbclass: ROOTFS_POSTPROCESS_COMMAND +=
'${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "",
"zap_empty_root_password ; ",d)}'

Since image.bbclass also adds the debug-tweaks to the valid image feature
list

image.bbclass:IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs"

my inclination would be to move the addition to ROOTFS_POSTPROCESS_COMMAND
from core-image.bbclass to image.bbclass.

The image feature readonly-rootfs is also added to the valid list by
image.bbclass.

Consequently this makes the image features splash, debug-tweaks,
package-management, splash and readonly-rootfs available to image recipes
that inherit image.bbclass while h/w codecs and others are added by
core-image.bbclass and are only available when an image recipe inherits
core-image.

Then there are the image features dbg-pkgs, dev-pkgs, doc-pkgs,
staticdev-pkgs and ptest-pkgs which are added to the image feature list by
populate_sdk_base.bbclass which image.bbclass inherits and hence they are
available to all images.


>   so is there some rationale for deciding which FEATURE_PACKAGES
> settings are defined in core-image, while others are defined in
> image?
>

That I do not really know. However, to some extend the choices as to what
class adds what image features make sense, alth

   - The minimal set of features splash, debug-tweaks, package-management,
   splash and readonly-rootfs to be added by the basic image.bbclass.
   - Extended image features added by core-image.bbclass.
   - SDK related image features by the populate_sdk_base.bbclass.

My $0.02

Cheers,
:rjs



More information about the Openembedded-devel mailing list