diff options
Diffstat (limited to 'tools/mkimage.c')
-rw-r--r-- | tools/mkimage.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c index 361711c53b2..a800f9507bf 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -101,6 +101,8 @@ static void usage(const char *msg) " -d ==> use image data from 'datafile'\n" " -x ==> set XIP (execute in place)\n" " -s ==> create an image with no data\n" + " -y ==> append TFA BL31 file to the image\n" + " -Y ==> set TFA BL31 file load and entry point address\n" " -v ==> verbose\n", params.cmdname); fprintf(stderr, @@ -160,7 +162,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 +198,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 +371,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 +460,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; |