Skip to content

Commit

Permalink
h8300: Add LZO compression
Browse files Browse the repository at this point in the history
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
  • Loading branch information
ysat0 committed Jan 20, 2016
1 parent af3da57 commit 42b510e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ config H8300
select HAVE_DMA_ATTRS
select CLKSRC_OF
select H8300_TMR8
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZO

config RWSEM_GENERIC_SPINLOCK
def_bool y
Expand Down
11 changes: 8 additions & 3 deletions arch/h8300/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions arch/h8300/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 42b510e

Please sign in to comment.