* [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES
@ 2017-07-06 14:40 liu.ming50
2017-07-06 15:20 ` Christopher Larson
0 siblings, 1 reply; 3+ messages in thread
From: liu.ming50 @ 2017-07-06 14:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Ming Liu
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES
2017-07-06 14:40 [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES liu.ming50
@ 2017-07-06 15:20 ` Christopher Larson
2017-07-07 3:37 ` Ming Liu
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2017-07-06 15:20 UTC (permalink / raw)
To: Ming Liu; +Cc: Ming Liu, Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]
On Thu, Jul 6, 2017 at 7:40 AM, <liu.ming50@gmail.com> wrote:
> 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"
>
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.
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 1710 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES
2017-07-06 15:20 ` Christopher Larson
@ 2017-07-07 3:37 ` Ming Liu
0 siblings, 0 replies; 3+ messages in thread
From: Ming Liu @ 2017-07-07 3:37 UTC (permalink / raw)
To: Christopher Larson
Cc: Ming Liu, Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
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 <kergoth@gmail.com>:
>
>
> On Thu, Jul 6, 2017 at 7:40 AM, <liu.ming50@gmail.com> wrote:
>
>> 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_P
>> REFIX}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.
> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics
>
[-- Attachment #2: Type: text/html, Size: 2541 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-07 3:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-06 14:40 [PATCH] meta: move image-mklibs image-prelink to IMAGE_CLASSES liu.ming50
2017-07-06 15:20 ` Christopher Larson
2017-07-07 3:37 ` Ming Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox