From patchwork Mon May 13 06:29:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Rigby X-Patchwork-Id: 243294 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 0D0D82C0096 for ; Mon, 13 May 2013 16:32:22 +1000 (EST) Received: from localhost ([::1]:38607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbmJ2-0004m2-7d for incoming@patchwork.ozlabs.org; Mon, 13 May 2013 02:32:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbmGk-0001C5-SH for qemu-devel@nongnu.org; Mon, 13 May 2013 02:30:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbmGi-0008Ou-8n for qemu-devel@nongnu.org; Mon, 13 May 2013 02:29:58 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:56783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbmGi-0008Op-1s for qemu-devel@nongnu.org; Mon, 13 May 2013 02:29:56 -0400 Received: by mail-pd0-f179.google.com with SMTP id q10so4133289pdj.24 for ; Sun, 12 May 2013 23:29: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=VeuAdgJBcP9+ijsDAGotlRqZywucOytxBdl9+BRLRQM=; b=ZMyp/ibOX0YcLahelREPKsHwmhrXVNpbhlEzsRl37jAZK+m25Hm+RsO9p3jZGjeMeL mHA40Mb7FjS8bDnVQValXX8hD8wEXFP8guQfFk5jrmOgLMQqDoVGRgwKnXumfeuvSmUg 5QXWqiqzMYtN5MbolHZhYgqTGkJwuxIZY6OCh0+5emc9/4v5LZn9GrvxZFf8s1upyOwh VS9awrtAD00kAjEpqZC9KxE/ANwmDlARLtTf9e6mMaiTA3qV4E8v6/+jf73+rQ25WgAZ eSEF6c8r/TJlidw/phwOJSns1quYUywW3EvQwwh7EwQh7uzvD9KmLv1F8vtiJE5CYnqV kZ+Q== X-Received: by 10.66.235.69 with SMTP id uk5mr10626484pac.110.1368426595382; Sun, 12 May 2013 23:29: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 to7sm13677019pab.0.2013.05.12.23.29.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 May 2013 23:29:54 -0700 (PDT) From: John Rigby To: qemu-devel@nongnu.org Date: Mon, 13 May 2013 00:29:11 -0600 Message-Id: <1368426557-27416-7-git-send-email-john.rigby@linaro.org> X-Mailer: git-send-email 1.8.2.2 In-Reply-To: <1368426557-27416-1-git-send-email-john.rigby@linaro.org> References: <1368426557-27416-1-git-send-email-john.rigby@linaro.org> X-Gm-Message-State: ALoCoQnN9HfQ5sln0vqgHuYPtYp4kF3C4UGADCNIehiHxIcODC4kPhSrEkFuO+fpAT7n2WbIdmsS X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.179 Cc: 'Peter Maydell , John Rigby , Riku Voipio , Alexander Graf Subject: [Qemu-devel] [PATCH v3 06/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 --- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 30e93bc..1c23314 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