+++ Rob Savoye [2014-02-23 08:05 -0700]:
> On 02/23/2014 03:09 AM, Alex Bennée wrote:
> > Is this a problem with the emulated shared libraries not loading (qemu
> > itself should be static)? Wookey did find a problem when built on older
> > distros as the kernel version (CONFIG_UNAME) passed to the emulated
> > system cause libc to get confused as older kernels don't support aarch64!
> 
>   Ah... It works fine on Ubuntu saucy, but not on Ubuntu precise, which
> is what the build farm machine run. Is there a workaround short of
> upgrading all the TCWG build machines ?
> 
> > Debian is carrying a patch that forces the kernel version to be reported
> > to libc as 3.8.
>   Is this a kernel patch or q qemu patch ?

There is an ubuntu qemu patch which reports later uname on aarch64
(below). But it turns out that if you build qemu_without_ the configure
option --enable-uname-release then the ubuntu patch is no longer needed
as qemu itself now DTRT (reporting an appropriate minimum uname version
on a per-arch basis).

This was the ubuntu patch to force this:

Index: qemu-1.7.50+dfsg/linux-user/main.c
===================================================================
--- qemu-1.7.50+dfsg.orig/linux-user/main.c     2014-02-17 15:25:03.000000000 
+0000
+++ qemu-1.7.50+dfsg/linux-user/main.c  2014-02-18 16:23:10.340055485 +0000
@@ -69,7 +69,15 @@
 static void usage(void);
 
 static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
-const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
+
+/* arm64 glibc requires a kernel with arm64 support. Qemu needs to report one. 
*/
+#ifdef TARGET_AARCH64
+# define UNAME_RELEASE "3.7.0"
+#else
+# define UNAME_RELEASE CONFIG_UNAME_RELEASE
+#endif
+
+const char *qemu_uname_release = UNAME_RELEASE;
 
 /* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
    we allocate a bigger stack. Need a better solution, for example

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to