]> git.sur5r.net Git - u-boot/blobdiff - tools/mkimage.c
ORIGEN : enable device tree support
[u-boot] / tools / mkimage.c
index 7215d0f2ea97b6b4a0557c2a7d64672524142e7a..36e28ec923492ddc1495a66021e5e4b2e2f258ea 100644 (file)
@@ -156,10 +156,14 @@ main (int argc, char **argv)
        init_imx_image_type ();
        /* Init FIT image generation/list support */
        init_fit_image_type ();
+       /* Init TI OMAP Boot image generation/list support */
+       init_omap_image_type();
        /* Init Default image generation/list support */
        init_default_image_type ();
        /* Init Davinci UBL support */
        init_ubl_image_type();
+       /* Init Davinci AIS support */
+       init_ais_image_type();
 
        params.cmdname = *argv;
        params.addr = params.ep = 0;
@@ -246,6 +250,9 @@ main (int argc, char **argv)
                                        usage ();
                                params.imagename = *++argv;
                                goto NXTARG;
+                       case 's':
+                               params.skipcpy = 1;
+                               break;
                        case 'v':
                                params.vflag++;
                                break;
@@ -359,11 +366,15 @@ NXTARG:           ;
        }
 
        /*
-        * Must be -w then:
-        *
-        * write dummy header, to be fixed later
+        * In case there an header with a variable
+        * length will be added, the corresponding
+        * function is called. This is responsible to
+        * allocate memory for the header itself.
         */
-       memset (tparams->hdr, 0, tparams->header_size);
+       if (tparams->vrec_header)
+               tparams->vrec_header(&params, tparams);
+       else
+               memset(tparams->hdr, 0, tparams->header_size);
 
        if (write(ifd, tparams->hdr, tparams->header_size)
                                        != tparams->header_size) {
@@ -372,7 +383,9 @@ NXTARG:             ;
                exit (EXIT_FAILURE);
        }
 
-       if (params.type == IH_TYPE_MULTI || params.type == IH_TYPE_SCRIPT) {
+       if (!params.skipcpy &&
+               (params.type == IH_TYPE_MULTI ||
+                       params.type == IH_TYPE_SCRIPT)) {
                char *file = params.datafile;
                uint32_t size;