]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - tools/imagetool.h
usb: add basic USB configs in Kconfig
[karo-tx-uboot.git] / tools / imagetool.h
index b8adb61ed9ce2b430c6bb59ad40d99d3d243f9e5..8bce059482737bb5030ed36d68cafc28838a4084 100644 (file)
@@ -18,7 +18,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
 #include "fdt_host.h"
 
 #define ARRAY_SIZE(x)          (sizeof(x) / sizeof((x)[0]))
@@ -34,7 +34,9 @@ struct image_tool_params {
        int dflag;
        int eflag;
        int fflag;
+       int iflag;
        int lflag;
+       int pflag;
        int vflag;
        int xflag;
        int skipcpy;
@@ -50,6 +52,7 @@ struct image_tool_params {
        char *datafile;
        char *imagefile;
        char *cmdname;
+       const char *outfile;    /* Output filename */
        const char *keydir;     /* Directory holding private keys */
        const char *keydest;    /* Destination .dtb for public key */
        const char *comment;    /* Comment to add to signature node */
@@ -96,6 +99,15 @@ struct image_type_params {
         */
        void (*set_header) (void *, struct stat *, int,
                                        struct image_tool_params *);
+       /*
+        * This function is used by the command to retrieve a data file from
+        * the image (i.e. dumpimage -i <image> -p <position> <data_file>).
+        * Thus the code to extract a file from an image must be put here.
+        *
+        * Returns 0 if the file was successfully retrieved from the image,
+        * or a negative value on error.
+        */
+       int (*extract_datafile) (void *, struct image_tool_params *);
        /*
         * Some image generation support for ex (default image type) supports
         * more than one type_ids, this callback function is used to check
@@ -147,6 +159,7 @@ void register_image_type(struct image_type_params *tparams);
  * Supported image types init functions
  */
 void init_default_image_type(void);
+void init_atmel_image_type(void);
 void init_pbl_image_type(void);
 void init_ais_image_type(void);
 void init_kwb_image_type(void);
@@ -155,6 +168,8 @@ void init_mxs_image_type(void);
 void init_fit_image_type(void);
 void init_ubl_image_type(void);
 void init_omap_image_type(void);
+void init_socfpga_image_type(void);
+void init_gpimage_type(void);
 
 void pbl_load_uboot(int fd, struct image_tool_params *mparams);