aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorWu Zhangjin <wuzhangjin@gmail.com>2010-12-25 10:11:49 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-04-02 07:54:25 -0400
commit7ae7ef3ffdd62454a1c0e6b69ebc7a14b523f0cc (patch)
tree288abc6246a15dc556e8d1dafb0d46e3144461cc /arch/mips
parent160f14312b0b7d35759535b1f60be79247b263c4 (diff)
MIPS: Reduce kernel image size for !CONFIG_DEBUG_ZBOOT
!CONFIG_DEBUG_ZBOOT doesn't need puts() and puthex(), remove them and the corrospindig strings for !CONFIG_DEBUG_ZBOOT, as a result, it saves about 1280 bytes. [ralf@linux-mips.org: Resolved reject.] Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Cc: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/1898/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/boot/compressed/Makefile3
-rw-r--r--arch/mips/boot/compressed/decompress.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 82d0b131a3db..dc91bde10d62 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -32,9 +32,10 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
32targets := head.o decompress.o string.o dbg.o uart-16550.o uart-alchemy.o 32targets := head.o decompress.o string.o dbg.o uart-16550.o uart-alchemy.o
33 33
34# decompressor objects (linked with vmlinuz) 34# decompressor objects (linked with vmlinuz)
35vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/dbg.o 35vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
36 36
37ifdef CONFIG_DEBUG_ZBOOT 37ifdef CONFIG_DEBUG_ZBOOT
38vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
38vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o 39vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
39vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o 40vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
40endif 41endif
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c
index 31903cf9709d..54831069a206 100644
--- a/arch/mips/boot/compressed/decompress.c
+++ b/arch/mips/boot/compressed/decompress.c
@@ -28,8 +28,13 @@ unsigned long free_mem_end_ptr;
28extern unsigned char __image_begin, __image_end; 28extern unsigned char __image_begin, __image_end;
29 29
30/* debug interfaces */ 30/* debug interfaces */
31#ifdef CONFIG_DEBUG_ZBOOT
31extern void puts(const char *s); 32extern void puts(const char *s);
32extern void puthex(unsigned long long val); 33extern void puthex(unsigned long long val);
34#else
35#define puts(s) do {} while (0)
36#define puthex(val) do {} while (0)
37#endif
33 38
34void error(char *x) 39void error(char *x)
35{ 40{