patch-2.4.22 linux-2.4.22/arch/sh64/boot/compressed/Makefile
Next file: linux-2.4.22/arch/sh64/boot/compressed/cache.c
Previous file: linux-2.4.22/arch/sh64/boot/Makefile
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/sh64/boot/compressed/Makefile
- Orig date:
1969-12-31 16:00:00.000000000 -0800
diff -urN linux-2.4.21/arch/sh64/boot/compressed/Makefile linux-2.4.22/arch/sh64/boot/compressed/Makefile
@@ -0,0 +1,57 @@
+#
+# linux/arch/shmedia/boot/compressed/Makefile
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License. See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2002 Stuart Menefy
+#
+# create a compressed vmlinux image from the original vmlinux
+#
+
+
+# This is a temporary work around for a problem with the Linux ld.
+# We can't use the Linux linker, because it doesn't work with binary
+# files, so we use the bard machine linker instead...
+PIGGYLD=sh64-superh-elf-ld -EL # -m shlelf64
+# ...which has the knock on that we need this when doing the final link.
+EXTRAFLAGS=--no-warn-mismatch
+
+HEAD = head.o
+SYSTEM = $(TOPDIR)/vmlinux
+
+OBJECTS = $(HEAD) misc.o cache.o
+
+ZLDFLAGS = -e startup -T vmlinux.lds
+
+#
+# ZIMAGE_OFFSET is the load offset of the compression loader
+# (4M for the kernel plus 64K for this loader)
+#
+ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[0x$(CONFIG_MEMORY_START)+0x400000+0x10000])
+
+ZLINKFLAGS = -Ttext $(ZIMAGE_OFFSET) $(ZLDFLAGS)
+
+all: vmlinux
+
+vmlinux.lds: vmlinux.lds.S
+ $(CPP) -traditional -C -P -I$(HPATH) -Ush vmlinux.lds.S >vmlinux.lds
+
+vmlinux: piggy.o $(OBJECTS) vmlinux.lds
+ $(LD) $(ZLINKFLAGS) $(EXTRAFLAGS) -o vmlinux $(OBJECTS) piggy.o
+
+head.o: head.S
+ $(CC) $(AFLAGS) -traditional -c head.S
+
+piggy.o: $(SYSTEM)
+ tmppiggy=_tmp_$$$$piggy; \
+ rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk; \
+ $(OBJCOPY) -R .empty_zero_page $(SYSTEM) $$tmppiggy; \
+ gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
+ echo "SECTIONS { .image : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}" > $$tmppiggy.lnk; \
+ $(PIGGYLD) -r -o piggy.o -b binary $$tmppiggy.gz -b elf32-sh64 -T $$tmppiggy.lnk; \
+ rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk
+
+clean:
+ rm -f vmlinux _tmp_*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)