Openembedded Core Discussions
 help / color / mirror / Atom feed
From: liu.ming50@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Ming Liu <peter.x.liu@external.atlascopco.com>
Subject: [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES
Date: Thu,  6 Jul 2017 16:40:19 +0200	[thread overview]
Message-ID: <1499352019-27001-1-git-send-email-liu.ming50@gmail.com> (raw)

From: Ming Liu <peter.x.liu@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@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



             reply	other threads:[~2017-07-06 14:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 14:40 liu.ming50 [this message]
2017-07-06 15:20 ` [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES Christopher Larson
2017-07-07  3:37   ` Ming Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499352019-27001-1-git-send-email-liu.ming50@gmail.com \
    --to=liu.ming50@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.x.liu@external.atlascopco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox