Hi, On Tue, 19 Oct 2021 at 07:17, Samuel Holland <sam...@sholland.org> wrote: > > On 10/19/21 5:49 AM, Andre Przywara wrote: > > On Thu, 14 Oct 2021 20:53:04 -0500 > > Samuel Holland <sam...@sholland.org> wrote: > > > > Hi, > > > >> From: Icenowy Zheng <icen...@aosc.io> > >> > >> 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. > > My understanding of the discussion was that Aflag made the most sense > for consistency, and it was acceptable for that reason, which is why I > left it unchanged in v3.
That might have been my suggestion of naming the variable after its meaning rather than the single-character flag. But I think Tom is happy with it as is, so let's go with it. - Simon > > Regards, > Samuel > > > Btw: Shall this (and the TOC0) series go through the sunxi tree? > > > > Cheers, > > Andre > > > > > >> > >> Reviewed-by: Tom Rini <tr...@konsulko.com> > >> Signed-off-by: Icenowy Zheng <icen...@aosc.io> > >> Signed-off-by: Samuel Holland <sam...@sholland.org> > >> --- > >> > >> (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)) { > > >