summaryrefslogtreecommitdiff
path: root/arch/nios2/boot/compressed/Makefile
diff options
context:
space:
mode:
authorLey Foon Tan <lftan@altera.com>2015-02-10 18:26:34 +0300
committerLey Foon Tan <lftan@altera.com>2015-02-10 18:26:34 +0300
commit01623627a292fbd9dc62e05489153d7f1add7061 (patch)
treedd29d173f5499e5dc015e4b8fa2d5575c406bc6f /arch/nios2/boot/compressed/Makefile
parente8bf5bc776edef44777b13b2eb4461d653519bae (diff)
downloadlinux-01623627a292fbd9dc62e05489153d7f1add7061.tar.xz
nios2: Add support for compressed kernel
Signed-off-by: Ley Foon Tan <lftan@altera.com>
Diffstat (limited to 'arch/nios2/boot/compressed/Makefile')
-rw-r--r--arch/nios2/boot/compressed/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/nios2/boot/compressed/Makefile b/arch/nios2/boot/compressed/Makefile
new file mode 100644
index 000000000000..5b0fb346d888
--- /dev/null
+++ b/arch/nios2/boot/compressed/Makefile
@@ -0,0 +1,19 @@
+#
+# create a compressed vmlinux image from the original vmlinux
+#
+
+targets := vmlinux head.o misc.o piggy.o vmlinux.lds
+asflags-y :=
+
+OBJECTS = $(obj)/head.o $(obj)/misc.o
+
+LDFLAGS_vmlinux := -T
+
+$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE
+ $(call if_changed,ld)
+ @:
+
+LDFLAGS_piggy.o := -r --format binary --oformat elf32-littlenios2 -T
+
+$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/../vmlinux.gz FORCE
+ $(call if_changed,ld)