From mboxrd@z Thu Jan 1 00:00:00 1970 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 D8A3AC433EF for ; Tue, 19 Oct 2021 10:49:57 +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 22091610E5 for ; Tue, 19 Oct 2021 10:49:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 22091610E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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 E69A082EBD; Tue, 19 Oct 2021 12:49:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C7E9282EBB; Tue, 19 Oct 2021 12:49:52 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 3B5808169E for ; Tue, 19 Oct 2021 12:49:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com 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 9F194D6E; Tue, 19 Oct 2021 03:49:48 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D3A373F70D; Tue, 19 Oct 2021 03:49:47 -0700 (PDT) Date: Tue, 19 Oct 2021 11:49:45 +0100 From: Andre Przywara To: Samuel Holland Cc: u-boot@lists.denx.de, Jagan Teki , Icenowy Zheng , Tom Rini , Simon Glass Subject: Re: [PATCH v3 1/4] mkimage: add a flag to describe whether -A is specified Message-ID: <20211019114945.01ccdaf7@donnerap.cambridge.arm.com> In-Reply-To: <20211015015308.65265-2-samuel@sholland.org> References: <20211015015308.65265-1-samuel@sholland.org> <20211015015308.65265-2-samuel@sholland.org> Organization: ARM X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 14 Oct 2021 20:53:04 -0500 Samuel Holland wrote: Hi, > 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. So there was some nitpic^Wdiscussion about the uppercase in the variable name, where Icenowy proposed arch_flag instead. Shall this be changed still? If that's the only thing, I am happy to do it while merging. Btw: Shall this (and the TOC0) series go through the sunxi tree? Cheers, Andre > > 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)) {