i386: Fix wrong CPU error message in early boot path
[safe/jmp/linux-2.6] / arch / mips / Makefile
index 69b9c1b..f450066 100644 (file)
@@ -83,14 +83,27 @@ cflags-y                    += -msoft-float
 LDFLAGS_vmlinux                        += -G 0 -static -n -nostdlib
 MODFLAGS                       += -mlong-calls
 
+cflags-y += -ffreestanding
+
 #
 # We explicitly add the endianness specifier if needed, this allows
 # to compile kernels with a toolchain for the other endianness. We
 # carefully avoid to add it redundantly because gcc 3.3/3.4 complains
 # when fed the toolchain default!
 #
-cflags-$(CONFIG_CPU_BIG_ENDIAN)                += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB -D__MIPSEB__)
-cflags-$(CONFIG_CPU_LITTLE_ENDIAN)     += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL -D__MIPSEL__)
+# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
+# 2006-10-10 don't properly change the predefined symbols if -EB / -EL
+# are used, so we kludge that here.  A bug has been filed at
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
+#
+undef-all += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__
+undef-all += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__
+predef-be += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__
+predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
+cflags-$(CONFIG_CPU_BIG_ENDIAN)                += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
+cflags-$(CONFIG_CPU_LITTLE_ENDIAN)     += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
+
+cflags-$(CONFIG_CPU_HAS_SMARTMIPS)     += $(call cc-option,-msmartmips)
 
 cflags-$(CONFIG_SB1XXX_CORELIS)        += $(call cc-option,-mno-sched-prolog) \
                                   -fno-omit-frame-pointer
@@ -278,24 +291,11 @@ cflags-$(CONFIG_MIPS_EV64120)     += -Iinclude/asm-mips/mach-ev64120
 load-$(CONFIG_MIPS_EV64120)    += 0xffffffff80100000
 
 #
-# Galileo EV96100 Board
-#
-core-$(CONFIG_MIPS_EV96100)    += arch/mips/galileo-boards/ev96100/
-cflags-$(CONFIG_MIPS_EV96100)  += -Iinclude/asm-mips/mach-ev96100
-load-$(CONFIG_MIPS_EV96100)    += 0xffffffff80100000
-
-#
-# Globespan IVR eval board with QED 5231 CPU
-#
-core-$(CONFIG_ITE_BOARD_GEN)   += arch/mips/ite-boards/generic/
-core-$(CONFIG_MIPS_IVR)                += arch/mips/ite-boards/ivr/
-load-$(CONFIG_MIPS_IVR)                += 0xffffffff80100000
-
-#
-# ITE 8172 eval board with QED 5231 CPU
+# Wind River PPMC Board (4KC + GT64120)
 #
-core-$(CONFIG_MIPS_ITE8172)    += arch/mips/ite-boards/qed-4n-s01b/
-load-$(CONFIG_MIPS_ITE8172)    += 0xffffffff80100000
+core-$(CONFIG_WR_PPMC)         += arch/mips/gt64120/wrppmc/
+cflags-$(CONFIG_WR_PPMC)               += -Iinclude/asm-mips/mach-wrppmc
+load-$(CONFIG_WR_PPMC)         += 0xffffffff80100000
 
 #
 # For all MIPS, Inc. eval boards
@@ -321,6 +321,7 @@ load-$(CONFIG_MIPS_MALTA)   += 0xffffffff80100000
 # MIPS SEAD board
 #
 core-$(CONFIG_MIPS_SEAD)       += arch/mips/mips-boards/sead/
+cflags-$(CONFIG_MIPS_SEAD)     += -Iinclude/asm-mips/mach-mips
 load-$(CONFIG_MIPS_SEAD)       += 0xffffffff80100000
 
 #
@@ -342,15 +343,6 @@ cflags-$(CONFIG_MOMENCO_OCELOT)    += -Iinclude/asm-mips/mach-ocelot
 load-$(CONFIG_MOMENCO_OCELOT)  += 0xffffffff80100000
 
 #
-# Momentum Ocelot-G board
-#
-# The Ocelot-G setup.o must be linked early - it does the ioremap() for the
-# mips_io_port_base.
-#
-core-$(CONFIG_MOMENCO_OCELOT_G)        += arch/mips/momentum/ocelot_g/
-load-$(CONFIG_MOMENCO_OCELOT_G)        += 0xffffffff80100000
-
-#
 # Momentum Ocelot-C and -CS boards
 #
 # The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the
