(e)glibc-package: fix kernel version passed to qemu
authorRoman I Khimov <khimov@altell.ru>
Fri, 15 May 2009 11:24:53 +0000 (15:24 +0400)
committerRoman I Khimov <khimov@altell.ru>
Sun, 17 May 2009 05:23:58 +0000 (09:23 +0400)
Binary locale generation fails with

FATAL: kernel too old

if (e)glibc is configured for kernels newer than 2.6.16. This comes from
kernel version check in sysdeps/unix/sysv/linux/dl-osinfo.h. We configure
(e)glibc with "--enable-kernel=${OLDEST_KERNEL}", so to pass this check we
need kernel version reported from QEMU to (e)glibc be $OLDEST_KERNEL or higher.

Fix qemu "-r" parameter to match OLDEST_KERNEL.

Acked-by: Tom Rini <trini@embeddedalley.com>
recipes/eglibc/eglibc-package.bbclass
recipes/glibc/glibc-package.bbclass

index 7fcb558..01f698a 100644 (file)
@@ -287,7 +287,11 @@ python package_do_split_gconvs () {
 
        def output_locale_binary(name, locale, encoding):
                target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
-               qemu = "qemu-%s -r 2.6.16" % target_arch
+               kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+               if kernel_ver is None:
+                       qemu = "qemu-%s  -s 1048576" % target_arch
+               else:
+                       qemu = "qemu-%s  -s 1048576 -r %s" % (target_arch, kernel_ver)
                pkgname = 'locale-base-' + legitimize_package_name(name)
                m = re.match("(.*)\.(.*)", name)
                if m:
index 89fbd1c..8db8c5c 100644 (file)
@@ -252,7 +252,11 @@ python package_do_split_gconvs () {
                if target_arch in ("i486", "i586", "i686"):
                   target_arch = "i386"
 
-               qemu = "qemu-%s  -s 1048576 -r 2.6.16" % target_arch
+               kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+               if kernel_ver is None:
+                       qemu = "qemu-%s  -s 1048576" % target_arch
+               else:
+                       qemu = "qemu-%s  -s 1048576 -r %s" % (target_arch, kernel_ver)
                pkgname = 'locale-base-' + legitimize_package_name(name)
                m = re.match("(.*)\.(.*)", name)
                if m: