From nobody Fri May 3 19:25:11 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517319607908424.81715972124425; Tue, 30 Jan 2018 05:40:07 -0800 (PST) Received: from localhost ([::1]:37853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egW8t-0001sp-0m for importer@patchew.org; Tue, 30 Jan 2018 08:40:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egW7V-0000rR-1K for qemu-devel@nongnu.org; Tue, 30 Jan 2018 08:38:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egW7Q-0008QX-VE for qemu-devel@nongnu.org; Tue, 30 Jan 2018 08:38:41 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60560 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1egW7Q-0008Pv-PL for qemu-devel@nongnu.org; Tue, 30 Jan 2018 08:38:36 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0UDaP3X115316 for ; Tue, 30 Jan 2018 08:38:33 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ftpu21ag9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 30 Jan 2018 08:38:32 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Jan 2018 13:38:31 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 30 Jan 2018 13:38:29 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0UDcT5g37486662; Tue, 30 Jan 2018 13:38:29 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A02BBAE056; Tue, 30 Jan 2018 13:29:55 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9986CAE053; Tue, 30 Jan 2018 13:29:55 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 30 Jan 2018 13:29:55 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id DFD5420F6CB; Tue, 30 Jan 2018 14:38:28 +0100 (CET) From: Christian Borntraeger To: Paolo Bonzini , Peter Maydell Date: Tue, 30 Jan 2018 14:38:28 +0100 X-Mailer: git-send-email 2.13.4 In-Reply-To: <20180130133828.77336-1-borntraeger@de.ibm.com> References: <20180130133828.77336-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18013013-0012-0000-0000-000005A96977 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18013013-0013-0000-0000-000019250727 Message-Id: <20180130133828.77336-2-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-30_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801300173 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 1/1] 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 , Christian Borntraeger , qemu-s390x , Cornelia Huck , qemu-devel 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] Reviewed-by: Eric Blake --- v1->v2: - Fix email address of Alice - Fix patch prefix configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 6d8c996c62..383b14e991 100755 --- a/configure +++ b/configure @@ -1906,9 +1906,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.4