X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fmkimage.c;h=42171883109480524c4d0d8c4ffd2f2be5d12359;hb=50aeb3aecfe0820c81fb6cc1647bcf28b7a4f831;hp=38805f0c9263773419eefa51207f94b6f8c1b88d;hpb=2f07a9a6d1abd1eeb283a21a8d718dc9628429a4;p=oweals%2Fu-boot.git diff --git a/tools/mkimage.c b/tools/mkimage.c index 38805f0c92..4217188310 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -105,7 +105,7 @@ static void usage(const char *msg) " -F => re-sign existing FIT image\n" " -p => place external data at a static position\n" " -r => mark keys used as 'required' in dtb\n" - " -N => engine to use for signing (pkcs11)\n"); + " -N => openssl engine to use for signing\n"); #else fprintf(stderr, "Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)\n"); @@ -403,14 +403,21 @@ int main(int argc, char **argv) exit (EXIT_FAILURE); } - /* - * scan through mkimage registry for all supported image types - * and verify the input image file header for match - * Print the image information for matched image type - * Returns the error code if not matched - */ - retval = imagetool_verify_print_header(ptr, &sbuf, - tparams, ¶ms); + if (params.fflag) { + /* + * Verifies the header format based on the expected header for image + * type in tparams + */ + retval = imagetool_verify_print_header_by_type(ptr, &sbuf, + tparams, ¶ms); + } else { + /** + * When listing the image, we are not given the image type. Simply check all + * image types to find one that matches our header + */ + retval = imagetool_verify_print_header(ptr, &sbuf, + tparams, ¶ms); + } (void) munmap((void *)ptr, sbuf.st_size); (void) close (ifd); @@ -530,6 +537,13 @@ int main(int argc, char **argv) ret = imx8image_copy_image(ifd, ¶ms); if (ret) return ret; + } else if (params.type == IH_TYPE_IMX8MIMAGE) { + /* i.MX8M has special Image format */ + int ret; + + ret = imx8mimage_copy_image(ifd, ¶ms); + if (ret) + return ret; } else { copy_file(ifd, params.datafile, pad_len); }