]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/image.h
FIT: Rename FIT_DISABLE_SHA256 to FIT_ENABLE_SHA256_SUPPORT
[people/ms/u-boot.git] / include / image.h
index 164b5845332c6ee11a95b2f5b3379ddbb8b8bb51..800426d51f9636f8fed7d1cad0935218eeedc60b 100644 (file)
@@ -29,6 +29,7 @@ struct lmb;
 #define IMAGE_ENABLE_FIT       1
 #define IMAGE_ENABLE_OF_LIBFDT 1
 #define CONFIG_FIT_VERBOSE     1 /* enable fit_format_{error,warning}() */
+#define CONFIG_FIT_ENABLE_SHA256_SUPPORT
 
 #define IMAGE_ENABLE_IGNORE    0
 #define IMAGE_INDENT_STRING    ""
@@ -62,25 +63,15 @@ struct lmb;
 #  ifdef CONFIG_SPL_SHA1_SUPPORT
 #   define IMAGE_ENABLE_SHA1   1
 #  endif
-#  ifdef CONFIG_SPL_SHA256_SUPPORT
-#   define IMAGE_ENABLE_SHA256 1
-#  endif
 # else
 #  define CONFIG_CRC32         /* FIT images need CRC32 support */
-#  define CONFIG_MD5           /* and MD5 */
 #  define CONFIG_SHA1          /* and SHA1 */
 #  define CONFIG_SHA256                /* and SHA256 */
 #  define IMAGE_ENABLE_CRC32   1
 #  define IMAGE_ENABLE_MD5     1
 #  define IMAGE_ENABLE_SHA1    1
-#  define IMAGE_ENABLE_SHA256  1
 # endif
 
-#ifdef CONFIG_FIT_DISABLE_SHA256
-#undef CONFIG_SHA256
-#undef IMAGE_ENABLE_SHA256
-#endif
-
 #ifndef IMAGE_ENABLE_CRC32
 #define IMAGE_ENABLE_CRC32     0
 #endif
@@ -93,18 +84,16 @@ struct lmb;
 #define IMAGE_ENABLE_SHA1      0
 #endif
 
-#ifndef IMAGE_ENABLE_SHA256
+#if defined(CONFIG_FIT_ENABLE_SHA256_SUPPORT) || \
+       defined(CONFIG_SPL_SHA256_SUPPORT)
+#define CONFIG_SHA256
+#define IMAGE_ENABLE_SHA256    1
+#else
 #define IMAGE_ENABLE_SHA256    0
 #endif
 
 #endif /* IMAGE_ENABLE_FIT */
 
-#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
-# define IMAGE_ENABLE_RAMDISK_HIGH     1
-#else
-# define IMAGE_ENABLE_RAMDISK_HIGH     0
-#endif
-
 #ifdef CONFIG_SYS_BOOT_GET_CMDLINE
 # define IMAGE_BOOT_GET_CMDLINE                1
 #else
@@ -1263,7 +1252,8 @@ void android_print_contents(const struct andr_img_hdr *hdr);
  */
 int board_fit_config_name_match(const char *name);
 
-#ifdef CONFIG_SPL_FIT_IMAGE_POST_PROCESS
+#if defined(CONFIG_SPL_FIT_IMAGE_POST_PROCESS) || \
+       defined(CONFIG_FIT_IMAGE_POST_PROCESS)
 /**
  * board_fit_image_post_process() - Do any post-process on FIT binary data
  *