diff options
author | Tom Rini <trini@konsulko.com> | 2023-03-01 11:00:22 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-03-01 11:00:22 -0500 |
commit | 49cba67852f1fb5ef481bef3532b2cda96816e45 (patch) | |
tree | 1d2cbada52d6098135921b72696e8f3add4c1292 /tools/mkimage.c | |
parent | f10905b4b7b9b6888e2532cdfb3536d2244676cb (diff) | |
parent | 1dbeade84e6cb4666bd72a31317c5758e275a1c5 (diff) |
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-marvell into next
- mvebu: Various fixes in SPL / kwboot / kwbimage (Pali)
Diffstat (limited to 'tools/mkimage.c')
-rw-r--r-- | tools/mkimage.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c index af7b0e09b3..a92d9d5ca5 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -599,7 +599,12 @@ int main(int argc, char **argv) exit (retval); } - if ((params.type != IH_TYPE_MULTI) && (params.type != IH_TYPE_SCRIPT)) { + if (!params.skipcpy && params.type != IH_TYPE_MULTI && params.type != IH_TYPE_SCRIPT) { + if (!params.datafile) { + fprintf(stderr, "%s: Option -d with image data file was not specified\n", + params.cmdname); + exit(EXIT_FAILURE); + } dfd = open(params.datafile, O_RDONLY | O_BINARY); if (dfd < 0) { fprintf(stderr, "%s: Can't open %s: %s\n", @@ -860,7 +865,9 @@ copy_file (int ifd, const char *datafile, int pad) exit (EXIT_FAILURE); } - if (params.xflag) { + if (params.xflag && + (((params.type > IH_TYPE_INVALID) && (params.type < IH_TYPE_FLATDT)) || + (params.type == IH_TYPE_KERNEL_NOLOAD) || (params.type == IH_TYPE_FIRMWARE_IVT))) { unsigned char *p = NULL; /* * XIP: do not append the struct legacy_img_hdr at the |