aboutsummaryrefslogtreecommitdiff
path: root/tools/mkimage.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2022-01-14 10:21:19 +0100
committerTom Rini <trini@konsulko.com>2022-01-24 10:35:10 -0500
commit5902a397d029008a98e8e83b7627635ed3a2cd06 (patch)
treea9a7f6665bcf9d1166e02ab5aec3859b4d4d2f30 /tools/mkimage.c
parent6ae24346891d7e9d22707949c61f09346b28d761 (diff)
downloadu-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.c5
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) {