]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/image.h
Kconfig: Move CONFIG_FIT and related options to Kconfig
[people/ms/u-boot.git] / include / image.h
index 2daa74aa38c667b9f7433bd15be7f2a730f7f453..02ca43bb89e865d30a9bc88d6ec64ddf55057efd 100644 (file)
@@ -26,8 +26,7 @@ struct lmb;
 #include <sys/types.h>
 
 /* new uImage format support enabled on host */
-#define CONFIG_FIT             1
-#define CONFIG_OF_LIBFDT       1
+#define IMAGE_ENABLE_FIT               1
 #define CONFIG_FIT_VERBOSE     1 /* enable fit_format_{error,warning}() */
 
 #define IMAGE_ENABLE_IGNORE    0
@@ -43,9 +42,11 @@ struct lmb;
 #define IMAGE_ENABLE_IGNORE    1
 #define IMAGE_INDENT_STRING    "   "
 
+#define IMAGE_ENABLE_FIT               CONFIG_IS_ENABLED(FIT)
+
 #endif /* USE_HOSTCC */
 
-#if defined(CONFIG_FIT)
+#if IMAGE_ENABLE_FIT
 #include <hash.h>
 #include <libfdt.h>
 #include <fdt_support.h>
@@ -94,7 +95,7 @@ struct lmb;
 #define IMAGE_ENABLE_SHA256    0
 #endif
 
-#endif /* CONFIG_FIT */
+#endif /* IMAGE_ENABLE_FIT */
 
 #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
 # define IMAGE_ENABLE_RAMDISK_HIGH     1
@@ -246,8 +247,11 @@ struct lmb;
 #define IH_TYPE_LPC32XXIMAGE   21      /* x86 setup.bin Image          */
 #define IH_TYPE_LOADABLE       22      /* A list of typeless images    */
 #define IH_TYPE_RKIMAGE                23      /* Rockchip Boot Image          */
+#define IH_TYPE_RKSD           24      /* Rockchip SD card             */
+#define IH_TYPE_RKSPI          25      /* Rockchip SPI image           */
+#define IH_TYPE_ZYNQIMAGE      26      /* Xilinx Zynq Boot Image */
 
-#define IH_TYPE_COUNT          24      /* Number of image types */
+#define IH_TYPE_COUNT          27      /* Number of image types */
 
 /*
  * Compression Types
@@ -257,6 +261,7 @@ struct lmb;
 #define IH_COMP_BZIP2          2       /* bzip2 Compression Used       */
 #define IH_COMP_LZMA           3       /* lzma  Compression Used       */
 #define IH_COMP_LZO            4       /* lzo   Compression Used       */
+#define IH_COMP_LZ4            5       /* lz4   Compression Used       */
 
 #define IH_MAGIC       0x27051956      /* Image Magic Number           */
 #define IH_NMLEN               32      /* Image Name Length            */
@@ -305,7 +310,7 @@ typedef struct bootm_headers {
        image_header_t  legacy_hdr_os_copy;     /* header copy */
        ulong           legacy_hdr_valid;
 
-#if defined(CONFIG_FIT)
+#if IMAGE_ENABLE_FIT
        const char      *fit_uname_cfg; /* configuration node unit name */
 
        void            *fit_hdr_os;    /* os FIT image header */
@@ -752,7 +757,7 @@ int bootz_setup(ulong image, ulong *start, ulong *end);
 /*******************************************************************/
 /* New uImage format specific code (prefixed with fit_) */
 /*******************************************************************/
-#if defined(CONFIG_FIT)
+#if IMAGE_ENABLE_FIT
 
 #define FIT_IMAGES_PATH                "/images"
 #define FIT_CONFS_PATH         "/configurations"
@@ -814,10 +819,7 @@ static inline ulong fit_get_size(const void *fit)
  * returns:
  *     end address of the FIT image (blob) in memory
  */
-static inline ulong fit_get_end(const void *fit)
-{
-       return (ulong)fit + fdt_totalsize(fit);
-}
+ulong fit_get_end(const void *fit);
 
 /**
  * fit_get_name - get FIT node name
@@ -951,6 +953,7 @@ struct image_sign_info {
        int required_keynode;           /* Node offset of key to use: -1=any */
        const char *require_keys;       /* Value for 'required' property */
 };
+#endif /* Allow struct image_region to always be defined for rsa.h */
 
 /* A part of an image, used for hashing */
 struct image_region {
@@ -958,6 +961,8 @@ struct image_region {
        int size;
 };
 
+#if IMAGE_ENABLE_FIT
+
 #if IMAGE_ENABLE_VERIFY
 # include <u-boot/rsa-checksum.h>
 #endif