From 6e3963d169b600c19427b262b1930282a7f811b9 Mon Sep 17 00:00:00 2001 From: Yoshinori Sato Date: Sun, 3 Jan 2016 13:59:31 +0900 Subject: [PATCH] rx: LZO support. Signed-off-by: Yoshinori Sato --- arch/rx/Kconfig | 2 ++ arch/rx/boot/compressed/Makefile | 11 +++++++---- arch/rx/boot/compressed/misc.c | 16 ---------------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/arch/rx/Kconfig b/arch/rx/Kconfig index 45f3f90ae227..51233d31e43a 100644 --- a/arch/rx/Kconfig +++ b/arch/rx/Kconfig @@ -8,6 +8,7 @@ config RX select HAVE_CLK select HAVE_SYSCALL_TRACEPOINTS select HAVE_KERNEL_GZIP + select HAVE_KERNEL_LZO select HAVE_DMA_ATTRS select HAVE_GENERIC_DMA_COHERENT select GENERIC_ATOMIC64 @@ -22,6 +23,7 @@ config RX select COMMON_CLK select CLKSRC_OF select GENERIC_CLOCKEVENTS + select HAVE_EFFICIENT_UNALIGNED_ACCESS config MMU def_bool n diff --git a/arch/rx/boot/compressed/Makefile b/arch/rx/boot/compressed/Makefile index f17324dfede3..82df4230d9a8 100644 --- a/arch/rx/boot/compressed/Makefile +++ b/arch/rx/boot/compressed/Makefile @@ -4,7 +4,7 @@ # create a compressed vmlinux image from the original vmlinux # -targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o +targets := vmlinux vmlinux.bin head.o misc.o piggy.o OBJECTS = $(obj)/head.o $(obj)/misc.o @@ -29,11 +29,14 @@ $(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-rx-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) diff --git a/arch/rx/boot/compressed/misc.c b/arch/rx/boot/compressed/misc.c index 8e586497e572..d8c2da74c7b9 100644 --- a/arch/rx/boot/compressed/misc.c +++ b/arch/rx/boot/compressed/misc.c @@ -34,28 +34,12 @@ extern int _end; static unsigned long free_mem_ptr; static unsigned long free_mem_end_ptr; -#ifdef CONFIG_HAVE_KERNEL_BZIP2 -#define HEAP_SIZE 0x400000 -#else #define HEAP_SIZE 0x10000 -#endif #ifdef CONFIG_KERNEL_GZIP #include "../../../../lib/decompress_inflate.c" #endif -#ifdef CONFIG_KERNEL_BZIP2 -#include "../../../../lib/decompress_bunzip2.c" -#endif - -#ifdef CONFIG_KERNEL_LZMA -#include "../../../../lib/decompress_unlzma.c" -#endif - -#ifdef CONFIG_KERNEL_XZ -#include "../../../../lib/decompress_unxz.c" -#endif - #ifdef CONFIG_KERNEL_LZO #include "../../../../lib/decompress_unlzo.c" #endif -- 2.11.0