multilib: bug fixes related with kernel, sysroot, rpm, etc.
Hi Richard,
This pull request fixes several multilib bugs.
Please help to review and pull.
Thanks,
Dongxiao
The following changes since commit 06625096f897235ed85f0d9a1355497f92938454:
scripts: Don't show errors from which ifconfig failing (2011-09-01 20:49:44 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dxu4/ml
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/ml
Dongxiao Xu (5):
hal: Remove build time dependency of virtual/kernel
rootfs_rpm: setting DEFAULTTUNE for multilib archs
multilib: set NO_MULTILIB for kernel recipes
multilib: Using different sysroot for multilib recipes
multilib: extend multilib prefix for libsdl
meta/classes/kernel.bbclass | 1 + meta/classes/multilib.bbclass | 11 +++++++++++ meta/classes/rootfs_rpm.bbclass | 3 +++ meta/conf/multilib.conf | 5 ++++- meta/recipes-support/hal/hal.inc | 7 +++---- 5 files changed, 22 insertions(+), 5 deletions(-)
PATCH 1/5 hal: Remove build time dependency of virtual/kernel
hal has runtime dependency on kernel, but not build time. Remove it from "DEPENDS" list.
Also fix a wrong PACKAGE_ARCH setting when building multilib lib32-hal, because ":=" will be extended immediately which is not the right value. Using TUNE_PKGARCH instead.
--- meta/recipes-support/hal/hal.inc | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
meta/recipes-support/hal/hal.inc +3 -4
@@ -6,7 +6,7 @@ SECTION = "unknown" LICENSE = "GPLv2+ | AFL" LIC_FILES_CHKSUM = "file://COPYING;md5=5b5ffd59fbb7c2fff6de76c94177af31" -DEPENDS = "virtual/kernel dbus-glib udev util-linux intltool intltool-native expat libusb gperf-native" +DEPENDS = "dbus-glib udev util-linux intltool intltool-native expat libusb gperf-native" RDEPENDS_${PN} += "udev hal-info" SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz \
@@ -30,9 +30,8 @@ EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \ ${@base_contains('MACHINE_FEATURES', 'acpi', '--enable-acpi', '--disable-acpi',d)} \ " -MY_ARCH := "${PACKAGE_ARCH}" -PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${MY_ARCH}',d)}" -PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}',d)}" +PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${TUNE_PKGARCH}',d)}" +PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${TUNE_PKGARCH}',d)}" do_install_append() { install -d ${D}/etc/dbus-1/event.d
Signature · 1 line
1.7.1
Re: [PATCH 1/5] hal: Remove build time dependency of virtual/kernel
Op 2 sep. 2011, om 11:03 heeft Dongxiao Xu het volgende geschreven:
Quoted 6 lines
hal has runtime dependency on kernel, but not build time. Remove it from "DEPENDS" list.
Also fix a wrong
PACKAGE_ARCHsetting when building multilib lib32-hal, because ":=" will be extended immediately which is not the right value. UsingTUNE_PKGARCHinstead.
After this patch it fails to build with:
| probe-video4linux.c:33:28: fatal error: linux/videodev.h: No such file or directory
Which does look like a kernel header to me
Re: [PATCH 1/5] hal: Remove build time dependency of virtual/kernel
Quoted 18 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Koen Kooi
Sent: Wednesday, September 07, 2011 4:36 PM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 1/5] hal: Remove build time dependency of virtual/kernelOp 2 sep. 2011, om 11:03 heeft Dongxiao Xu het volgende geschreven:
Quoted 5 lines
hal has runtime dependency on kernel, but not build time. Remove it from "DEPENDS" list.
Also fix a wrong
PACKAGE_ARCHsetting when building multilib lib32-hal, because ":=" will be extended immediately which is not the rightvalue.
Quoted 8 lines
Quoted 1 line
Using
TUNE_PKGARCHinstead.After this patch it fails to build with:
| probe-video4linux.c:33:28: fatal error:
linux/videodev.h: No such file | or directoryWhich does look like a kernel header to me
Thanks Koen, it seems that we still need to draw back "virtual/kernel" as hal's DEPENDS.
Thanks,
Dongxiao
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH 2/5 rootfs_rpm: setting DEFAULTTUNE for multilib archs
In reply to Dongxiao XuTo get the MULTILIB_PACKAGE_ARCHS, we need to get the corresponding DEFAULTTUNE value. This fixes the multilib arch directory missing issue in solvedb-ml_archs.conf.
--- meta/classes/rootfs_rpm.bbclass | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
meta/classes/rootfs_rpm.bbclass +3 -0
@@ -215,6 +215,9 @@ python () { eext = ext.split(':') if len(eext) > 1 and eext[0] == 'multilib': localdata = bb.data.createCopy(d) + default_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False) + if default_tune: + localdata.setVar("DEFAULTTUNE", default_tune) ml_package_archs += localdata.getVar("PACKAGE_ARCHS", True) or "" #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides)) bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs, d)
Signature · 1 line
1.7.1
PATCH 3/5 multilib: set NO_MULTILIB for kernel recipes
In reply to Dongxiao XuKernel in a Linux system shouldn't be multilib, thus setting NO_MULTILIB flag for kernel.bbclass. Besides if other recipes have dependency on virtual/kernel or kernel-module-*, we don't extend name for them.
Some part of the commit is derived from Ke's prototype in:
http://bugzilla.pokylinux.org/show_bug.cgi?id=1361
[YOCTO #1361]
--- meta/classes/kernel.bbclass | 1 + meta/classes/multilib.bbclass | 11 +++++++++++ meta/conf/multilib.conf | 1 - 3 files changed, 12 insertions(+), 1 deletions(-)
meta/classes/kernel.bbclass +1 -0
@@ -9,6 +9,7 @@ INHIBIT_DEFAULT_DEPS = "1" KERNEL_IMAGETYPE ?= "zImage" INITRAMFS_IMAGE ?= "" INITRAMFS_TASK ?= "" +NO_MULTILIB = "1" python __anonymous () { kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or ''
meta/classes/multilib.bbclass +11 -0
@@ -6,6 +6,11 @@ python multilib_virtclass_handler () { variant = e.data.getVar("BBEXTENDVARIANT", True) if cls != "multilib" or not variant: return + + if e.data.getVar("NO_MULTILIB", True) == "1": + bb.warn("NO_MULTILIB is set for %s, using the default instead." % e.data.getVar("PN", True)) + return + save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or "" for name in save_var_name.split(): val=e.data.getVar(name, True)
@@ -28,7 +33,13 @@ STAGINGCC_prepend = "${BBEXTENDVARIANT}-" python __anonymous () { variant = d.getVar("BBEXTENDVARIANT", True) + if d.getVar("NO_MULTILIB", True) == "1": + bb.warn("NO_MULTILIB is set for %s, using the default instead." % d.getVar("PN", True)) + return + def extend_name(name): + if name == "virtual/kernel" or name.startswith("kernel-module"): + return name if name.startswith("virtual/"): subs = name.split("/", 1)[1] if not subs.startswith(variant):
meta/conf/multilib.conf +0 -1
@@ -237,7 +237,6 @@ BBCLASSEXTEND_append_pn-libxxf86vm = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-libzypp = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-lighttpd = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-linux-libc-headers = " ${MULTILIBS}" -BBCLASSEXTEND_append_pn-linux-yocto = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-logrotate = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-lrzsz = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-lsb = " ${MULTILIBS}"
Signature · 1 line
1.7.1
PATCH 4/5 multilib: Using different sysroot for multilib recipes
In reply to Dongxiao XuThinking of the senario that, if we already built out a 64bit image along with the full toolchain bootstrapped, then we need to build some 32bit libraries, which needs lib32 versions of gcc and eglibc. These toolchain recipes will bootstrap again in the same sysroot, resulting that lib32-gcc-cross-initial will find some macros owned by eglibc have already been defined and thus it includes non-existed headers that provided by later lib32-eglibc.
The solution for the above issue is to use different sysroot for multilib recipes, here we add ${MLPREFIX} in front of the machine specific sysroot directory name.
[YOCTO #1372]
--- meta/conf/multilib.conf | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
meta/conf/multilib.conf +3 -0
@@ -6,6 +6,9 @@ MULTILIB_SAVE_VARNAME = "DEFAULTTUNE" MULTILIBS ??= "multilib:lib32" +STAGING_DIR_HOST = "${STAGING_DIR}/${MLPREFIX}${MACHINE}" +STAGING_DIR_TARGET = "${STAGING_DIR}/${MLPREFIX}${MACHINE}" + BBCLASSEXTEND_append_pn-acl = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-alsa-lib = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-alsa-utils = " ${MULTILIBS}"
Signature · 1 line
1.7.1
PATCH 5/5 multilib: extend multilib prefix for libsdl
In reply to Dongxiao Xulibsdl is required by sato image, so extend it for multilib.
--- meta/conf/multilib.conf | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
meta/conf/multilib.conf +1 -0
@@ -450,3 +450,4 @@ BBCLASSEXTEND_append_pn-xwininfo = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-zip = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-zlib = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-zypper = " ${MULTILIBS}" +BBCLASSEXTEND_append_pn-libsdl = " ${MULTILIBS}"
Signature · 1 line
1.7.1
Quoted 17 lines · Dongxiao Xu
Hi Richard,
This pull request fixes several multilib bugs.
Please help to review and pull.Thanks,
DongxiaoThe following changes since commit
06625096f897235ed85f0d9a1355497f92938454:scripts: Don't show errors from which ifconfig failing (2011-09-01 20:49:44 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contribdxu4/ml
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/ml
Quoted 6 lines
Dongxiao Xu (5):
hal: Remove build time dependency of virtual/kernel
rootfs_rpm: setting DEFAULTTUNE for multilib archs
multilib: setNO_MULTILIBfor kernel recipes
multilib: Using different sysroot for multilib recipes
multilib: extend multilib prefix for libsdl
I took these apart from the NO_MULTILIB one since I have a different solution in mind for that one (which we can extend to all arch packages).
Cheers,
Richard