[OE-core] [PATCH 04/12] staging.bbclass: staging_populate_sysroot_dir(): fix for multilib
Robert Yang
liezhi.yang at windriver.com
Mon Jan 8 09:33:01 UTC 2018
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 at 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
More information about the Openembedded-core
mailing list