summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/compressed/Makefile
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-27 01:05:20 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-27 01:05:20 +0000
commit546db14ee74118296f425f3b91634fb767d67290 (patch)
tree22b613a3da8d4bf663eec5e155af01b87fdf9094 /arch/arm/boot/compressed/Makefile
parent1e25e41c4f5474e14452094492dbc169b800e4c8 (diff)
Merge with Linux 2.3.23. The new bootmem stuff has broken various
platforms. At this time I've only verified that IP22 support compiles and IP27 actually works.
Diffstat (limited to 'arch/arm/boot/compressed/Makefile')
-rw-r--r--arch/arm/boot/compressed/Makefile98
1 files changed, 74 insertions, 24 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index e31e8b288..3c0478ab3 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -2,47 +2,97 @@
# 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
-FONTC =$(TOPDIR)/drivers/video/font_acorn_8x8.c
+HEAD = head.o
+OBJS = misc.o
+SYSTEM = $(TOPDIR)/vmlinux
+CFLAGS = -O2 -DSTDC_HEADERS $(CFLAGS_PROC)
+FONTC = $(TOPDIR)/drivers/video/font_acorn_8x8.c
+ZLDFLAGS = -X -T vmlinux.lds
+#
+# Architecture dependencies
+#
ifeq ($(CONFIG_ARCH_ACORN),y)
-OBJS += ll_char_wr.o font.o
+OBJS += ll_char_wr.o font.o
+endif
+
+ifeq ($(CONFIG_CPU_26),y)
+ZTEXTADDR = 0x02080000
+endif
+
+ifeq ($(CONFIG_ARCH_RPC),y)
+ZTEXTADDR = 0x10008000
+endif
+
+ifeq ($(CONFIG_ARCH_EBSA110),y)
+ZTEXTADDR = 0x00008000
+endif
+
+ifeq ($(CONFIG_FOOTBRIDGE),y)
+ZTEXTADDR = 0x00008000
+endif
+
+ifeq ($(CONFIG_ARCH_NETWINDER),y)
+OBJS += head-netwinder.o
endif
-ifeq ($(NEW_LINKER),y)
-BINFMT := elf32-littlearm
+ifeq ($(CONFIG_ARCH_NEXUSPCI),y)
+HEAD = head-nexuspci.o
+OBJS += $(TOPDIR)/arch/arm/lib/ll_char_wr_scc.o
+ZTEXTADDR = 0x40200000
+ZRELADDR = 0x40008000
+endif
+
+ifeq ($(CONFIG_ARCH_SA110),y)
+ifeq ($(CONFIG_SA1100_VICTOR),y)
+HEAD = head-victor.o
+ZTEXTADDR = 0x00002000
+ZBSSADDR = 0xc0100000
else
-BINFMT := elf32-arm
+ZTEXTADDR = 0xc0008000
+endif
+ZRELADDR = 0xc0008000
+endif
+
+#
+# If you don't define ZRELADDR above,
+# then it defaults to ZTEXTADDR
+#
+ifeq ($(ZRELADDR),)
+ZRELADDR = $(ZTEXTADDR)
endif
+SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;
+
+ifneq ($(ZBSSADDR),)
+SEDFLAGS += s/BSS_START/$(ZBSSADDR)/
+else
+SEDFLAGS += s/BSS_START/ALIGN(4)/
+endif
all: vmlinux
-vmlinux: $(OBJS) piggy.o
- $(LD) $(ZLINKFLAGS) -o vmlinux $(OBJS) piggy.o
+vmlinux: $(HEAD) $(OBJS) piggy.o vmlinux.lds
+ $(LD) $(ZLDFLAGS) $(HEAD) $(OBJS) piggy.o $(GCCLIB) -o vmlinux
$(HEAD): $(HEAD:.o=.S)
- $(CC) -traditional -DLOADADDR=$(ZRELADDR) -c $(HEAD:.o=.S)
+ $(CC) -traditional -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) -r -o piggy.o -b binary $$tmppiggy.gz -b $(BINFMT) -T $$tmppiggy.lnk; \
- rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk;
+ $(OBJCOPY) $(SYSTEM) piggy
+ gzip -9 < piggy > piggy.gz
+ $(LD) -r -o $@ -b binary piggy.gz
+ rm -f piggy piggy.gz
font.o: $(FONTC)
$(CC) -Dstatic= -c -o $@ $(FONTC)
-clean:; rm -f vmlinux core
+vmlinux.lds: vmlinux.lds.in
+ @sed "$(SEDFLAGS)" < vmlinux.lds.in > $@
+
+clean:; rm -f vmlinux core piggy*
+
+.PHONY: vmlinux.lds clean
+misc.o: misc.c $(TOPDIR)/include/asm/arch/uncompress.h $(TOPDIR)/lib/inflate.c