]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
gzip/zlib: make features optional
authorMike Frysinger <vapier@gentoo.org>
Fri, 22 Jan 2010 00:30:36 +0000 (19:30 -0500)
committerWolfgang Denk <wd@denx.de>
Mon, 25 Jan 2010 23:04:57 +0000 (00:04 +0100)
If you really want to slim down U-Boot and you would rather use a higher
compression scheme (like LZMA), it'd be nice to disable gzip/zlib since
these code bases take up a significant amount of space.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
common/cmd_bootm.c
include/config_defaults.h
lib_generic/Makefile

index f28e88f340f472dc0e96b314cec77572576f04a6..23ab0c4aaea692e2934c4ce6e65889f9ee266c7e 100644 (file)
@@ -352,6 +352,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
                *load_end = load + image_len;
                puts("OK\n");
                break;
+#ifdef CONFIG_GZIP
        case IH_COMP_GZIP:
                printf ("   Uncompressing %s ... ", type_name);
                if (gunzip ((void *)load, unc_len,
@@ -365,6 +366,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 
                *load_end = load + image_len;
                break;
+#endif /* CONFIG_GZIP */
 #ifdef CONFIG_BZIP2
        case IH_COMP_BZIP2:
                printf ("   Uncompressing %s ... ", type_name);
index 08b6edec4ed72a05222be51a380a2652e4ab7ae3..0337163c2a21529a9d76639c51fe65bf40b4bada 100644 (file)
@@ -14,4 +14,7 @@
 #define CONFIG_BOOTM_NETBSD 1
 #define CONFIG_BOOTM_RTEMS 1
 
+#define CONFIG_GZIP 1
+#define CONFIG_ZLIB 1
+
 #endif
index 4e4496a552fd06afa23e9bfd3e7309643efe4e38..c45f07ca125be1de78117b3e5a235e67be6208b3 100644 (file)
@@ -37,7 +37,7 @@ COBJS-y += crc32.o
 COBJS-y += ctype.o
 COBJS-y += display_options.o
 COBJS-y += div64.o
-COBJS-y += gunzip.o
+COBJS-$(CONFIG_GZIP) += gunzip.o
 COBJS-$(CONFIG_LMB) += lmb.o
 COBJS-y += ldiv.o
 COBJS-$(CONFIG_MD5) += md5.o
@@ -48,7 +48,7 @@ COBJS-y += string.o
 COBJS-y        += strmhz.o
 COBJS-y += time.o
 COBJS-y += vsprintf.o
-COBJS-y += zlib.o
+COBJS-$(CONFIG_ZLIB) += zlib.o
 COBJS-$(CONFIG_RBTREE) += rbtree.o
 
 COBJS  := $(COBJS-y)