diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-12 23:29:19 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-12 23:29:19 -0500 |
commit | c7b16efb7d0c7fce218b2cdafa2432c5fbf57314 (patch) | |
tree | b82e0aa1c50b9d0bf358b0c2050695e2c8094748 | |
parent | 644755e7867710a23e6243dcc69cfc071985f560 (diff) |
sh: Add support for LZO-compressed kernels.
Plugs in LZO along with the others.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/Kconfig | 1 | ||||
-rw-r--r-- | arch/sh/Makefile | 5 | ||||
-rw-r--r-- | arch/sh/boot/Makefile | 21 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile | 3 | ||||
-rw-r--r-- | arch/sh/boot/compressed/misc.c | 4 |
5 files changed, 26 insertions, 8 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 4eaf3401a15e..5ac0115c9e20 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -22,6 +22,7 @@ config SUPERH | |||
22 | select HAVE_KERNEL_GZIP | 22 | select HAVE_KERNEL_GZIP |
23 | select HAVE_KERNEL_BZIP2 | 23 | select HAVE_KERNEL_BZIP2 |
24 | select HAVE_KERNEL_LZMA | 24 | select HAVE_KERNEL_LZMA |
25 | select HAVE_KERNEL_LZO | ||
25 | select HAVE_SYSCALL_TRACEPOINTS | 26 | select HAVE_SYSCALL_TRACEPOINTS |
26 | select RTC_LIB | 27 | select RTC_LIB |
27 | select GENERIC_ATOMIC64 | 28 | select GENERIC_ATOMIC64 |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index db91925c79d1..fd57676115e6 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -203,8 +203,8 @@ endif | |||
203 | libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) | 203 | libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) |
204 | libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) | 204 | libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) |
205 | 205 | ||
206 | BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec uImage.bin \ | 206 | BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.lzo \ |
207 | zImage vmlinux.srec romImage | 207 | uImage.srec uImage.bin zImage vmlinux.srec romImage |
208 | PHONY += $(BOOT_TARGETS) | 208 | PHONY += $(BOOT_TARGETS) |
209 | 209 | ||
210 | all: $(KBUILD_IMAGE) | 210 | all: $(KBUILD_IMAGE) |
@@ -231,4 +231,5 @@ define archhelp | |||
231 | @echo '* uImage.gz - Kernel-only image for U-Boot (gzip)' | 231 | @echo '* uImage.gz - Kernel-only image for U-Boot (gzip)' |
232 | @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)' | 232 | @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)' |
233 | @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)' | 233 | @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)' |
234 | @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)' | ||
234 | endef | 235 | endef |
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index cb8cf5572e79..743ce0c8d98d 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile | |||
@@ -21,12 +21,15 @@ CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 | |||
21 | CONFIG_ENTRY_OFFSET ?= 0x00001000 | 21 | CONFIG_ENTRY_OFFSET ?= 0x00001000 |
22 | 22 | ||
23 | suffix-y := bin | 23 | suffix-y := bin |
24 | suffix-$(CONFIG_KERNEL_GZIP) := gz | 24 | suffix-$(CONFIG_KERNEL_GZIP) := gz |
25 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | 25 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 |
26 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | 26 | suffix-$(CONFIG_KERNEL_LZMA) := lzma |
27 | 27 | suffix-$(CONFIG_KERNEL_LZO) := lzo | |
28 | targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma uImage.bin | 28 | |
29 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma | 29 | targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \ |
30 | uImage.bz2 uImage.lzma uImage.lzo uImage.bin | ||
31 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ | ||
32 | vmlinux.bin.lzo | ||
30 | subdir- := compressed romimage | 33 | subdir- := compressed romimage |
31 | 34 | ||
32 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | 35 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE |
@@ -80,6 +83,9 @@ $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE | |||
80 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE | 83 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE |
81 | $(call if_changed,lzma) | 84 | $(call if_changed,lzma) |
82 | 85 | ||
86 | $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE | ||
87 | $(call if_changed,lzo) | ||
88 | |||
83 | $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 | 89 | $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 |
84 | $(call if_changed,uimage,bzip2) | 90 | $(call if_changed,uimage,bzip2) |
85 | 91 | ||
@@ -89,6 +95,9 @@ $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz | |||
89 | $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma | 95 | $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma |
90 | $(call if_changed,uimage,lzma) | 96 | $(call if_changed,uimage,lzma) |
91 | 97 | ||
98 | $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo | ||
99 | $(call if_changed,uimage,lzo) | ||
100 | |||
92 | $(obj)/uImage.bin: $(obj)/vmlinux.bin | 101 | $(obj)/uImage.bin: $(obj)/vmlinux.bin |
93 | $(call if_changed,uimage,none) | 102 | $(call if_changed,uimage,none) |
94 | 103 | ||
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index 6182eca5180a..6b95a2a48267 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ | 7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ |
8 | vmlinux.bin.bz2 vmlinux.bin.lzma \ | 8 | vmlinux.bin.bz2 vmlinux.bin.lzma \ |
9 | vmlinux.bin.lzo \ | ||
9 | head_$(BITS).o misc.o piggy.o | 10 | head_$(BITS).o misc.o piggy.o |
10 | 11 | ||
11 | OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o | 12 | OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o |
@@ -47,6 +48,8 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE | |||
47 | $(call if_changed,bzip2) | 48 | $(call if_changed,bzip2) |
48 | $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE | 49 | $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE |
49 | $(call if_changed,lzma) | 50 | $(call if_changed,lzma) |
51 | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE | ||
52 | $(call if_changed,lzo) | ||
50 | 53 | ||
51 | OBJCOPYFLAGS += -R .empty_zero_page | 54 | OBJCOPYFLAGS += -R .empty_zero_page |
52 | 55 | ||
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c index b51b1fc4baae..4b319e9e4f88 100644 --- a/arch/sh/boot/compressed/misc.c +++ b/arch/sh/boot/compressed/misc.c | |||
@@ -62,6 +62,10 @@ static unsigned long free_mem_end_ptr; | |||
62 | #include "../../../../lib/decompress_unlzma.c" | 62 | #include "../../../../lib/decompress_unlzma.c" |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #ifdef CONFIG_KERNEL_LZO | ||
66 | #include "../../../../lib/decompress_unlzo.c" | ||
67 | #endif | ||
68 | |||
65 | #ifdef CONFIG_SH_STANDARD_BIOS | 69 | #ifdef CONFIG_SH_STANDARD_BIOS |
66 | size_t strlen(const char *s) | 70 | size_t strlen(const char *s) |
67 | { | 71 | { |