summaryrefslogtreecommitdiff
path: root/tools/mkimage.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-10-06 13:20:24 -0600
committerTom Rini <trini@konsulko.com>2025-10-06 13:20:24 -0600
commit0eaa4b337336dbbe93395d1f2ccc18937eaafea2 (patch)
treec01e661d69181dceca68f56a4849a9bd04608521 /tools/mkimage.c
parente50b1e8715011def8aff1588081a2649a2c6cd47 (diff)
parent4e4a9de31de2a5f395ee25c59e4026422fbcb27e (diff)
Merge branch 'next'
Merge the outstanding changes from the 'next' branch to master.
Diffstat (limited to 'tools/mkimage.c')
-rw-r--r--tools/mkimage.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 361711c53b2..12183270776 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -160,7 +160,7 @@ static int add_content(int type, const char *fname)
}
static const char optstring[] =
- "a:A:b:B:c:C:d:D:e:Ef:Fg:G:i:k:K:ln:N:o:O:p:qrR:stT:vVx";
+ "a:A:b:B:c:C:d:D:e:Ef:Fg:G:i:k:K:ln:N:o:O:p:qrR:stT:vVxy:Y:";
static const struct option longopts[] = {
{ "load-address", required_argument, NULL, 'a' },
@@ -196,6 +196,8 @@ static const struct option longopts[] = {
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, 'V' },
{ "xip", no_argument, NULL, 'x' },
+ { "tfa-bl31-file", no_argument, NULL, 'y' },
+ { "tfa-bl31-addr", no_argument, NULL, 'Y' },
{ /* sentinel */ },
};
@@ -367,6 +369,17 @@ static void process_args(int argc, char **argv)
case 'x':
params.xflag++;
break;
+ case 'y':
+ params.fit_tfa_bl31 = optarg;
+ break;
+ case 'Y':
+ params.fit_tfa_bl31_addr = strtoull(optarg, &ptr, 16);
+ if (*ptr) {
+ fprintf(stderr, "%s: invalid TFA BL31 address %s\n",
+ params.cmdname, optarg);
+ exit(EXIT_FAILURE);
+ }
+ break;
default:
usage("Invalid option");
}
@@ -445,7 +458,7 @@ static void verify_image(const struct image_type_params *tparams)
(void)close(ifd);
}
-void copy_datafile(int ifd, char *file)
+static void copy_datafile(int ifd, char *file)
{
if (!file)
return;