summaryrefslogtreecommitdiff
path: root/include/image.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-05-08 08:05:59 +0000
committerTom Rini <trini@ti.com>2013-05-14 15:37:25 -0400
commit87ebee39e9d02dba6d36d03d512e7d6e8a5a9abb (patch)
tree1c16027b1c940721a9dd7e532b7e3a334ba31ab4 /include/image.h
parent1fe7d93891905b9af1d81c9aef7b5646452ceb41 (diff)
downloadu-boot-imx-87ebee39e9d02dba6d36d03d512e7d6e8a5a9abb.zip
u-boot-imx-87ebee39e9d02dba6d36d03d512e7d6e8a5a9abb.tar.gz
u-boot-imx-87ebee39e9d02dba6d36d03d512e7d6e8a5a9abb.tar.bz2
image: Add CONFIG_FIT_SPL_PRINT to control FIT image printing in SPL
This code is very large, and in SPL it isn't always useful to print out image information (in fact there might not even be a console active). So disable this feature unless this option is set. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/image.h')
-rw-r--r--include/image.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/include/image.h b/include/image.h
index 27c977e..bfce861 100644
--- a/include/image.h
+++ b/include/image.h
@@ -61,8 +61,37 @@
#if defined(CONFIG_FIT)
#include <libfdt.h>
#include <fdt_support.h>
-#define CONFIG_MD5 /* FIT images need MD5 support */
-#define CONFIG_SHA1 /* and SHA1 */
+# ifdef CONFIG_SPL_BUILD
+# ifdef CONFIG_SPL_CRC32_SUPPORT
+# define IMAGE_ENABLE_CRC32 1
+# endif
+# ifdef CONFIG_SPL_MD5_SUPPORT
+# define IMAGE_ENABLE_MD5 1
+# endif
+# ifdef CONFIG_SPL_SHA1_SUPPORT
+# define IMAGE_ENABLE_SHA1 1
+# endif
+# else
+# define CONFIG_CRC32 /* FIT images need CRC32 support */
+# define CONFIG_MD5 /* and MD5 */
+# define CONFIG_SHA1 /* and SHA1 */
+# define IMAGE_ENABLE_CRC32 1
+# define IMAGE_ENABLE_MD5 1
+# define IMAGE_ENABLE_SHA1 1
+# endif
+
+#ifndef IMAGE_ENABLE_CRC32
+#define IMAGE_ENABLE_CRC32 0
+#endif
+
+#ifndef IMAGE_ENABLE_MD5
+#define IMAGE_ENABLE_MD5 0
+#endif
+
+#ifndef IMAGE_ENABLE_SHA1
+#define IMAGE_ENABLE_SHA1 0
+#endif
+
#endif
/*