summaryrefslogtreecommitdiffstats
path: root/arch/sh/boot/compressed/Makefile
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-11 13:21:19 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-07-11 13:21:19 -0400
commit07e88e1bfc128681a80578724fde6a872f413862 (patch)
tree7e85e26152bcc277d6e2e288aac155f155ce5c4e /arch/sh/boot/compressed/Makefile
parentdf8ce2595fbac8b046322fce9df61ce1cf8ddf62 (diff)
sh: bzip2/lzma zImage support.
This plugs in bzip2 and lzma support for zImages. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boot/compressed/Makefile')
-rw-r--r--arch/sh/boot/compressed/Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 9531bf1b7c2..0a4e7af8a71 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -5,6 +5,7 @@
#
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
+ vmlinux.bin.bz2 vmlinux.bin.lzma \
head_$(BITS).o misc_$(BITS).o piggy.o
OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o
@@ -38,10 +39,22 @@ $(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
+vmlinux.bin.all-y := $(obj)/vmlinux.bin
+
+$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
$(call if_changed,gzip)
+$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
+ $(call if_changed,bzip2)
+$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
+ $(call if_changed,lzma)
+
+suffix-$(CONFIG_KERNEL_GZIP) := gz
+suffix-$(CONFIG_KERNEL_BZIP2) := bz2
+suffix-$(CONFIG_KERNEL_LZMA) := lzma
OBJCOPYFLAGS += -R .empty_zero_page
-$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
- $(call if_changed,as_o_S)
+LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
+
+$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
+ $(call if_changed,ld)