@@ -365,6 +357,7 @@ core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/
 cflags-$(CONFIG_PMC_YOSEMITE)  += -Iinclude/asm-mips/mach-yosemite
 load-$(CONFIG_PMC_YOSEMITE)    += 0xffffffff80100000
 
+#
 # Qemu simulating MIPS32 4Kc
 #
 core-$(CONFIG_QEMU)            += arch/mips/qemu/
@@ -379,15 +372,11 @@ cflags-$(CONFIG_MOMENCO_OCELOT_3) += -Iinclude/asm-mips/mach-ocelot3
 load-$(CONFIG_MOMENCO_OCELOT_3)        += 0xffffffff80100000
 
 #
-# Momentum Jaguar ATX
+# Basler eXcite
 #
-core-$(CONFIG_MOMENCO_JAGUAR_ATX)      += arch/mips/momentum/jaguar_atx/
-cflags-$(CONFIG_MOMENCO_JAGUAR_ATX)    += -Iinclude/asm-mips/mach-ja
-#ifdef CONFIG_JAGUAR_DMALOW
-#load-$(CONFIG_MOMENCO_JAGUAR_ATX)     += 0xffffffff88000000
-#else
-load-$(CONFIG_MOMENCO_JAGUAR_ATX)      += 0xffffffff80100000
-#endif
+core-$(CONFIG_BASLER_EXCITE)   += arch/mips/basler/excite/
+cflags-$(CONFIG_BASLER_EXCITE) += -Iinclude/asm-mips/mach-excite
+load-$(CONFIG_BASLER_EXCITE)   += 0x80100000
 
 #
 # NEC DDB
@@ -395,18 +384,6 @@ load-$(CONFIG_MOMENCO_JAGUAR_ATX)  += 0xffffffff80100000
 core-$(CONFIG_DDB5XXX_COMMON)  += arch/mips/ddb5xxx/common/
 
 #
-# NEC DDB Vrc-5074
-#
-core-$(CONFIG_DDB5074)         += arch/mips/ddb5xxx/ddb5074/
-load-$(CONFIG_DDB5074)         += 0xffffffff80080000
-
-#
-# NEC DDB Vrc-5476
-#
-core-$(CONFIG_DDB5476)         += arch/mips/ddb5xxx/ddb5476/
-load-$(CONFIG_DDB5476)         += 0xffffffff80080000
-
-#
 # NEC DDB Vrc-5477
 #
 core-$(CONFIG_DDB5477)         += arch/mips/ddb5xxx/ddb5477/
@@ -468,6 +445,20 @@ libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/
 #cflags-$(CONFIG_PNX8550_JBS)  += -Iinclude/asm-mips/mach-pnx8550
 load-$(CONFIG_PNX8550_JBS)     += 0xffffffff80060000
 
+# Philips PNX8550 STB810 board
+#
+libs-$(CONFIG_PNX8550_STB810)  += arch/mips/philips/pnx8550/stb810/
+load-$(CONFIG_PNX8550_STB810)  += 0xffffffff80060000
+
+# NEC EMMA2RH boards
+#
+core-$(CONFIG_EMMA2RH)          += arch/mips/emma2rh/common/
+cflags-$(CONFIG_EMMA2RH)        += -Iinclude/asm-mips/mach-emma2rh
+
+# NEC EMMA2RH Mark-eins
+core-$(CONFIG_MARKEINS)         += arch/mips/emma2rh/markeins/
+load-$(CONFIG_MARKEINS)         += 0xffffffff88100000
+
 #
 # SGI IP22 (Indy/Indigo2)
 #
@@ -519,25 +510,29 @@ cflags-$(CONFIG_SGI_IP32) += -Iinclude/asm-mips/mach-ip32
 load-$(CONFIG_SGI_IP32)                += 0xffffffff80004000
 
 #
-# Sibyte SB1250 SOC
+# Sibyte SB1250/BCM1480 SOC
 #
 # This is a LIB so that it links at the end, and initcalls are later
 # the sequence; but it is built as an object so that modules don't get
 # removed (as happens, even if they have __initcall/module_init)
 #
 core-$(CONFIG_SIBYTE_BCM112X)  += arch/mips/sibyte/sb1250/
+core-$(CONFIG_SIBYTE_BCM112X)  += arch/mips/sibyte/common/
 cflags-$(CONFIG_SIBYTE_BCM112X)        += -Iinclude/asm-mips/mach-sibyte \
                        -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
 
 core-$(CONFIG_SIBYTE_SB1250)   += arch/mips/sibyte/sb1250/
