From 42b510eb56dea96150dfc0747d4b2486b7fa72e0 Mon Sep 17 00:00:00 2001 From: Yoshinori Sato Date: Fri, 4 Dec 2015 01:20:57 +0900 Subject: h8300: Add LZO compression Signed-off-by: Yoshinori Sato --- arch/h8300/boot/compressed/Makefile | 11 ++++++++--- arch/h8300/boot/compressed/misc.c | 6 ++++++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'arch/h8300/boot') diff --git a/arch/h8300/boot/compressed/Makefile b/arch/h8300/boot/compressed/Makefile index d7bc3fa7f2c6..7643633f1330 100644 --- a/arch/h8300/boot/compressed/Makefile +++ b/arch/h8300/boot/compressed/Makefile @@ -28,11 +28,16 @@ $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy) -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE - $(call if_changed,gzip) +suffix-$(CONFIG_KERNEL_GZIP) := gzip +suffix-$(CONFIG_KERNEL_LZO) := lzo + +$(obj)/vmlinux.bin.$(suffix-y): $(obj)/vmlinux.bin FORCE + $(call if_changed,$(suffix-y)) LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300-linux -T OBJCOPYFLAGS := -O binary -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE +$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE $(call if_changed,ld) + +CFLAGS_misc.o = -O0 diff --git a/arch/h8300/boot/compressed/misc.c b/arch/h8300/boot/compressed/misc.c index 6029c5351895..9f64fe8f29ff 100644 --- a/arch/h8300/boot/compressed/misc.c +++ b/arch/h8300/boot/compressed/misc.c @@ -32,7 +32,13 @@ extern char output[]; #define HEAP_SIZE 0x10000 +#ifdef CONFIG_KERNEL_GZIP #include "../../../../lib/decompress_inflate.c" +#endif + +#ifdef CONFIG_KERNEL_LZO +#include "../../../../lib/decompress_unlzo.c" +#endif void *memset(void *s, int c, size_t n) { -- cgit