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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5ED8C433EF for ; Fri, 15 Oct 2021 01:53:32 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C92D611C2 for ; Fri, 15 Oct 2021 01:53:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3C92D611C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3E579837DA; Fri, 15 Oct 2021 03:53:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="jvzyiX88"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="N72TpJaV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8CDD837E8; Fri, 15 Oct 2021 03:53:16 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DA31183794 for ; Fri, 15 Oct 2021 03:53:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 285D25C0115; Thu, 14 Oct 2021 21:53:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 14 Oct 2021 21:53:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=G5dUYfVotUDZo fxdipJfsqzjqRKpFDF3PvVhsKagqfU=; b=jvzyiX88S4SkqZh6vFW65pOXTQEqk mSn0i+uC4HiiCjd4Dh/ItMWTVCwr9yhNS7uPRo9Qd/HEt2eBxlgmb6qP+ROyKOoa 2pnXpaw2VK1HISVYb8NJCQB1vPvP0dHl53e5fEJ7Y5pA7s+7HKfeq3kDM4fxK4KC 9Vpq2NZa5UQj+a/E7NM8yfzcdqdhgI4udYsHeuv+i53Bzw6y7QziqOSAJrAlZaKL WVeKuQKC/ClDO41xp0PQMcEc6+GjQRRV1W3w1DdFIy5Yqr0Fcx4lfbSLsi756NVj rC2nKJNpblTHIS2/KMTIix579h70AD+FMl/4l3mJiWyszBk3JpgCVfDIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=G5dUYfVotUDZofxdipJfsqzjqRKpFDF3PvVhsKagqfU=; b=N72TpJaV soH8c21b5A8Ncma01A64t7kP/d4EauRjJd+GfdhgpyoUNY8aqIxurDqS14tMsxmE cuYu6gGK0EIpp4fCQcXz9b6qmXv8DC+CoX1UFjU7Bc4JVS80HDNs33KEqEmk0OVp BChIiS+lXu8tsXq/C/ebeiklFB84GmbpVgrPxXtc5rkhj5586ZDAJZ6uoB8Y8bej 2tscarqQ30U9L5PwQjWGC+Kt2gFDZDLGfl3gsjp5VFWOGDp6jsaVW1inXn5qhaoE WLfHxd/C7oj6Y1JwY7svCIajFjyI7ElgEfksqwrPkevud9t5BdO7YX32uAXm/olH NM8RmfWNXOSTzg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddufedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Oct 2021 21:53:10 -0400 (EDT) From: Samuel Holland To: u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: Icenowy Zheng , Samuel Holland , Tom Rini Subject: [PATCH v3 1/4] mkimage: add a flag to describe whether -A is specified Date: Thu, 14 Oct 2021 20:53:04 -0500 Message-Id: <20211015015308.65265-2-samuel@sholland.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211015015308.65265-1-samuel@sholland.org> References: <20211015015308.65265-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Icenowy Zheng The sunxi_egon type used to take no -A argument (because we assume sunxi targets are all ARM). However, as Allwinner D1 appears as the first RISC-V sunxi target, we need to support -A; in addition, as external projects rely on U-Boot mkimage to generate sunxi eGON.BT0 header, we need to keep compatibility with command line without -A. As the default value of arch in mkimage is not proper (IH_ARCH_PPC instead of IH_ARCH_INVALID), to keep more compatibility, add an Aflag field to image parameters to describe whether an architecture is explicitly specified. Reviewed-by: Tom Rini Signed-off-by: Icenowy Zheng Signed-off-by: Samuel Holland --- (no changes since v1) tools/imagetool.h | 1 + tools/mkimage.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/imagetool.h b/tools/imagetool.h index e229a34ffc..5dc28312c2 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -51,6 +51,7 @@ struct image_tool_params { int pflag; int vflag; int xflag; + int Aflag; int skipcpy; int os; int arch; diff --git a/tools/mkimage.c b/tools/mkimage.c index fbe883ce36..cfd97b046c 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -171,6 +171,7 @@ static void process_args(int argc, char **argv) show_valid_options(IH_ARCH); usage("Invalid architecture"); } + params.Aflag = 1; break; case 'b': if (add_content(IH_TYPE_FLATDT, optarg)) { -- 2.32.0