]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - tools/mkimage.c
imx: hab: Check if CSF is valid before authenticating image
[people/ms/u-boot.git] / tools / mkimage.c
index b0c98f6f5512be510e463538a24d35d36dfdcd91..28ff35e670a3e37ccce21cbe16f30a2959aa35d6 100644 (file)
@@ -113,7 +113,7 @@ static void usage(const char *msg)
 #endif
        fprintf(stderr, "       %s -V ==> print version information and exit\n",
                params.cmdname);
-       fprintf(stderr, "Use -T to see a list of available image types\n");
+       fprintf(stderr, "Use '-T list' to see a list of available image types\n");
 
        exit(EXIT_FAILURE);
 }
@@ -260,6 +260,10 @@ static void process_args(int argc, char **argv)
                        params.skipcpy = 1;
                        break;
                case 'T':
+                       if (strcmp(optarg, "list") == 0) {
+                               show_valid_options(IH_TYPE);
+                               exit(EXIT_SUCCESS);
+                       }
                        type = genimg_get_type_id(optarg);
                        if (type < 0) {
                                show_valid_options(IH_TYPE);
@@ -526,7 +530,7 @@ int main(int argc, char **argv)
                                                        + 0x20, 0 };
                        int i = params.file_size;
                        for (; i < aligned_filesize; i++) {
-                               if (write(ifd, &i, 1) != 1) {
+                               if (write(ifd, (char *) &i, 1) != 1) {
                                        fprintf(stderr,
                                                        "%s: Write error on %s: %s\n",
                                                        params.cmdname,