[OE-core] [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES

liu.ming50 at gmail.com liu.ming50 at gmail.com
Thu Jul 6 14:40:19 UTC 2017


From: Ming Liu <peter.x.liu at external.atlascopco.com>

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.

Signed-off-by: Ming Liu <peter.x.liu at external.atlascopco.com>
---
 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(-)

diff --git a/meta/conf/local.conf.sample b/meta/conf/local.conf.sample
index b754853..b8d9532 100644
--- a/meta/conf/local.conf.sample
+++ b/meta/conf/local.conf.sample
@@ -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
diff --git a/meta/conf/local.conf.sample.extended b/meta/conf/local.conf.sample.extended
index 5d6c37d..63475c6 100644
--- a/meta/conf/local.conf.sample.extended
+++ b/meta/conf/local.conf.sample.extended
@@ -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
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 4529dbf..573157d 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -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
-- 
2.7.4




More information about the Openembedded-core mailing list