mmc: fsl_esdhc: fix check_and_invalidate_dcache_range function
[oweals/u-boot.git] / tools / imagetool.h
index 3e15b4e22b9a0086c57d3bb6c61a2abe35838a31..a3ed0f43d6afa21caa6d8755536b17d8a3f27ba2 100644 (file)
@@ -16,6 +16,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
 #include <u-boot/sha1.h>
 
 #define IH_ARCH_DEFAULT                IH_ARCH_INVALID
 
+/* Information about a file that needs to be placed into the FIT */
+struct content_info {
+       struct content_info *next;
+       int type;               /* File type (IH_TYPE_...) */
+       const char *fname;
+};
+
 /*
  * This structure defines all such variables those are initialized by
  * mkimage and dumpimage main core and need to be referred by image
@@ -58,6 +66,14 @@ struct image_tool_params {
        const char *keydest;    /* Destination .dtb for public key */
        const char *comment;    /* Comment to add to signature node */
        int require_keys;       /* 1 to mark signing keys as 'required' */
+       int file_size;          /* Total size of output file */
+       int orig_file_size;     /* Original size for file before padding */
+       bool auto_its;          /* Automatically create the .its file */
+       int fit_image_type;     /* Image type to put into the FIT */
+       struct content_info *content_head;      /* List of files to include */
+       struct content_info *content_tail;
+       bool external_data;     /* Store data outside the FIT */
+       bool quiet;             /* Don't output text in normal operation */
 };
 
 /*
@@ -177,6 +193,18 @@ int imagetool_save_subimage(
        ulong file_data,
        ulong file_len);
 
+/**
+ * imagetool_get_filesize() - Utility function to obtain the size of a file
+ *
+ * This function prints a message if an error occurs, showing the error that
+ * was obtained.
+ *
+ * @params:    mkimage parameters
+ * @fname:     filename to check
+ * @return size of file, or -ve value on error
+ */
+int imagetool_get_filesize(struct image_tool_params *params, const char *fname);
+
 /*
  * There is a c file associated with supported image type low level code
  * for ex. default_image.c, fit_image.c