meta: move image-mklibs image-prelink to IMAGE_CLASSES
PATCH 1/1 meta: move image-mklibs image-prelink to IMAGE_CLASSES
From: Ming Liu <[email protected]>
The code logic in image-mklibs.bbclass and image-prelink.bbclass is all about optimizing the rootfs image, so it makes more sense to put them into IMAGE_CLASSES rather than USER_CLASSES.
What's more, this fixes a potential issue by moving out image-mklibs
from INHERIT, considering that, a following dependency is missing in image-mklibs.bblcass:
...
do_rootfs[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
...
but if I add it in, I got a following error:
...
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'virtual/none-oe-none-binutils'. Close matches:
virtual/i586-oe-linux-binutils
ERROR: Nothing PROVIDES 'virtual/none-oe-none-binutils'. Close matches:
virtual/i586-oe-linux-binutils
ERROR: Nothing PROVIDES 'virtual/none-oe-none-binutils'. Close matches:
virtual/i586-oe-linux-binutils
ERROR: Nothing PROVIDES 'virtual/none-oe-none-binutils'. Close matches:
virtual/i586-oe-linux-binutils
ERROR: Nothing PROVIDES 'virtual/none-oe-none-binutils'. Close matches:
virtual/i586-oe-linux-binutils
ERROR: Nothing PROVIDES 'virtual/none-oe-none-binutils'. Close matches:
virtual/i586-oe-linux-binutils
...
this can be fixed by moving image-mklibs to IMAGE_CLASSES per test.
--- meta/conf/local.conf.sample | 15 +++++++++++---- meta/conf/local.conf.sample.extended | 6 ------ meta/recipes-devtools/prelink/prelink_git.bb | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-)
meta/conf/local.conf.sample +11 -4
@@ -118,18 +118,25 @@ PACKAGE_CLASSES ?= "package_ipk" EXTRA_IMAGE_FEATURES ?= "debug-tweaks" # -# Additional image features +# Additional user features # -# The following is a list of additional classes to use when building images which +# The following is a list of additional classes to use when bitbaking recipes which # enable extra features. Some available options which can be included in this variable # are: # - 'buildstats' collect build statistics +USER_CLASSES ?= "buildstats" + +# +# Additional image generation features +# +# The following is a list of classes to import to use in the generation of images. +# Some available options which can be included in this variable are: # - 'image-mklibs' to reduce shared library files size for an image # - 'image-prelink' in order to prelink the filesystem image +# - 'image_types_uboot' in order to generate various uboot images # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - +IMAGE_CLASSES ?= "image-mklibs image-prelink" # # Runtime testing of images
meta/conf/local.conf.sample.extended +0 -6
@@ -163,12 +163,6 @@ # Set to other values to use remote PRService. #PRSERV_HOST = "localhost:0" -# Additional image generation features -# -# The following is a list of classes to import to use in the generation of images -# currently an example class is image_types_uboot -# IMAGE_CLASSES = " image_types_uboot" - # The following options will build a companion 'debug filesystem' in addition # to the normal deployable filesystem. This companion system allows a # debugger to know the symbols and related sources. It can be used to
meta/recipes-devtools/prelink/prelink_git.bb +1 -1
@@ -156,7 +156,7 @@ pkg_postinst_prelink() { #!/bin/sh if [ "x$D" != "x" ]; then - ${@bb.utils.contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)} + ${@bb.utils.contains('IMAGE_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)} fi prelink -a
Signature · 1 line
2.7.4
Quoted 6 lines · On Thu, Jul 6, 2017 at 7:40 AM, <[email protected]> wrote:
From: Ming Liu <[email protected]>
The code logic in image-mklibs.bbclass and image-prelink.bbclass is all about optimizing the rootfs image, so it makes more sense to put them into
IMAGE_CLASSESrather thanUSER_CLASSES.
Quoted 7 lines
What's more, this fixes a potential issue by moving out image-mklibs from INHERIT, considering that, a following dependency is missing in image-mklibs.bblcass:
...
do_rootfs[depends] += "virtual/${MLPREFIX}${TARGET_ PREFIX}binutils:do_populate_sysroot"
This removes the example usage of IMAGE_CLASSES to alter the default image types inclusion in local.conf.sample.extended, but doesn’t replace it with anything, and the commit message doesn’t mention it. Either find a way to fix that example (i.e. use += or something) or at least mention that you’re removing it, particularly since adding image types is currently the most common reason to alter that variable.
Signature · 4 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics
Hi, Christopher:
I am on board, using '+=' in local.conf.sample.extended is a good idea, I will send a V2 soon.
the best,
thank you
2017-07-06 17:20 GMT+02:00 Christopher Larson <[email protected]>:
Quoted 30 lines · On Thu, Jul 6, 2017 at 7:40 AM, <[email protected]> wrote:
Quoted 7 lines
From: Ming Liu <[email protected]>
The code logic in image-mklibs.bbclass and image-prelink.bbclass is all about optimizing the rootfs image, so it makes more sense to put them into
IMAGE_CLASSESrather thanUSER_CLASSES.Quoted 7 lines
What's more, this fixes a potential issue by moving out image-mklibs from INHERIT, considering that, a following dependency is missing in image-mklibs.bblcass:
...
do_rootfs[depends] += "virtual/${MLPREFIX}${TARGET_P REFIX}binutils:do_populate_sysroot"This removes the example usage of
IMAGE_CLASSESto alter the default image types inclusion in local.conf.sample.extended, but doesn’t replace it with anything, and the commit message doesn’t mention it. Either find a way to fix that example (i.e. use += or something) or at least mention that you’re removing it, particularly since adding image types is currently the most common reason to alter that variable.
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics