From patchwork Tue May 14 04:33:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Rigby X-Patchwork-Id: 243598 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 933C92C00B7 for ; Tue, 14 May 2013 14:39:40 +1000 (EST) Received: from localhost ([::1]:51658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uc71W-0007Ls-Pf for incoming@patchwork.ozlabs.org; Tue, 14 May 2013 00:39:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uc6w2-0007y3-TK for qemu-devel@nongnu.org; Tue, 14 May 2013 00:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uc6w0-0008QQ-Hg for qemu-devel@nongnu.org; Tue, 14 May 2013 00:33:58 -0400 Received: from mail-pb0-x234.google.com ([2607:f8b0:400e:c01::234]:52593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uc6w0-0008QD-C3 for qemu-devel@nongnu.org; Tue, 14 May 2013 00:33:56 -0400 Received: by mail-pb0-f52.google.com with SMTP id xa7so80421pbc.11 for ; Mon, 13 May 2013 21:33:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=QYA88vr3zSAlngFxMy7K/De0JQTZSj+YrebR7k5uXRc=; b=by2E1VngRxf4qYzUFJeSyq2qRa4pCH/RGuYpyLygnBNSt6qsZ7TOyw+HYEGg4fs32y sseBBSR6jd/rpjlXhu9HxjQSxOSLhqu2iNqV8MHrhxAjGRCH4RCi6gbU0siwdHjiT2I0 8omB+YLWzkQlTXRfku16XM7AY45v7gww6B7aDi9w8BXxiEP3T7x0d6jEWd5/xCfT3aAs Yyy2ZEvbGz0YbCbG13d7uu6knk9+oSQvZBXzGafSJn5WBZEODhRxrp/cuIdQ4coy8+mB ZVkzA0K7s33sQQR9SPt1h0XMiAWz6PgFaGJQ8Dyz3lGOVfF1fCWRwsbhicNCZ+SQI8ub fxtw== X-Received: by 10.68.190.104 with SMTP id gp8mr32331035pbc.120.1368506035584; Mon, 13 May 2013 21:33:55 -0700 (PDT) Received: from localhost.localdomain (c-76-23-54-220.hsd1.ut.comcast.net. [76.23.54.220]) by mx.google.com with ESMTPSA id yj2sm12841472pbb.40.2013.05.13.21.33.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 21:33:54 -0700 (PDT) From: John Rigby To: qemu-devel@nongnu.org Date: Mon, 13 May 2013 22:33:00 -0600 Message-Id: <1368505980-17151-13-git-send-email-john.rigby@linaro.org> X-Mailer: git-send-email 1.8.2.2 In-Reply-To: <1368505980-17151-1-git-send-email-john.rigby@linaro.org> References: <1368505980-17151-1-git-send-email-john.rigby@linaro.org> X-Gm-Message-State: ALoCoQmfdKiarJjBx4E9hx29ED+L5rtdtzcLzSYORYKMONACooimSqb8IuByUXxyocf1lNDchtRQ X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::234 Cc: 'Peter Maydell , John Rigby , Riku Voipio , 'Alexander Graf Subject: [Qemu-devel] [PATCH v4 12/12] linux-user: AArch64 requires at least 3.8.0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Alexander Graf 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 Signed-off-by: John Rigby --- Changes in v4: - Go back to original way of doing this as I lack the config-fu to do it via changes in configure linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3345508..171424e 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