diff options
Diffstat (limited to 'arch/arm/Makefile')
-rw-r--r-- | arch/arm/Makefile | 158 |
1 files changed, 88 insertions, 70 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 0c39121be..201442d04 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -12,52 +12,58 @@ # # Copyright (C) 1995, 1996 by Russell King -CFLAGS_PROC := -ASFLAGS_PROC := - -ifeq ($(CONFIG_CPU_ARM2),y) -PROCESSOR = armo -ASFLAGS_PROC += -m2 -ifeq ($(CONFIG_BINUTILS_NEW),y) -CFLAGS_PROC += -mcpu=arm2 -ASFLAGS_PROC += -m2 -else -CFLAGS_PROC += -m2 -ASFLAGS_PROC += -m2 -endif -endif - -ifeq ($(CONFIG_CPU_ARM3),y) -PROCESSOR = armo -ifeq ($(CONFIG_BINUTILS_NEW),y) -CFLAGS_PROC += -mcpu=arm3 -ASFLAGS_PROC += -m3 -else -CFLAGS_PROC += -m3 -ASFLAGS_PROC += -m3 -endif -endif - -ifeq ($(CONFIG_CPU_ARM6),y) -PROCESSOR = armv -ifeq ($(CONFIG_BINUTILS_NEW),y) -CFLAGS_PROC += -mcpu=arm6 -ASFLAGS_PROC += -m6 -else -CFLAGS_PROC += -m6 -ASFLAGS_PROC += -m6 -endif -endif - -ifeq ($(CONFIG_CPU_SA110),y) -PROCESSOR = armv -ifeq ($(CONFIG_BINUTILS_NEW),y) -CFLAGS_PROC += -mcpu=strongarm110 -ASFLAGS_PROC += -m6 -else -CFLAGS_PROC += -m6 -ASFLAGS_PROC += -m6 -endif +CFLAGS_PROC := +ASFLAGS_PROC := + +# All processors get `-mshort-load-bytes' for now, to work around alignment +# problems. This is more of a hack that just happens to work than a real fix +# but it will do for now. + +ifeq ($(CONFIG_CPU_26),y) + PROCESSOR = armo + TEXTADDR = 0x02080000 + ZTEXTADDR = 0x01800000 + ZRELADDR = 0x02080000 + ifeq ($(CONFIG_BINUTILS_NEW),y) + CFLAGS_PROC += -mapcs-26 -mshort-load-bytes + ifeq ($(CONFIG_CPU_ARM2),y) + CFLAGS_PROC += -mcpu=arm2 + ASFLAGS_PROC += -m2 + endif + ifeq ($(CONFIG_CPU_ARM3),y) + CFLAGS_PROC += -mcpu=arm3 + ASFLAGS_PROC += -m3 + endif + else + ifeq ($(CONFIG_CPU_ARM2),y) + CFLAGS_PROC += -m2 + ASFLAGS_PROC += -m2 + endif + ifeq ($(CONFIG_CPU_ARM3),y) + CFLAGS_PROC += -m3 + ASFLAGS_PROC += -m3 + endif + endif +endif + +ifeq ($(CONFIG_CPU_32),y) + PROCESSOR = armv + TEXTADDR = 0xC0008000 + ifeq ($(CONFIG_BINUTILS_NEW),y) + CFLAGS_PROC += -mapcs-32 -mshort-load-bytes + ifeq ($(CONFIG_CPU_ARM6),y) + CFLAGS_PROC += -mcpu=arm6 + endif + ifeq ($(CONFIG_CPU_ARM7),y) + CFLAGS_PROC += -mcpu=arm7 + endif + ifeq ($(CONFIG_CPU_SA110),y) + CFLAGS_PROC += -mcpu=strongarm110 + endif + else + CFLAGS_PROC += -m6 + endif + ASFLAGS_PROC += -m6 endif # Processor Architecture @@ -70,15 +76,6 @@ endif COMPRESSED_HEAD = head.o -ifeq ($(PROCESSOR),armo) -ifeq ($(CONFIG_BINUTILS_NEW),y) -CFLAGS_PROC += -mapcs-26 -mshort-load-bytes -endif -TEXTADDR = 0x02080000 -ZTEXTADDR = 0x01800000 -ZRELADDR = 0x02080000 -endif - ifeq ($(CONFIG_ARCH_A5K),y) MACHINE = a5k ARCHDIR = arc @@ -91,13 +88,6 @@ ARCHDIR = arc COMPRESSED_EXTRA = $(TOPDIR)/arch/arm/lib/ll_char_wr.o endif -ifeq ($(PROCESSOR),armv) -ifeq ($(CONFIG_BINUTILS_NEW),y) -CFLAGS_PROC += -mapcs-32 -mshort-load-bytes -endif -TEXTADDR = 0xC0008000 -endif - ifeq ($(CONFIG_ARCH_RPC),y) MACHINE = rpc ARCHDIR = rpc @@ -122,44 +112,65 @@ endif ifeq ($(CONFIG_ARCH_NEXUSPCI),y) MACHINE = nexuspci -TEXTADDR = 0xc0000000 +ARCHDIR = nexuspci ZTEXTADDR = 0x40200000 -ZRELADDR = 0x40000000 +ZRELADDR = 0x40008000 COMPRESSED_EXTRA = $(TOPDIR)/arch/arm/lib/ll_char_wr_scc.o COMPRESSED_HEAD = head-nexuspci.o endif -OBJDUMP = $(CROSS_COMPILE)objdump +ifeq ($(CONFIG_ARCH_VNC),y) +MACHINE = vnc +ARCHDIR = vnc +endif + +ifeq ($(CONFIG_ARCH_TBOX),y) +MACHINE = tbox +ARCHDIR = tbox +ZTEXTADDR = 0x80008000 +ZRELDIR = 0x80008000 +endif + PERL = perl +ifeq ($(CONFIG_BINUTILS_NEW),y) +LD = $(CROSS_COMPILE)ld -m elf32arm +else LD = $(CROSS_COMPILE)ld -m elf_arm -CPP = $(CC) -E +endif OBJCOPY = $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S +OBJDUMP = $(CROSS_COMPILE)objdump +CPP = $(CC) -E ARCHCC := $(word 1,$(CC)) GCCLIB := `$(ARCHCC) $(CFLAGS_PROC) --print-libgcc-file-name` -GCCARCH := -B/usr/src/bin/arm/arm-linuxelf- +#GCCARCH := -B/usr/bin/arm-linuxelf- 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 = -T $(TOPDIR)/arch/arm/vmlinux.lds -e stext -Ttext $(TEXTADDR) +LINKFLAGS = -T $(TOPDIR)/arch/arm/vmlinux-$(PROCESSOR).lds -e stext -Ttext $(TEXTADDR) ZLINKFLAGS = -Ttext $(ZTEXTADDR) -SUBDIRS := $(SUBDIRS:drivers=) arch/arm/lib arch/arm/kernel arch/arm/mm arch/arm/drivers +SUBDIRS := $(SUBDIRS:drivers=arch/arm/drivers) arch/arm/lib arch/arm/kernel arch/arm/mm HEAD := arch/arm/kernel/head-$(PROCESSOR).o arch/arm/kernel/init_task.o CORE_FILES := arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES) LIBS := arch/arm/lib/lib.a $(LIBS) $(GCCLIB) BLOCK_DRIVERS := arch/arm/drivers/block/block.a CDROM_DRIVERS := drivers/cdrom/cdrom.a +ifeq ($(CONFIG_FB),y) +CHAR_DRIVERS := arch/arm/drivers/char1/char.a +else CHAR_DRIVERS := arch/arm/drivers/char/char.a +endif MISC_DRIVERS := drivers/misc/misc.a NET_DRIVERS := drivers/net/net.a PARIDE_DRIVERS := drivers/block/paride/paride.a PCI_DRIVERS := drivers/pci/pci.a SCSI_DRIVERS := drivers/scsi/scsi.a SOUND_DRIVERS := drivers/sound/sound.a +VIDEO_DRIVERS := drivers/video/video.a ifeq ($(CONFIG_ARCH_ACORN),y) BLOCK_DRIVERS += drivers/acorn/block/acorn-block.a @@ -170,6 +181,9 @@ endif DRIVERS := $(BLOCK_DRIVERS) $(CHAR_DRIVERS) $(MISC_DRIVERS) $(NET_DRIVERS) +ifeq ($(CONFIG_FB),y) +DRIVERS := $(DRIVERS) $(VIDEO_DRIVERS) +endif ifeq ($(CONFIG_SCSI),y) DRIVERS := $(DRIVERS) $(SCSI_DRIVERS) endif @@ -191,7 +205,7 @@ symlinks:: (cd include/asm-arm; ln -sf arch-$(ARCHDIR) arch; ln -sf proc-$(PROCESSOR) proc) # Once we've finished integrating the sources, the @$(MAKE) will disappear -mrproper:: +archmrproper: rm -f include/asm-arm/arch include/asm-arm/proc @$(MAKE) -C arch/$(ARCH)/drivers mrproper @@ -201,6 +215,9 @@ arch/arm/kernel: dummy arch/arm/mm: dummy $(MAKE) linuxsubdirs SUBDIRS=arch/arm/mm +arch/arm/lib: dummy + $(MAKE) linuxsubdirs SUBDIRS=arch/arm/lib + MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot zImage: vmlinux @@ -227,3 +244,4 @@ archclean: archdep: @$(MAKEBOOT) dep +sed -e /^MACHINE..*=/s,= .*,= rpc,;/^PROCESSOR..*=/s,= .*,= armv, linux/arch/arm/Makefile.normal |