diff options
author | Icenowy Zheng <icenowy@aosc.io> | 2021-10-14 20:53:04 -0500 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2022-04-04 23:24:17 +0100 |
commit | c2d08f01100a13de87f6745250db3a50fc3fbb97 (patch) | |
tree | 1cf0a7af6259257939a5686142fa2f69382b79e7 | |
parent | f64233e9a54ae4b36b7fe4c739275005187f27b5 (diff) | |
download | u-boot-c2d08f01100a13de87f6745250db3a50fc3fbb97.zip u-boot-c2d08f01100a13de87f6745250db3a50fc3fbb97.tar.gz u-boot-c2d08f01100a13de87f6745250db3a50fc3fbb97.tar.bz2 |
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>
-rw-r--r-- | tools/imagetool.h | 1 | ||||
-rw-r--r-- | tools/mkimage.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/imagetool.h b/tools/imagetool.h index 5169b02..05dd94d 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -53,6 +53,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 74bd072..b46216f 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -172,6 +172,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)) { |