Skip to contentSkip to conversation

multilib: bug fixes related with kernel, sysroot, rpm, etc.

GIT PULL In review Dongxiao Xu 3 participants 9 messages Sep 2, 2011 – Sep 7, 2011

lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw

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
index d276d46..b00455b 100644
@@ -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
#2 lore raw

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_ARCH setting when building multilib lib32-hal, because ":=" will be extended immediately which is not the right value. Using TUNE_PKGARCH instead.

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

#3 lore raw

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/kernel

Op 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_ARCH setting when building multilib lib32-hal, because ":=" will be extended immediately which is not the right

value.

Quoted 8 lines
Quoted 1 line

Using TUNE_PKGARCH instead.

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

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

#4 lore raw

PATCH 2/5 rootfs_rpm: setting DEFAULTTUNE for multilib archs

In reply to Dongxiao Xu

To 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
index 7f24b9c..135ca75 100644
@@ -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
#5 lore raw

PATCH 3/5 multilib: set NO_MULTILIB for kernel recipes

In reply to Dongxiao Xu

Kernel 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
index bc1baa0..d522b4c 100644
@@ -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
index 5d975fd..1908aa1 100644
@@ -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
index 36793d2..9fca715 100644
@@ -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
#6 lore raw

PATCH 4/5 multilib: Using different sysroot for multilib recipes

In reply to Dongxiao Xu

Thinking 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
index 9fca715..5329eda 100644
@@ -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
#7 lore raw

PATCH 5/5 multilib: extend multilib prefix for libsdl

In reply to Dongxiao Xu

libsdl 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
index 5329eda..62bdfec 100644
@@ -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
#8 lore raw
In reply to Dongxiao Xu
Quoted 17 lines · Dongxiao Xu

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

Quoted 6 lines

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

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