diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2022-01-14 10:21:19 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-24 10:35:10 -0500 |
commit | 5902a397d029008a98e8e83b7627635ed3a2cd06 (patch) | |
tree | a9a7f6665bcf9d1166e02ab5aec3859b4d4d2f30 /tools/mkimage.c | |
parent | 6ae24346891d7e9d22707949c61f09346b28d761 (diff) | |
download | u-boot-5902a397d029008a98e8e83b7627635ed3a2cd06.zip u-boot-5902a397d029008a98e8e83b7627635ed3a2cd06.tar.gz u-boot-5902a397d029008a98e8e83b7627635ed3a2cd06.tar.bz2 |
mkimage: Allow to specify the signature algorithm on the command line
This permits to prepare FIT image description that do not hard-code the
final choice of the signature algorithm, possibly requiring the user to
patch the sources.
When -o <algo> is specified, this information is used in favor of the
'algo' property in the signature node. Furthermore, that property is set
accordingly when writing the image.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'tools/mkimage.c')
-rw-r--r-- | tools/mkimage.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c index a4844d0..ddb7933 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -154,7 +154,7 @@ static void process_args(int argc, char **argv) int opt; while ((opt = getopt(argc, argv, - "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) { + "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:o:O:rR:qstT:vVx")) != -1) { switch (opt) { case 'a': params.addr = strtoull(optarg, &ptr, 16); @@ -250,6 +250,9 @@ static void process_args(int argc, char **argv) case 'N': params.engine_id = optarg; break; + case 'o': + params.algo_name = optarg; + break; case 'O': params.os = genimg_get_os_id(optarg); if (params.os < 0) { |