From nobody Mon Feb 9 10:28:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518168468253183.107418996584; Fri, 9 Feb 2018 01:27:48 -0800 (PST) Received: from localhost ([::1]:52924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek4yB-0003G2-E3 for importer@patchew.org; Fri, 09 Feb 2018 04:27:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek4w9-0001rN-Jv for qemu-devel@nongnu.org; Fri, 09 Feb 2018 04:25:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ek4w4-0005rV-JA for qemu-devel@nongnu.org; Fri, 09 Feb 2018 04:25:41 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38376 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ek4w4-0005qd-EV; Fri, 09 Feb 2018 04:25:36 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A70F6EAE87; Fri, 9 Feb 2018 09:25:33 +0000 (UTC) Received: from localhost (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D49612166BAE; Fri, 9 Feb 2018 09:25:32 +0000 (UTC) From: Cornelia Huck To: peter.maydell@linaro.org Date: Fri, 9 Feb 2018 10:24:56 +0100 Message-Id: <20180209092524.31348-2-cohuck@redhat.com> In-Reply-To: <20180209092524.31348-1-cohuck@redhat.com> References: <20180209092524.31348-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 09 Feb 2018 09:25:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 09 Feb 2018 09:25:33 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 01/29] Fix configure for s390 qemu on alpine and other busybox environments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alice Frosi , thuth@redhat.com, david@redhat.com, Cornelia Huck , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Alice Frosi In alpine docker image the qemu-system-s390x build is broken and it throws this error: qemu-system-s390x: Initialization of device s390-ipl failed: could not load bootloader 's390-ccw.img' The grep command of busybox uses regex. This fails on binary data (e.g. stops on every \0), so it does not identify the string BiGeNdIaN in the test case big/little. Therefore, it assumes that the architecture is little endian. This fix solves the grep problem by printing the content of TMPO with strings Signed-off-by: Alice Frosi Signed-off-by: Christian Borntraeger [some changes to patch description, add -a option to strings] Message-Id: <20180130133828.77336-2-borntraeger@de.ibm.com> Reviewed-by: Eric Blake Signed-off-by: Cornelia Huck --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 831ebf248f..1be413a004 100755 --- a/configure +++ b/configure @@ -1933,9 +1933,9 @@ int main(int argc, char *argv[]) { EOF =20 if compile_object ; then - if grep -q BiGeNdIaN $TMPO ; then + if strings -a $TMPO | grep -q BiGeNdIaN ; then bigendian=3D"yes" - elif grep -q LiTtLeEnDiAn $TMPO ; then + elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then bigendian=3D"no" else echo big/little test failed --=20 2.13.6