+core-$(CONFIG_SIBYTE_SB1250)   += arch/mips/sibyte/common/
 cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte \
                        -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
 
 core-$(CONFIG_SIBYTE_BCM1x55)  += arch/mips/sibyte/bcm1480/
+core-$(CONFIG_SIBYTE_BCM1x55)  += arch/mips/sibyte/common/
 cflags-$(CONFIG_SIBYTE_BCM1x55)        += -Iinclude/asm-mips/mach-sibyte \
                        -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
 
 core-$(CONFIG_SIBYTE_BCM1x80)  += arch/mips/sibyte/bcm1480/
+core-$(CONFIG_SIBYTE_BCM1x80)  += arch/mips/sibyte/common/
 cflags-$(CONFIG_SIBYTE_BCM1x80)        += -Iinclude/asm-mips/mach-sibyte \
                        -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
 
@@ -565,11 +560,11 @@ libs-$(CONFIG_SIBYTE_BIGSUR)      += arch/mips/sibyte/swarm/
 load-$(CONFIG_SIBYTE_BIGSUR)   := 0xffffffff80100000
 
 #
-# SNI RM200 PCI
+# SNI RM
 #
-core-$(CONFIG_SNI_RM200_PCI)   += arch/mips/sni/
-cflags-$(CONFIG_SNI_RM200_PCI) += -Iinclude/asm-mips/mach-rm200
-load-$(CONFIG_SNI_RM200_PCI)   += 0xffffffff80600000
+core-$(CONFIG_SNI_RM)          += arch/mips/sni/
+cflags-$(CONFIG_SNI_RM)                += -Iinclude/asm-mips/mach-rm
+load-$(CONFIG_SNI_RM)          += 0xffffffff80600000
 
 #
 # Toshiba JMR-TX3927 board
@@ -614,8 +609,11 @@ LDFLAGS                    += -m $(ld-emul)
 
 ifdef CONFIG_MIPS
 CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
-       egrep -vw '__GNUC_(MAJOR|MINOR|PATCHLEVEL)__' | \
-       sed -e 's/^\#define /-D/' -e 's/ /="/' -e 's/$$/"/')
+       egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
+       sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
+ifdef CONFIG_64BIT
+CHECKFLAGS             += -m64
+endif
 endif
 
 OBJCOPYFLAGS           += --remove-section=.reginfo
@@ -688,23 +686,21 @@ ifdef CONFIG_QEMU
 all:   vmlinux.bin
 endif
 
-ifdef CONFIG_SNI_RM200_PCI
+ifdef CONFIG_SNI_RM
 all:   vmlinux.ecoff
 endif
 
 vmlinux.bin: $(vmlinux-32)
        +@$(call makeboot,$@)
 
-vmlinux.ecoff vmlinux.rm200: $(vmlinux-32)
+vmlinux.ecoff: $(vmlinux-32)
        +@$(call makeboot,$@)
 
 vmlinux.srec: $(vmlinux-32)
        +@$(call makeboot,$@)
 
 CLEAN_FILES += vmlinux.ecoff \
-              vmlinux.srec \
-              vmlinux.rm200.tmp \
-              vmlinux.rm200
+              vmlinux.srec
 
 archclean:
        @$(MAKE) $(clean)=arch/mips/boot
@@ -713,3 +709,25 @@ archclean:
 CLEAN_FILES += vmlinux.32 \
               vmlinux.64 \
               vmlinux.ecoff
+
+quiet_cmd_syscalls_n32 = CALL-N32 $<
+      cmd_syscalls_n32 = $(CONFIG_SHELL) $< $(CC) $(c_flags) -mabi=n32
+
+quiet_cmd_syscalls_o32 = CALL-O32 $<
+      cmd_syscalls_o32 = $(CONFIG_SHELL) $< $(CC) $(c_flags) -mabi=32
+
+PHONY += missing-syscalls-n32 missing-syscalls-o32
+
+missing-syscalls-n32: scripts/checksyscalls.sh FORCE
+       $(call cmd,syscalls_n32)
+
+missing-syscalls-o32: scripts/checksyscalls.sh FORCE
+       $(call cmd,syscalls_o32)
+
+archprepare:
+ifdef CONFIG_MIPS32_N32
+       $(Q)$(MAKE) $(build)=arch/mips missing-syscalls-n32
+endif
+ifdef CONFIG_MIPS32_O32
+       $(Q)$(MAKE) $(build)=arch/mips missing-syscalls-o32
+endif