From patchwork Wed Jul 31 14:11:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Fancellu X-Patchwork-Id: 13748841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA994C3DA64 for ; Wed, 31 Jul 2024 14:12:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gkEmoENkHrWknyPVtqcBrSyufR/2RM5XDHOpwwgJT+Y=; b=Vxn+xAW3MBUSqveQnL5FQvkr0b 2nmVAdCjirGqoV15gXsvwJHAB5i5FzflWLfaO/Q1swh8wq4xb0W04IYaHIl9/SixDTCzEyBcbXlS+ XOsxVBeDPQsNrf3xET1Hlisg9AjgKaf6ToZZPSIVy//xqmXFADLC+B26K2RwZyIZsRZC+4zU/OIBG PiPCSsf1PL+caeVhmpwoZ6qiGwxSpf9khNdcr6QdujCcTVMlnpdDkB+5LbzAbauEPRykdxDxi+T/b IiIVae4reY/9kHJE6h8cu4nPcnKKRK0jLg/aJH7tWAGe/CANHY/wlvuvaXdOQh8tuav/zJGT0/KrS ODAWRDOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZA4K-00000001Qlk-1Poa; Wed, 31 Jul 2024 14:12:44 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZA2t-00000001QDa-45iW for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 14:11:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 22C4A1063; Wed, 31 Jul 2024 07:11:39 -0700 (PDT) Received: from e125770.cambridge.arm.com (e125770.arm.com [10.1.199.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D18123F5A1; Wed, 31 Jul 2024 07:11:12 -0700 (PDT) From: Luca Fancellu To: mark.rutland@arm.com, andre.przywara@arm.com Cc: linux-arm-kernel@lists.infradead.org Subject: [boot-wrapper v3 1/4] Introduce --with-bw-arch for boot-wrapper compile arch Date: Wed, 31 Jul 2024 15:11:00 +0100 Message-Id: <20240731141103.2559706-2-luca.fancellu@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240731141103.2559706-1-luca.fancellu@arm.com> References: <20240731141103.2559706-1-luca.fancellu@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240731_071116_092830_ACC17717 X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Introduce a new autoconf parameter --with-bw-arch that takes 'aarch64-a' and 'aarch32-a' as compile architecture, the former is selected by default when the parameter is not passed. This new parameter superseed --enable-aarch32-bw, its functionality is now implemented by --with-bw-arch=aarch32-a. Signed-off-by: Luca Fancellu --- Changes from v2: - Major rework, reason in the cover letter. --- configure.ac | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index ce41daebc378..bba42fa1dba8 100644 --- a/configure.ac +++ b/configure.ac @@ -9,9 +9,18 @@ AC_INIT([boot-wrapper], [v0.2]) AM_INIT_AUTOMAKE([foreign]) -AC_ARG_ENABLE([aarch32-bw], - AS_HELP_STRING([--enable-aarch32-bw], [build a 32-bit boot-wrapper]), - [BOOTWRAPPER_ES=32], [BOOTWRAPPER_ES=64]) +# Allow a user to pass --with-bw-arch={aarch64-a,aarch32-a} +AC_ARG_WITH([bw-arch], + AS_HELP_STRING([--with-bw-arch], [aarch64-a selects AArch64-A (default), aarch32-a selects AArch32-A]), + [case "${withval}" in + no|yes|aarch64-a) USE_ARCH=aarch64-a ;; + aarch32-a) USE_ARCH=aarch32-a ;; + *) AC_MSG_ERROR([Bad value "${withval}" for --with-bw-arch. Use "aarch64-a" or "aarch32-a"]) ;; + esac]) + +AS_IF([test "x$USE_ARCH" = "xaarch32-a"], + [BOOTWRAPPER_ES=32], [BOOTWRAPPER_ES=64] +) AM_CONDITIONAL([BOOTWRAPPER_32], [test "x$BOOTWRAPPER_ES" = "x32"]) AC_ARG_ENABLE([aarch32-kernel],