mkimage: add a flag to describe whether -A is specified
authorIcenowy Zheng <icenowy@aosc.io>
Fri, 15 Oct 2021 01:53:04 +0000 (20:53 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 4 Apr 2022 22:24:17 +0000 (23:24 +0100)
commitc2d08f01100a13de87f6745250db3a50fc3fbb97
tree1cf0a7af6259257939a5686142fa2f69382b79e7
parentf64233e9a54ae4b36b7fe4c739275005187f27b5
mkimage: add a flag to describe whether -A is specified

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 <trini@konsulko.com>
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
tools/imagetool.h
tools/mkimage.c