From 546db14ee74118296f425f3b91634fb767d67290 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 27 Jan 2000 01:05:20 +0000 Subject: 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. --- arch/arm/Makefile | 231 ++++++++++++++++++++++++++---------------------------- 1 file changed, 110 insertions(+), 121 deletions(-) (limited to 'arch/arm/Makefile') diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 11fefd85b..0895fc0ba 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -12,91 +12,101 @@ # # Copyright (C) 1995-1999 by Russell King -# GCC 2.7 uses different options to later compilers; sort out which we have -CONFIG_GCC_NEW := $(shell if $(CC) --version 2>&1 | grep '^2\.7' > /dev/null; then echo n; else echo y; fi) +LD := $(CROSS_COMPILE)ld +OBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S +CPP := $(CC) -E +PERL := perl +LINKFLAGS := -X -T arch/arm/vmlinux.lds +ARCHCC := $(word 1,$(CC)) + + +CFLAGS_PIPE := -pipe +CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) + +ifdef CONFIG_FRAME_POINTER +CFLAGS := $(CFLAGS:-fomit-frame-pointer=) +endif + +ifdef CONFIG_DEBUG_INFO +CFLAGS += -g +endif -# See if this is ld "2.9.4" or later -NEW_LINKER := $(shell if $(LD) --gc-sections --version >/dev/null 2>&1; then echo y; else echo n; fi) -# CFLAGS_PROC - processor dependent CFLAGS -# PROCESSOR - processor type -# TEXTADDR - Uncompressed kernel link text address -# ZTEXTADDR - Compressed kernel link text address -# ZRELADDR - Compressed kernel relocating address -# (point at which uncompressed kernel is loaded). +# GCC 2.7 uses different options to later compilers; sort out which we have +NEW_GCC := $(shell if $(CC) --version 2>&1 | grep '^2\.7' > /dev/null; then echo n; else echo y; fi) # # select flags depending on the compiler # -ifeq ($(CONFIG_GCC_NEW),y) - CFLAGS_PROC := -mshort-load-bytes -msoft-float - CFLAGS_PROC_CPU_26 := -mcpu=arm3 -Os - CFLAGS_PROC_CPU_32v3 := -march=armv3 - CFLAGS_PROC_CPU_32v4 := -march=armv4 - CFLAGS_ARM6 := -mtune=arm6 - CFLAGS_ARM7 := -mtune=arm7 - CFLAGS_SA110 := -mtune=strongarm110 +ifeq ($(NEW_GCC),y) +CFLAGS += -mshort-load-bytes -msoft-float +CFLAGS_PROC_CPU_26 := -mcpu=arm3 -Os +CFLAGS_PROC_CPU_32v3 := -march=armv3 +CFLAGS_PROC_CPU_32v4 := -march=armv4 +CFLAGS_ARM6 := -mtune=arm6 +CFLAGS_ARM7 := -mtune=arm7 +CFLAGS_SA110 := -mtune=strongarm110 else - CFLAGS_PROC := - CFLAGS_PROC_CPU_26 := -m3 - CFLAGS_PROC_CPU_32v3 := - CFLAGS_PROC_CPU_32v4 := - CFLAGS_ARM6 := -m6 - CFLAGS_ARM7 := -m6 - CFLAGS_SA110 := -m6 +CFLAGS_PROC_CPU_26 := -m3 +CFLAGS_PROC_CPU_32v3 := +CFLAGS_PROC_CPU_32v4 := +CFLAGS_ARM6 := -m6 +CFLAGS_ARM7 := -m6 +CFLAGS_SA110 := -m6 endif +# See if this is ld "2.9.4" or later +NEW_LINKER := $(shell if $(LD) --gc-sections --version >/dev/null 2>&1; then echo y; else echo n; fi) + ifeq ($(NEW_LINKER),y) - ASFLAGS_PROC := -mno-fpu - ASFLAGS_PROC_CPU_26 := -mapcs-26 - ASFLAGS_PROC_CPU_32v3 := -mapcs-32 -marmv3m - ASFLAGS_PROC_CPU_32v4 := -mapcs-32 -marmv4t - LINKFLAGS := -p +AFLAGS += -mno-fpu +AFLAGS_PROC_CPU_26 := -mapcs-26 +AFLAGS_PROC_CPU_32v3 := -mapcs-32 -marmv3m +AFLAGS_PROC_CPU_32v4 := -mapcs-32 -marmv4t +LINKFLAGS := -p $(LINKFLAGS) else - ASFLAGS_PROC := - ASFLAGS_PROC_CPU_26 := -m3 - ASFLAGS_PROC_CPU_32v3 := -m6 - ASFLAGS_PROC_CPU_32v4 := -m6 - LINKFLAGS := +AFLAGS_PROC_CPU_26 := -m3 +AFLAGS_PROC_CPU_32v3 := -m6 +AFLAGS_PROC_CPU_32v4 := -m6 endif +# +# Select CPU dependent flags +# ifeq ($(CONFIG_CPU_26),y) - PROCESSOR = armo - TEXTADDR = 0x02080000 - ZTEXTADDR = 0x01800000 - ZRELADDR = 0x02080000 - CFLAGS_PROC += $(CFLAGS_PROC_CPU_26) - ASFLAGS_PROC += $(ASFLAGS_PROC_CPU_26) + PROCESSOR = armo + TEXTADDR = 0x02080000 + CFLAGS += $(CFLAGS_PROC_CPU_26) + AFLAGS += $(AFLAGS_PROC_CPU_26) endif ifeq ($(CONFIG_CPU_32),y) - PROCESSOR = armv - TEXTADDR = 0xC0008000 - ifeq ($(CONFIG_CPU_32v4),y) - CFLAGS_PROC += $(CFLAGS_PROC_CPU_32v4) - ASFLAGS_PROC += $(ASFLAGS_PROC_CPU_32v4) - else - CFLAGS_PROC += $(CFLAGS_PROC_CPU_32v3) - ASFLAGS_PROC += $(ASFLAGS_PROC_CPU_32v3) - endif - # - # Exactly one of the following must be selected - # - ifeq ($(CONFIG_CPU_ARM6),y) - CFLAGS_PROC += $(CFLAGS_ARM6) - else - ifeq ($(CONFIG_CPU_ARM7),y) - CFLAGS_PROC += $(CFLAGS_ARM7) - else - ifeq ($(CONFIG_CPU_SA110),y) - CFLAGS_PROC += $(CFLAGS_SA110) - endif - endif - endif + PROCESSOR = armv + TEXTADDR = 0xC0008000 + ifeq ($(CONFIG_CPU_32v4),y) + CFLAGS += $(CFLAGS_PROC_CPU_32v4) + AFLAGS += $(AFLAGS_PROC_CPU_32v4) + else + CFLAGS += $(CFLAGS_PROC_CPU_32v3) + AFLAGS += $(AFLAGS_PROC_CPU_32v3) + endif + # + # Exactly one of the following must be selected + # + ifeq ($(CONFIG_CPU_ARM6),y) + CFLAGS += $(CFLAGS_ARM6) + else + ifeq ($(CONFIG_CPU_ARM7),y) + CFLAGS += $(CFLAGS_ARM7) + else + ifeq ($(CONFIG_CPU_SA110),y) + CFLAGS += $(CFLAGS_SA110) + endif + endif + endif endif - -COMPRESSED_HEAD = head.o +GCCLIB := $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) ifeq ($(CONFIG_ARCH_A5K),y) MACHINE = a5k @@ -111,22 +121,16 @@ endif ifeq ($(CONFIG_ARCH_RPC),y) MACHINE = rpc ARCHDIR = rpc -ZTEXTADDR = 0x10008000 -ZRELADDR = 0x10008000 endif ifeq ($(CONFIG_ARCH_EBSA110),y) MACHINE = ebsa110 ARCHDIR = ebsa110 -ZTEXTADDR = 0x00008000 -ZRELADDR = 0x00008000 endif ifeq ($(CONFIG_FOOTBRIDGE),y) MACHINE = footbridge ARCHDIR = ebsa285 -ZTEXTADDR = 0x00008000 -ZRELADDR = 0x00008000 endif ifeq ($(CONFIG_ARCH_CO285),y) @@ -136,56 +140,31 @@ endif ifeq ($(CONFIG_ARCH_NEXUSPCI),y) MACHINE = nexuspci ARCHDIR = nexuspci -ZTEXTADDR = 0x40200000 -ZRELADDR = 0x40008000 -COMPRESSED_EXTRA = $(TOPDIR)/arch/arm/lib/ll_char_wr_scc.o -COMPRESSED_HEAD = head-nexuspci.o endif - - -PERL = perl -LD = $(CROSS_COMPILE)ld -OBJCOPY = $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S -OBJDUMP = $(CROSS_COMPILE)objdump -CPP = $(CC) -E -ARCHCC := $(word 1,$(CC)) -GCCLIB := `$(CC) $(CFLAGS_PROC) --print-libgcc-file-name` -HOSTCFLAGS := $(CFLAGS:-fomit-frame-pointer=) -ifeq ($(CONFIG_FRAME_POINTER),y) -CFLAGS := $(CFLAGS:-fomit-frame-pointer=) -endif -CFLAGS := $(CFLAGS_PROC) $(CFLAGS) -pipe -ASFLAGS := $(ASFLAGS_PROC) $(ASFLAGS) -LINKFLAGS += -X -T $(TOPDIR)/arch/arm/vmlinux-$(PROCESSOR).lds -e stext -ZLINKFLAGS = -Ttext $(ZTEXTADDR) - -# If we're intending to debug the kernel, make sure it has line number -# information. This gets stripped out when building (z)Image so it doesn't -# add anything to the footprint of the running kernel. -ifeq ($(CONFIG_DEBUG_INFO),y) -CFLAGS += -g +ifeq ($(CONFIG_ARCH_SA1100),u) +MACHINE = sa1100 +ARCHDIR = sa1100 endif HEAD := arch/arm/kernel/head-$(PROCESSOR).o \ arch/arm/kernel/init_task.o -SUBDIRS := arch/arm/special $(SUBDIRS) arch/arm/lib arch/arm/kernel \ - arch/arm/mm arch/arm/nwfpe +SUBDIRS += arch/arm/kernel arch/arm/mm arch/arm/lib \ + arch/arm/special arch/arm/nwfpe CORE_FILES := arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES) LIBS := arch/arm/lib/lib.a $(LIBS) $(GCCLIB) DRIVERS += arch/arm/special/special.a -ifeq ($(CONFIG_ARCH_ACORN),y) -SUBDIRS += drivers/acorn/block drivers/acorn/char drivers/acorn/net \ - drivers/acorn/scsi -DRIVERS += drivers/acorn/block/acorn-block.a \ - drivers/acorn/char/acorn-char.a \ - drivers/acorn/net/acorn-net.a \ - drivers/acorn/scsi/acorn-scsi.a +ifeq ($(CONFIG_NWFPE),y) +CORE_FILES += arch/arm/nwfpe/math-emu.o endif -ifeq ($(CONFIG_NWFPE),y) -DRIVERS += arch/arm/nwfpe/math-emu.a +ifeq ($(CONFIG_ARCH_ACORN),y) +SUBDIRS += drivers/acorn +DRIVERS += drivers/acorn/block/acorn-block.a +DRIVERS += drivers/acorn/char/acorn-char.a +DRIVERS += drivers/acorn/net/acorn-net.a +DRIVERS += drivers/acorn/scsi/acorn-scsi.a endif MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot @@ -203,14 +182,9 @@ archsymlinks: $(RM) include/asm-arm/arch include/asm-arm/proc (cd include/asm-arm; ln -sf arch-$(ARCHDIR) arch; ln -sf proc-$(PROCESSOR) proc) -# We need to rebuild the linker script -# each time, in case the architecture has -# changed. -.PHONY: arch/arm/vmlinux-$(PROCESSOR).lds - -vmlinux: arch/arm/vmlinux-$(PROCESSOR).lds +vmlinux: arch/arm/vmlinux.lds -arch/arm/vmlinux-$(PROCESSOR).lds: $(TOPDIR)/arch/arm/vmlinux-$(PROCESSOR).lds.in +arch/arm/vmlinux.lds: arch/arm/vmlinux-$(PROCESSOR).lds.in dummy @sed 's/TEXTADDR/$(TEXTADDR)/' <$< >$@ arch/arm/kernel: dummy @@ -225,15 +199,13 @@ arch/arm/lib: dummy zImage zinstall Image install: vmlinux @$(MAKEBOOT) $@ -# Once we've finished integrating the sources, the @$(MAKE) will disappear archmrproper: - rm -f include/asm-arm/arch include/asm-arm/proc @$(MAKE) -C arch/$(ARCH)/special mrproper - rm -f $(TOPDIR)/arch/arm/vmlinux-*.lds + $(RM) include/asm-arm/arch include/asm-arm/proc archclean: @$(MAKEBOOT) clean - $(RM) arch/arm/lib/constants.h + $(RM) arch/arm/lib/constants.h arch/arm/vmlinux.lds archdep: @$(MAKEBOOT) dep @@ -244,6 +216,10 @@ Img:; @$(MAKEBOOT) Image i:; @$(MAKEBOOT) install zi:; @$(MAKEBOOT) zinstall +# +# Configuration targets. Use these to select a +# configuration for your architecture +# a5k_config: $(RM) arch/arm/defconfig cp arch/arm/def-configs/a5k arch/arm/defconfig @@ -260,3 +236,16 @@ rpc_config: $(RM) arch/arm/defconfig cp arch/arm/def-configs/rpc arch/arm/defconfig +brutus_config: + $(RM) arch/arm/defconfig + cp arch/arm/def-configs/brutus arch/arm/defconfig + +victor_config: + $(RM) arch/arm/defconfig + cp arch/arm/def-configs/victor arch/arm/defconfig + +empeg_config: + $(RM) arch/arm/defconfig + cp arch/arm/def-configs/empeg arch/arm/defconfig + + -- cgit v1.2.3