diff options
Diffstat (limited to 'arch/h8300/boot')
-rw-r--r-- | arch/h8300/boot/compressed/Makefile | 11 | ||||
-rw-r--r-- | arch/h8300/boot/compressed/misc.c | 6 | ||||
-rw-r--r-- | arch/h8300/boot/compressed/vmlinux.lds | 4 |
3 files changed, 17 insertions, 4 deletions
diff --git a/arch/h8300/boot/compressed/Makefile b/arch/h8300/boot/compressed/Makefile index d7bc3fa7f..7643633f1 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 6029c5351..9f64fe8f2 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) { diff --git a/arch/h8300/boot/compressed/vmlinux.lds b/arch/h8300/boot/compressed/vmlinux.lds index 44fd209db..ad848a72f 100644 --- a/arch/h8300/boot/compressed/vmlinux.lds +++ b/arch/h8300/boot/compressed/vmlinux.lds @@ -13,16 +13,18 @@ SECTIONS { *(.rodata) } + . = ALIGN(0x4) ; .data : { + . = ALIGN(0x4) ; __sdata = . ; ___data_start = . ; *(.data.*) } + . = ALIGN(0x4) ; .bss : { - . = ALIGN(0x4) ; __sbss = . ; *(.bss*) . = ALIGN(0x4) ; |