All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 08/23] staging.bbclass: staging_populate_sysroot_dir(): fix for multilib
Date: Fri, 10 Nov 2017 14:27:08 +0800	[thread overview]
Message-ID: <462acc2afc109953468e20e664953e0514718e98.1510275834.git.liezhi.yang@windriver.com> (raw)
In-Reply-To: <cover.1510275834.git.liezhi.yang@windriver.com>

Fixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake core-image-sato lib32-core-image-sato
$ bitbake build-sysroots

All lib32 manifests which had been built should be installed, but only a few
such as qemux86_64-lib32-base-files were installed (it was installed because
MACHINE_ARCH was still qemux86-64 when multilib), but others such as
x86-lib32-zlib were not installed, this was incorrect. For multilib builds,
fix-up overrides to prepend :virtclass-multilib- and then again append
additional multilib arches from the PACKAGE_EXTRA_ARCHS list if needed can fix
the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/staging.bbclass | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 412e269..455eb05 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -190,8 +190,23 @@ def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
         pkgarchs = ['${MACHINE_ARCH}']
         pkgarchs = pkgarchs + list(reversed(d.getVar("PACKAGE_EXTRA_ARCHS").split()))
         pkgarchs.append('allarch')
+
+        # Handle multilib archs
+        variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+        for variant in variants.split():
+            localdata = bb.data.createCopy(d)
+            overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
+            localdata.setVar("OVERRIDES", overrides)
+            bb.data.update_data(localdata)
+            pkgarchs_ml = localdata.getVar('PACKAGE_EXTRA_ARCHS').split()
+            for arch in pkgarchs_ml:
+                if arch not in pkgarchs:
+                    pkgarchs.append(arch)
+
         targetdir = targetsysroot
 
+    bb.debug(1, 'pkgarchs: %s' % pkgarchs)
+
     bb.utils.mkdirhier(targetdir)
     for pkgarch in pkgarchs:
         for manifest in glob.glob(d.expand("${SSTATE_MANIFESTS}/manifest-%s-*.populate_sysroot" % pkgarch)):
-- 
2.7.4



  parent reply	other threads:[~2017-11-10 13:22 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10  6:27 [PATCH 00/23] Fixes for multilib and eSDK Robert Yang
2017-11-10  6:27 ` [PATCH 01/23] staging.bbclass: make subprocess.check_output() capture stderr Robert Yang
2017-11-10  6:27 ` [PATCH 02/23] testsdk.bbclass: add a newline after own-mirrors Robert Yang
2017-11-10  6:27 ` [PATCH 03/23] populate_sdk_ext.bbclass: don't rename layers when failed Robert Yang
2017-11-10  6:27 ` [PATCH 04/23] oe/copy_buildsystem.py: make sure layer exists Robert Yang
2017-11-10  6:27 ` [PATCH 05/23] staging.bbclass: fix for multilib Robert Yang
2017-11-10  6:27 ` [PATCH 06/23] populate_sdk_ext.bbclass: " Robert Yang
2017-11-10  6:27 ` [PATCH 07/23] sstate.bbclass: sstate_hardcode_path(): " Robert Yang
2017-11-10  6:27 ` Robert Yang [this message]
2017-11-10  6:27 ` [PATCH 09/23] staging.bbclass: print searched manifest when not found Robert Yang
2017-11-20 19:58   ` Randy MacLeod
2017-11-21  1:26     ` Robert Yang
2017-11-21  2:26       ` Randy MacLeod
2017-11-21  2:42         ` Robert Yang
2017-11-10  6:27 ` [PATCH 10/23] staging.bbclass: extend_recipe_sysroot(): search multilib manifest Robert Yang
2017-11-10  6:27 ` [PATCH 11/23] image.bbclass: remove depmodwrapper-cross from DEPENDS Robert Yang
2017-11-10  6:27 ` [PATCH 12/23] package_manager.py: print running dnf command Robert Yang
2017-11-10  6:27 ` [PATCH 13/23] package_manager.py: reverse archs correctly Robert Yang
2017-11-10 14:21   ` Alexander Kanavin
2017-11-13  8:40     ` Robert Yang
2017-11-13  9:04       ` Alexander Kanavin
2017-11-13 10:23         ` Robert Yang
2017-11-13 11:15           ` Alexander Kanavin
2017-11-10  6:27 ` [PATCH 14/23] package_manager.py: remove obsolete MULTILIB_ARCHS Robert Yang
2017-11-10  6:27 ` [PATCH 15/23] multilib.bbclass: remove unneeded bb.data.inherits_class() Robert Yang
2017-11-10  6:27 ` [PATCH 16/23] multilib.bbclass: remove obsolete DEFAULTTUNE_ML_ Robert Yang
2017-11-10  6:27 ` [PATCH 17/23] multilib.bbclass: remove invalid PACKAGE_INSTALL Robert Yang
2017-11-10  6:27 ` [PATCH 18/23] multilib_global.bbclass: fix indent Robert Yang
2017-11-10  6:27 ` [PATCH 19/23] volatile-binds: use PN to replace hardcode name Robert Yang
2017-11-10  6:27 ` [PATCH 20/23] multilib.bbclass: extend allarch recipes Robert Yang
2017-11-10  6:27 ` [PATCH 21/23] toolchain-scripts.bbclass: only install all MULTILIB_VARIANTS for image Robert Yang
2017-11-10  6:27 ` [PATCH 22/23] populate_sdk_ext.bbclass: disable for multilib image Robert Yang
2017-11-10  6:27 ` [PATCH 23/23] populate_sdk_ext.bbclass: remove the try...finally Robert Yang
2017-11-10 13:34 ` [PATCH 00/23] Fixes for multilib and eSDK Robert Yang
2017-11-20  7:36 ` Robert Yang
2017-11-20  8:25   ` Richard Purdie
2017-11-20  8:48     ` Robert Yang
2017-12-26  2:25 ` Robert Yang

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=462acc2afc109953468e20e664953e0514718e98.1510275834.git.liezhi.yang@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.