[U-Boot] [PATCH 3/4 v2] sha1: add dedicated config option

Mike Frysinger vapier at gentoo.org
Mon Jan 18 03:08:00 CET 2010


The sha1 code is currently compiled for everyone, but in reality, it's
only used by the FIT code.  So make it optional just like MD5.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
v2
	- rebased onto latest tree

 include/image.h      |    1 +
 lib_generic/Makefile |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/image.h b/include/image.h
index 8c0c1b0..4ed0379 100644
--- a/include/image.h
+++ b/include/image.h
@@ -56,6 +56,7 @@
 #include <libfdt.h>
 #include <fdt_support.h>
 #define CONFIG_MD5		/* FIT images need MD5 support */
+#define CONFIG_SHA1		/* and SHA1 */
 #endif
 
 /*
diff --git a/lib_generic/Makefile b/lib_generic/Makefile
index 2938825..c45f07c 100644
--- a/lib_generic/Makefile
+++ b/lib_generic/Makefile
@@ -42,7 +42,7 @@ COBJS-$(CONFIG_LMB) += lmb.o
 COBJS-y += ldiv.o
 COBJS-$(CONFIG_MD5) += md5.o
 COBJS-y += net_utils.o
-COBJS-y += sha1.o
+COBJS-$(CONFIG_SHA1) += sha1.o
 COBJS-$(CONFIG_SHA256) += sha256.o
 COBJS-y += string.o
 COBJS-y	+= strmhz.o
-- 
1.6.6



More information about the U-Boot mailing list