* [PATCH 0/1] features_backfill: fix for multilib @ 2017-12-07 2:33 jackie.huang 2017-12-07 2:33 ` [PATCH 1/1] " jackie.huang 2017-12-07 14:59 ` [rocko] Re: [PATCH 0/1] " Mark Hatle 0 siblings, 2 replies; 3+ messages in thread From: jackie.huang @ 2017-12-07 2:33 UTC (permalink / raw) To: openembedded-core From: Jackie Huang <jackie.huang@windriver.com> Tested with: 1) local.conf: MACHINE = "qemumips64" MULTILIB_GLOBAL_VARIANTS_append = " libn32" MULTILIBS = "multilib:libn32" DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32" require conf/multilib.conf 2) run bitbake -e to check the features: $ bitbake -e libn32-gobject-introspection | grep '^MACHINE_FEATURES' (before the fix) MACHINE_FEATURES="alsa bluetooth usbgadget screen rtc qemu-usermode" MACHINE_FEATURES_BACKFILL="rtc qemu-usermode" MACHINE_FEATURES_BACKFILL_CONSIDERED=" qemu-usermode" (after the fix) MACHINE_FEATURES="alsa bluetooth usbgadget screen rtc" MACHINE_FEATURES_BACKFILL="rtc qemu-usermode" MACHINE_FEATURES_BACKFILL_CONSIDERED=" qemu-usermode" MACHINE_FEATURES_ORIGINAL="alsa bluetooth usbgadget screen" 3) world build: $ bitbake world builds without error. -- The following changes since commit 4469acdf1d0338220f3fe2ecb5e079eea6fda375: lib/oe/utils: remove param_bool() (2017-12-02 11:25:34 +0000) are available in the git repository at: git://git.pokylinux.org/poky-contrib.git jhuang0/d_backfill_multilib_171207_0 http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_backfill_multilib_171207_0 Jackie Huang (1): features_backfill: fix for multilib meta/classes/multilib.bbclass | 4 ++++ meta/lib/oe/utils.py | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] features_backfill: fix for multilib 2017-12-07 2:33 [PATCH 0/1] features_backfill: fix for multilib jackie.huang @ 2017-12-07 2:33 ` jackie.huang 2017-12-07 14:59 ` [rocko] Re: [PATCH 0/1] " Mark Hatle 1 sibling, 0 replies; 3+ messages in thread From: jackie.huang @ 2017-12-07 2:33 UTC (permalink / raw) To: openembedded-core From: Jackie Huang <jackie.huang@windriver.com> The backfilling feature doesn't work for multilib, e.g. build with: MACHINE = "qemumips64" MULTILIB_GLOBAL_VARIANTS_append = " libn32" MULTILIBS = "multilib:libn32" DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32" require conf/multilib.conf And we have backfill_considered in machine/include/mips/arch-mips.inc: MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'qemu-usermode', '', d)}" For libn32 builds, 'qemu-usermode' is not expected but it still presents in MACHINE_FEATURES. To fix the issue: * Change the oe.utils.features_backfill to always compare with the original features(before backfilled), so we can run the function multiple times when needed. * run oe.utils.features_backfill at the end of multilib_virtclass_handler to update the backfilled features to ensure it's correct for multilib. [YOCTO #12373] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> --- meta/classes/multilib.bbclass | 4 ++++ meta/lib/oe/utils.py | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index 816f54e..589ee37 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass @@ -77,6 +77,10 @@ python multilib_virtclass_handler () { if newtune: e.data.setVar("DEFAULTTUNE", newtune) e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune) + + # Update the backfilled features after DEFAULTTUNE changed + oe.utils.features_backfill("DISTRO_FEATURES", e.data) + oe.utils.features_backfill("MACHINE_FEATURES", e.data) } addhandler multilib_virtclass_handler diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 1897c5f..371acd0 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -107,13 +107,18 @@ def features_backfill(var,d): backfill = (d.getVar(var+"_BACKFILL") or "").split() considered = (d.getVar(var+"_BACKFILL_CONSIDERED") or "").split() + features_original = (d.getVar(var + "_ORIGINAL") or "").split() + if not features_original: + features_original = features + d.setVar(var + "_ORIGINAL", " ".join(features_original)) + addfeatures = [] for feature in backfill: - if feature not in features and feature not in considered: + if feature not in features_original and feature not in considered: addfeatures.append(feature) if addfeatures: - d.appendVar(var, " " + " ".join(addfeatures)) + d.setVar(var, " ".join(features_original) + " " + " ".join(addfeatures)) def all_distro_features(d, features, truevalue="1", falsevalue=""): """ -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [rocko] Re: [PATCH 0/1] features_backfill: fix for multilib 2017-12-07 2:33 [PATCH 0/1] features_backfill: fix for multilib jackie.huang 2017-12-07 2:33 ` [PATCH 1/1] " jackie.huang @ 2017-12-07 14:59 ` Mark Hatle 1 sibling, 0 replies; 3+ messages in thread From: Mark Hatle @ 2017-12-07 14:59 UTC (permalink / raw) To: jackie.huang, openembedded-core, Armin Kuster Armin, assuming there are no concerns raised in review and this is integrated into master, we'd like to get this backported to Rocko as well. (I believe the patch can be applied as-is.) Thanks! --Mark On 12/6/17 8:33 PM, jackie.huang@windriver.com wrote: > From: Jackie Huang <jackie.huang@windriver.com> > > Tested with: > > 1) local.conf: > MACHINE = "qemumips64" > MULTILIB_GLOBAL_VARIANTS_append = " libn32" > MULTILIBS = "multilib:libn32" > DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32" > require conf/multilib.conf > > 2) run bitbake -e to check the features: > > $ bitbake -e libn32-gobject-introspection | grep '^MACHINE_FEATURES' > > (before the fix) > MACHINE_FEATURES="alsa bluetooth usbgadget screen rtc qemu-usermode" > MACHINE_FEATURES_BACKFILL="rtc qemu-usermode" > MACHINE_FEATURES_BACKFILL_CONSIDERED=" qemu-usermode" > > (after the fix) > MACHINE_FEATURES="alsa bluetooth usbgadget screen rtc" > MACHINE_FEATURES_BACKFILL="rtc qemu-usermode" > MACHINE_FEATURES_BACKFILL_CONSIDERED=" qemu-usermode" > MACHINE_FEATURES_ORIGINAL="alsa bluetooth usbgadget screen" > > 3) world build: > > $ bitbake world > > builds without error. > > > -- > The following changes since commit 4469acdf1d0338220f3fe2ecb5e079eea6fda375: > > lib/oe/utils: remove param_bool() (2017-12-02 11:25:34 +0000) > > are available in the git repository at: > > git://git.pokylinux.org/poky-contrib.git jhuang0/d_backfill_multilib_171207_0 > http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_backfill_multilib_171207_0 > > Jackie Huang (1): > features_backfill: fix for multilib > > meta/classes/multilib.bbclass | 4 ++++ > meta/lib/oe/utils.py | 9 +++++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-07 14:59 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-12-07 2:33 [PATCH 0/1] features_backfill: fix for multilib jackie.huang 2017-12-07 2:33 ` [PATCH 1/1] " jackie.huang 2017-12-07 14:59 ` [rocko] Re: [PATCH 0/1] " Mark Hatle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox