aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2013-05-13 22:33:00 -0600
committerPeter Maydell <peter.maydell@linaro.org>2013-05-20 19:13:22 +0100
commitff404779ecdfe7399e495a5c21c85274efe84238 (patch)
tree4beaef0ff8b19c53163e8c0fee25edc9636e4864
parent3b403f6c1ed0978797232f83b643e62721dc9df1 (diff)
downloadqemu-arm-ff404779ecdfe7399e495a5c21c85274efe84238.tar.gz
linux-user: AArch64 requires at least 3.8.0
Glibc 1.17 checks for the host kernel version on startup. Unfortunately, it also checks whether the host kernel version is recent enough for the target to run at all. Since AArch64 support only got introduced in 3.8.0, that means that glibc refuses to run on any older kernel version than that. To allow for execution of linux-user guests even on older host kernels, let's always fake the kernel version to 3.8.0 on AArch64 guests. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: John Rigby <john.rigby@linaro.org> Message-id: 1368505980-17151-13-git-send-email-john.rigby@linaro.org
-rw-r--r--linux-user/syscall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 33455088f3..171424efea 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -316,7 +316,12 @@ static int sys_uname(struct new_utsname *buf)
memset(buf, 0, sizeof(*buf));
COPY_UTSNAME_FIELD(buf->sysname, uts_buf.sysname);
COPY_UTSNAME_FIELD(buf->nodename, uts_buf.nodename);
+#ifdef TARGET_AARCH64
+ /* glibc refuses to run on older kernels */
+ COPY_UTSNAME_FIELD(buf->release, "3.8.0");
+#else
COPY_UTSNAME_FIELD(buf->release, uts_buf.release);
+#endif
COPY_UTSNAME_FIELD(buf->version, uts_buf.version);
COPY_UTSNAME_FIELD(buf->machine, uts_buf.machine);
#ifdef _GNU_SOURCE