]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/mkimage.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / tools / mkimage.c
index 1bed93360e8645dd6c2ea22bd6d3b8ce322686c7..f5859d77642152a78751d4b7ce79255c485e6e5b 100644 (file)
@@ -37,6 +37,7 @@ struct mkimage_params params = {
        .type = IH_TYPE_KERNEL,
        .comp = IH_COMP_GZIP,
        .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
+       .imagename = "",
 };
 
 /*
@@ -144,12 +145,14 @@ main (int argc, char **argv)
 {
        int ifd = -1;
        struct stat sbuf;
-       unsigned char *ptr;
+       char *ptr;
        int retval = 0;
        struct image_type_params *tparams = NULL;
 
        /* Init Kirkwood Boot image generation/list support */
        init_kwb_image_type ();
+       /* Init Freescale imx Boot image generation/list support */
+       init_imx_image_type ();
        /* Init FIT image generation/list support */
        init_fit_image_type ();
        /* Init Default image generation/list support */
@@ -198,8 +201,7 @@ main (int argc, char **argv)
                        case 'a':
                                if (--argc <= 0)
                                        usage ();
-                               params.addr = strtoul (*++argv,
-                                       (char **)&ptr, 16);
+                               params.addr = strtoul (*++argv, &ptr, 16);
                                if (*ptr) {
                                        fprintf (stderr,
                                                "%s: invalid load address %s\n",
@@ -216,8 +218,7 @@ main (int argc, char **argv)
                        case 'e':
                                if (--argc <= 0)
                                        usage ();
-                               params.ep = strtoul (*++argv,
-                                               (char **)&ptr, 16);
+                               params.ep = strtoul (*++argv, &ptr, 16);
                                if (*ptr) {
                                        fprintf (stderr,
                                                "%s: invalid entry point %s\n",
@@ -281,20 +282,6 @@ NXTARG:            ;
                        params.ep += tparams->header_size;
        }
 
-       /*
-        * If XIP, ensure the entry point is equal to the load address plus
-        * the size of the U-Boot header.
-        */
-       if (params.xflag) {
-               if (params.ep != params.addr + tparams->header_size) {
-                       fprintf (stderr,
-                               "%s: For XIP, the entry point must be the load addr + %lu\n",
-                               params.cmdname,
-                               (unsigned long)tparams->header_size);
-                       exit (EXIT_FAILURE);
-               }
-       }
-
        params.imagefile = *argv;
 
        if (params.fflag){