patch-2.1.80 linux/arch/arm/boot/compressed/Makefile

Next file: linux/arch/arm/boot/compressed/Makefile.debug
Previous file: linux/arch/arm/boot/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.79/linux/arch/arm/boot/compressed/Makefile linux/arch/arm/boot/compressed/Makefile
@@ -0,0 +1,33 @@
+#
+# linux/arch/arm/boot/compressed/Makefile
+#
+# create a compressed vmlinuz image from the original vmlinux
+#
+# With this config, max compressed image size = 640k
+# Uncompressed image size = 1.3M (text+data)
+
+SYSTEM	=$(TOPDIR)/vmlinux
+HEAD	=$(COMPRESSED_HEAD)
+OBJS	=$(HEAD) misc.o $(COMPRESSED_EXTRA)
+CFLAGS	=-O2 -DSTDC_HEADERS $(CFLAGS_PROC)
+ARFLAGS =rc
+
+all:		vmlinux
+
+vmlinux:	piggy.o $(OBJS)
+		$(LD) $(ZLINKFLAGS) -o vmlinux $(OBJS) piggy.o
+
+$(HEAD): 	$(HEAD:.o=.S)
+		$(CC) -traditional -DLOADADDR=$(ZRELADDR) -c $(HEAD:.o=.S)
+
+piggy.o:	$(SYSTEM)
+		tmppiggy=_tmp_$$$$piggy; \
+		rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk; \
+		$(OBJCOPY) $(SYSTEM) $$tmppiggy; \
+		gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
+		echo "SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}" > $$tmppiggy.lnk; \
+		$(LD) -m elf_arm -r -o piggy.o -b binary $$tmppiggy.gz -b elf32-arm -T $$tmppiggy.lnk; \
+		rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk;
+
+clean:;		rm -f vmlinux core
+

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov