From patchwork Mon Jul 1 17:35:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 18213 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f197.google.com (mail-ye0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AFBFF2774B for ; Mon, 1 Jul 2013 17:35:34 +0000 (UTC) Received: by mail-ye0-f197.google.com with SMTP id q4sf3711039yen.4 for ; Mon, 01 Jul 2013 10:35:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=/nMaIM7y2NPqyhNBqsMLyG8d8/LpZ2VTAVKQmUvwtWY=; b=fv4h4KXQWwDKDI2gNpnAjta215t6z+jj0NrJa0RRkQfr5+1VXdsDDCKRPW+HQTD50n Q/Y7zccRZMr7UC2IZTrznXcuIDHqyBiIlf89wD36+lIjWE4Oq6K2qFuVOKx5CGWCyW7a mOogFoDGUd8LDPd+Gw77jpmQivOQ/0i8o+fDqI6nr8i5yGSmg081hyhRd10gKjTY2IR5 7zwtHV5DUnQOjTW3TX9u+1Wnmcx+zH14FDEjU1+oCckMLFSBqzoXwisY+oem/5XG4zhF KooqYXMfy0sGH6OTUJWMBnz7e2Okm9JBtXeFUzLU79XE1gSOQ4ov6MmvMQ/vWBx4jOkL 69rw== X-Received: by 10.236.156.33 with SMTP id l21mr14553410yhk.18.1372700133897; Mon, 01 Jul 2013 10:35:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.59.111 with SMTP id y15ls2199077qeq.96.gmail; Mon, 01 Jul 2013 10:35:33 -0700 (PDT) X-Received: by 10.52.120.101 with SMTP id lb5mr1600281vdb.11.1372700133785; Mon, 01 Jul 2013 10:35:33 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id vg3si4982787vec.100.2013.07.01.10.35.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Jul 2013 10:35:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ha12so2153204vcb.7 for ; Mon, 01 Jul 2013 10:35:33 -0700 (PDT) X-Received: by 10.58.215.200 with SMTP id ok8mr10025417vec.21.1372700133696; Mon, 01 Jul 2013 10:35:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp289811veb; Mon, 1 Jul 2013 10:35:33 -0700 (PDT) X-Received: by 10.152.5.6 with SMTP id o6mr12556229lao.48.1372700127539; Mon, 01 Jul 2013 10:35:27 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id o7si6596885lao.146.2013.07.01.10.35.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Jul 2013 10:35:27 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Uti0b-0002MF-Qg; Mon, 01 Jul 2013 18:35:25 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Andreas Schwab , "Mian M. Hamayun" Subject: [PATCH v5 18/21] linux-user: AArch64 requires at least 3.8.0 Date: Mon, 1 Jul 2013 18:35:17 +0100 Message-Id: <1372700120-8896-19-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372700120-8896-1-git-send-email-peter.maydell@linaro.org> References: <1372700120-8896-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkCLgyrIGHHvNKmM5rHci81Rft0Ahy8D10IvJeQuFLvXAQ+I1TQUVqmuaUbVo4XOK0Yhadk X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Message-id: 1368505980-17151-13-git-send-email-john.rigby@linaro.org Signed-off-by: Peter Maydell --- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 802ec95..c2497e4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -304,7 +304,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