usage ();
                                params.imagename = *++argv;
                                goto NXTARG;
+                       case 's':
+                               params.skipcpy = 1;
+                               break;
                        case 'v':
                                params.vflag++;
                                break;
        }
 
        /*
-        * 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(¶ms, tparams);
+       else
+               memset(tparams->hdr, 0, tparams->header_size);
 
        if (write(ifd, tparams->hdr, tparams->header_size)
                                        != tparams->header_size) {
                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;
 
 
        int lflag;
        int vflag;
        int xflag;
+       int skipcpy;
        int os;
        int arch;
        int type;
        int (*check_image_type) (uint8_t);
        /* This callback function will be executed if fflag is defined */
        int (*fflag_handle) (struct mkimage_params *);
+       /*
+        * This callback function will be executed for variable size record
+        * It is expected to build this header in memory and return its length
+        * and a pointer to it
+        */
+       int (*vrec_header) (struct mkimage_params *,
+               struct image_type_params *);
        /* pointer to the next registered entry in linked list */
        struct image_type_params *next;
 };