1# 2# This file is subject to the terms and conditions of the GNU General Public 3# License. See the file "COPYING" in the main directory of this archive 4# for more details. 5# 6# Copyright (C) 1994, 1995, 1996 by Ralf Baechle 7# DECStation modifications by Paul M. Antoine, 1996 8# Copyright (C) 2002, 2003, 2004 Maciej W. Rozycki 9# 10# This file is included by the global makefile so that you can add your own 11# architecture-specific flags and dependencies. Remember to do have actions 12# for "archclean" and "archdep" for cleaning up and making dependencies for 13# this architecture 14# 15 16# 17# Select the object file format to substitute into the linker script. 18# 19ifdef CONFIG_CPU_LITTLE_ENDIAN 20tool-prefix = mipsel-linux- 21ld-emul = elf32ltsmip 22else 23tool-prefix = mips-linux- 24ld-emul = elf32btsmip 25endif 26 27ifdef CONFIG_CROSSCOMPILE 28CROSS_COMPILE = $(tool-prefix) 29endif 30 31MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot 32 33check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) 34 35# 36# 37# GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel 38# code since it only slows down the whole thing. At some point we might make 39# use of global pointer optimizations but their use of $28 conflicts with 40# the current pointer optimization. 41# 42# The DECStation requires an ECOFF kernel for remote booting, other MIPS 43# machines may also. Since BFD is incredibly buggy with respect to 44# crossformat linking we rely on the elf2ecoff tool for format conversion. 45# 46GCCFLAGS := -I $(TOPDIR)/include/asm/gcc 47GCCFLAGS += -G 0 -mno-abicalls -fno-pic -pipe 48GCCFLAGS += $(call check_gcc, -finline-limit=100000,) 49LINKFLAGS += -G 0 -static -n 50MODFLAGS += -mlong-calls 51 52ifdef CONFIG_DEBUG_INFO 53GCCFLAGS += -g 54ifdef CONFIG_SB1XXX_CORELIS 55GCCFLAGS += -mno-sched-prolog -fno-omit-frame-pointer 56endif 57endif 58 59# 60# Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>) 61# 62# <cpu0>,<isa0> -- preferred CPU and ISA designations (may require 63# recent tools) 64# <cpu1>,<isa1> -- fallback CPU and ISA designations (have to work 65# with up to the oldest supported tools) 66# <isa2> -- an ISA designation used as an ABI selector for 67# gcc versions that do not support "-mabi=32" 68# (depending on the CPU type, either "mips1" or 69# "mips2") 70# 71set_gccflags = $(shell \ 72while :; do \ 73 cpu=$(1); isa=-$(2); \ 74 for gcc_opt in -march= -mcpu=; do \ 75 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \ 76 -xc /dev/null > /dev/null 2>&1 && \ 77 break 2; \ 78 done; \ 79 cpu=$(3); isa=-$(4); \ 80 for gcc_opt in -march= -mcpu=; do \ 81 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \ 82 -xc /dev/null > /dev/null 2>&1 && \ 83 break 2; \ 84 done; \ 85 break; \ 86done; \ 87gcc_abi=-mabi=32; gcc_cpu=$$cpu; \ 88if $(CC) $$gcc_abi -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then \ 89 gcc_isa=$$isa; \ 90else \ 91 gcc_abi=; gcc_isa=-$(5); \ 92fi; \ 93gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \ 94while :; do \ 95 for gas_opt in -Wa,-march= -Wa,-mcpu=; do \ 96 $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \ 97 -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \ 98 break 2; \ 99 done; \ 100 gas_abi=; gas_opt=; gas_cpu=; gas_isa=; \ 101 break; \ 102done; \ 103if test "$$gcc_opt" = -march= && test -n "$$gcc_abi"; then \ 104 $(CC) $$gcc_abi $$gcc_opt$$gcc_cpu -S -o /dev/null \ 105 -xc /dev/null > /dev/null 2>&1 && \ 106 gcc_isa=; \ 107fi; \ 108echo $$gcc_abi $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_abi $$gas_opt$$gas_cpu $$gas_isa) 109 110# 111# CPU-dependent compiler/assembler options for optimization. 112# 113ifdef CONFIG_CPU_R3000 114GCCFLAGS += $(call set_gccflags,r3000,mips1,r3000,mips1,mips1) 115endif 116ifdef CONFIG_CPU_TX39XX 117GCCFLAGS += $(call set_gccflags,r3900,mips1,r3000,mips1,mips1) 118endif 119ifdef CONFIG_CPU_R6000 120GCCFLAGS += $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \ 121 -Wa,--trap 122endif 123ifdef CONFIG_CPU_R4300 124GCCFLAGS += $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \ 125 -Wa,--trap 126endif 127ifdef CONFIG_CPU_VR41XX 128GCCFLAGS += $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \ 129 -Wa,--trap 130endif 131ifdef CONFIG_CPU_R4X00 132GCCFLAGS += $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ 133 -Wa,--trap 134endif 135ifdef CONFIG_CPU_TX49XX 136GCCFLAGS += $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ 137 -Wa,--trap 138endif 139ifdef CONFIG_CPU_MIPS32 140GCCFLAGS += $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \ 141 -Wa,--trap 142endif 143ifdef CONFIG_CPU_MIPS64 144GCCFLAGS += $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \ 145 -Wa,--trap 146endif 147ifdef CONFIG_CPU_R5000 148GCCFLAGS += $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \ 149 -Wa,--trap 150endif 151ifdef CONFIG_CPU_R5432 152GCCFLAGS += $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \ 153 -Wa,--trap 154endif 155ifdef CONFIG_CPU_NEVADA 156GCCFLAGS += $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \ 157 -Wa,--trap 158#GCCFLAGS += $(call check_gcc,-mmad,) 159endif 160ifdef CONFIG_CPU_RM7000 161GCCFLAGS += $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \ 162 -Wa,--trap 163endif 164ifdef CONFIG_CPU_RM9000 165GCCFLAGS += $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \ 166 -Wa,--trap 167endif 168ifdef CONFIG_CPU_SB1 169GCCFLAGS += $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \ 170 -Wa,--trap 171ifdef CONFIG_SB1_PASS_1_WORKAROUNDS 172MODFLAGS += -msb1-pass1-workarounds 173endif 174endif 175 176AFLAGS += $(GCCFLAGS) 177CFLAGS += $(GCCFLAGS) 178 179LD += -m $(ld-emul) 180 181 182# 183# We unconditionally build the math emulator 184# 185CORE_FILES += arch/mips/math-emu/fpu_emulator.o 186SUBDIRS += arch/mips/math-emu 187 188# 189# ramdisk/initrd support 190# You need a compressed ramdisk image, named ramdisk.gz in 191# arch/mips/ramdisk 192# 193ifdef CONFIG_EMBEDDED_RAMDISK 194CORE_FILES += arch/mips/ramdisk/ramdisk.o 195SUBDIRS += arch/mips/ramdisk 196endif 197 198 199# 200# Board-dependent options and extra files 201# 202 203# 204# Acer PICA 61, Mips Magnum 4000 and Olivetti M700. 205# 206ifdef CONFIG_MIPS_JAZZ 207CORE_FILES += arch/mips/jazz/jazz.o 208SUBDIRS += arch/mips/jazz arch/mips/arc 209LIBS += arch/mips/arc/arclib.a 210LOADADDR := 0x80080000 211endif 212 213# 214# Au1000 (Alchemy Semi PB1000) eval board 215# 216ifdef CONFIG_MIPS_PB1000 217LIBS += arch/mips/au1000/pb1000/pb1000.o \ 218 arch/mips/au1000/common/au1000.o 219SUBDIRS += arch/mips/au1000/pb1000 arch/mips/au1000/common 220LOADADDR := 0x80100000 221endif 222 223# 224# Au1100 (Alchemy Semi PB1100) eval board 225# 226ifdef CONFIG_MIPS_PB1100 227LIBS += arch/mips/au1000/pb1100/pb1100.o \ 228 arch/mips/au1000/common/au1000.o 229SUBDIRS += arch/mips/au1000/pb1100 arch/mips/au1000/common 230LOADADDR += 0x80100000 231endif 232 233# 234# Au1500 (Alchemy Semi PB1500) eval board 235# 236ifdef CONFIG_MIPS_PB1500 237LIBS += arch/mips/au1000/pb1500/pb1500.o \ 238 arch/mips/au1000/common/au1000.o 239SUBDIRS += arch/mips/au1000/pb1500 arch/mips/au1000/common 240LOADADDR := 0x80100000 241endif 242 243# 244# Au1x00 (AMD/Alchemy) eval boards 245# 246ifdef CONFIG_MIPS_DB1000 247LIBS += arch/mips/au1000/db1x00/db1x00.o \ 248 arch/mips/au1000/common/au1000.o 249SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common 250LOADADDR += 0x80100000 251endif 252 253ifdef CONFIG_MIPS_DB1500 254LIBS += arch/mips/au1000/db1x00/db1x00.o \ 255 arch/mips/au1000/common/au1000.o 256SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common 257LOADADDR += 0x80100000 258endif 259 260ifdef CONFIG_MIPS_DB1550 261LIBS += arch/mips/au1000/db1x00/db1x00.o \ 262 arch/mips/au1000/common/au1000.o 263SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common 264LOADADDR += 0x80100000 265endif 266 267ifdef CONFIG_MIPS_DB1100 268LIBS += arch/mips/au1000/db1x00/db1x00.o \ 269 arch/mips/au1000/common/au1000.o 270SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common 271LOADADDR += 0x80100000 272endif 273 274ifdef CONFIG_MIPS_HYDROGEN3 275LIBS += arch/mips/au1000/hydrogen3/hydrogen3.o \ 276 arch/mips/au1000/common/au1000.o 277SUBDIRS += arch/mips/au1000/hydrogen3 arch/mips/au1000/common 278LOADADDR += 0x80100000 279endif 280 281ifdef CONFIG_MIPS_BOSPORUS 282LIBS += arch/mips/au1000/db1x00/db1x00.o \ 283 arch/mips/au1000/common/au1000.o 284SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common 285LOADADDR += 0x80100000 286endif 287 288ifdef CONFIG_MIPS_MIRAGE 289LIBS += arch/mips/au1000/db1x00/db1x00.o \ 290 arch/mips/au1000/common/au1000.o 291SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common 292LOADADDR += 0x80100000 293endif 294 295ifdef CONFIG_MIPS_XXS1500 296LIBS += arch/mips/au1000/xxs1500/xxs1500.o \ 297 arch/mips/au1000/common/au1000.o 298SUBDIRS += arch/mips/au1000/xxs1500 arch/mips/au1000/common 299LOADADDR += 0x80100000 300endif 301 302ifdef CONFIG_MIPS_MTX1 303LIBS += arch/mips/au1000/mtx-1/mtx-1.o \ 304 arch/mips/au1000/common/au1000.o 305SUBDIRS += arch/mips/au1000/mtx-1 arch/mips/au1000/common 306LOADADDR += 0x80100000 307endif 308 309ifdef CONFIG_MIPS_PB1550 310LIBS += arch/mips/au1000/pb1550/pb1550.o \ 311 arch/mips/au1000/common/au1000.o 312SUBDIRS += arch/mips/au1000/pb1550 arch/mips/au1000/common 313LOADADDR += 0x80100000 314endif 315 316 317# 318# Cogent CSB250 319# 320ifdef CONFIG_COGENT_CSB250 321LIBS += arch/mips/au1000/csb250/csb250.o \ 322 arch/mips/au1000/common/au1000.o 323SUBDIRS += arch/mips/au1000/csb250 arch/mips/au1000/common 324LOADADDR := 0x80100000 325endif 326 327ifdef CONFIG_PCI 328CORE_FILES += arch/mips/pci/pci-core.o 329SUBDIRS += arch/mips/pci 330endif 331 332# 333# Algorithmics P4032 334# 335ifdef CONFIG_ALGOR_P4032 336CORE_FILES += arch/mips/algor/algor.o 337SUBDIRS += arch/mips/algor 338LOADADDR := 0x80000000 339endif 340 341# 342# Baget/MIPS 343# 344ifdef CONFIG_BAGET_MIPS 345SUBDIRS += arch/mips/baget arch/mips/baget/prom 346LIBS += arch/mips/baget/baget.a arch/mips/baget/prom/bagetlib.a 347LOADADDR := 0x80001000 348endif 349 350# 351# Cobalt Server 352# 353ifdef CONFIG_MIPS_COBALT 354SUBDIRS += arch/mips/cobalt 355CORE_FILES += arch/mips/cobalt/cobalt.o 356LOADADDR := 0x80080000 357endif 358 359# 360# DECstation family 361# 362ifdef CONFIG_DECSTATION 363CORE_FILES += arch/mips/dec/dec.o 364SUBDIRS += arch/mips/dec arch/mips/dec/prom 365LIBS += arch/mips/dec/prom/rexlib.a 366LOADADDR := 0x80040000 367endif 368 369# 370# Galileo EV64120 Board 371# 372ifdef CONFIG_MIPS_EV64120 373LIBS += arch/mips/gt64120/common/gt64120.o \ 374 arch/mips/gt64120/ev64120/ev64120.o 375SUBDIRS += arch/mips/gt64120/common arch/mips/gt64120/ev64120 376LOADADDR := 0x80100000 377endif 378 379# 380# Galileo EV96100 Board 381# 382ifdef CONFIG_MIPS_EV96100 383LIBS += arch/mips/galileo-boards/ev96100/ev96100.o 384SUBDIRS += arch/mips/galileo-boards/ev96100 385LOADADDR := 0x80100000 386endif 387 388# 389# Globespan IVR eval board with QED 5231 CPU 390# 391ifdef CONFIG_MIPS_IVR 392LIBS += arch/mips/ite-boards/ivr/ivr.o \ 393 arch/mips/ite-boards/generic/it8172.o 394SUBDIRS += arch/mips/ite-boards/generic arch/mips/ite-boards/ivr 395LOADADDR := 0x80100000 396endif 397 398# 399# HP LaserJet 400# 401ifdef CONFIG_HP_LASERJET 402SUBDIRS += arch/mips/hp-lj 403LIBS += arch/mips/hp-lj/hp-lj.o 404LOADADDR := 0x80030000 405endif 406 407# 408# ITE 8172 eval board with QED 5231 CPU 409# 410ifdef CONFIG_MIPS_ITE8172 411LIBS += arch/mips/ite-boards/qed-4n-s01b/ite.o \ 412 arch/mips/ite-boards/generic/it8172.o 413SUBDIRS += arch/mips/ite-boards/generic arch/mips/ite-boards/qed-4n-s01b 414LOADADDR := 0x80100000 415endif 416 417# 418# MIPS Atlas board 419# 420ifdef CONFIG_MIPS_ATLAS 421LIBS += arch/mips/mips-boards/atlas/atlas.o \ 422 arch/mips/mips-boards/generic/mipsboards.o 423SUBDIRS += arch/mips/mips-boards/generic arch/mips/mips-boards/atlas 424LOADADDR := 0x80100000 425endif 426 427# 428# MIPS Malta board 429# 430ifdef CONFIG_MIPS_MALTA 431LIBS += arch/mips/mips-boards/malta/malta.o \ 432 arch/mips/mips-boards/generic/mipsboards.o 433SUBDIRS += arch/mips/mips-boards/malta arch/mips/mips-boards/generic 434LOADADDR := 0x80100000 435endif 436 437# 438# MIPS SEAD board 439# 440ifdef CONFIG_MIPS_SEAD 441LIBS += arch/mips/mips-boards/sead/sead.o \ 442 arch/mips/mips-boards/generic/mipsboards.o 443SUBDIRS += arch/mips/mips-boards/generic arch/mips/mips-boards/sead 444LOADADDR := 0x80100000 445endif 446 447# 448# Momentum Ocelot board 449# 450ifdef CONFIG_MOMENCO_OCELOT 451# The Ocelot setup.o must be linked early - it does the ioremap() for the 452# mips_io_port_base. 453CORE_FILES += arch/mips/gt64120/common/gt64120.o \ 454 arch/mips/gt64120/momenco_ocelot/momenco_ocelot.o 455SUBDIRS += arch/mips/gt64120/common arch/mips/gt64120/momenco_ocelot 456LOADADDR := 0x80100000 457endif 458 459# 460# Momentum Ocelot-G board 461# 462ifdef CONFIG_MOMENCO_OCELOT_G 463# The Ocelot-G setup.o must be linked early - it does the ioremap() for the 464# mips_io_port_base. 465CORE_FILES += arch/mips/momentum/ocelot_g/ocelot_g.o 466SUBDIRS += arch/mips/momentum/ocelot_g 467LOADADDR := 0x80100000 468endif 469 470# 471# Momentum Ocelot-C and -CS boards 472# 473ifdef CONFIG_MOMENCO_OCELOT_C 474# The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the 475# mips_io_port_base. 476CORE_FILES += arch/mips/momentum/ocelot_c/ocelot_c.o 477SUBDIRS += arch/mips/momentum/ocelot_c 478LOADADDR := 0x80100000 479endif 480 481ifdef CONFIG_PMC_BIG_SUR 482CORE_FILES += arch/mips/pmc-sierra/big_sur/big_sur.o 483SUBDIRS += arch/mips/pmc-sierra/big_sur 484LOADADDR := 0x80100000 485endif 486 487ifdef CONFIG_PMC_STRETCH 488CORE_FILES += arch/mips/pmc-sierra/stretch/stretch.o 489SUBDIRS += arch/mips/pmc-sierra/stretch 490LOADADDR := 0x80200000 491endif 492 493ifdef CONFIG_MOMENCO_JAGUAR_ATX 494LIBS += arch/mips/momentum/jaguar_atx/jaguar_atx.o 495SUBDIRS += arch/mips/momentum/jaguar_atx 496ifdef CONFIG_JAGUAR_DMALOW 497LOADADDR := 0x88000000 498else 499LOADADDR := 0x80100000 500endif 501endif 502 503# 504# NEC DDB Vrc-5074 505# 506ifdef CONFIG_DDB5074 507SUBDIRS += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5074 508LIBS += arch/mips/ddb5xxx/common/ddb5xxx.o arch/mips/ddb5xxx/ddb5074/ddb5074.o 509LOADADDR := 0x80080000 510endif 511 512# 513# NEC DDB Vrc-5476 514# 515ifdef CONFIG_DDB5476 516SUBDIRS += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5476 517LIBS += arch/mips/ddb5xxx/common/ddb5xxx.o \ 518 arch/mips/ddb5xxx/ddb5476/ddb5476.o 519LOADADDR := 0x80080000 520endif 521 522# 523# NEC DDB Vrc-5477 524# 525ifdef CONFIG_DDB5477 526SUBDIRS += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5477 527LIBS += arch/mips/ddb5xxx/common/ddb5xxx.o \ 528 arch/mips/ddb5xxx/ddb5477/ddb5477.o 529LOADADDR := 0x80100000 530endif 531 532ifdef CONFIG_LASAT 533LIBS += arch/mips/lasat/lasatkern.o 534SUBDIRS += arch/mips/lasat 535LOADADDR += 0x80000000 536endif 537# 538# NEC Osprey (vr4181) board 539# 540ifdef CONFIG_NEC_OSPREY 541SUBDIRS += arch/mips/vr4181/common arch/mips/vr4181/osprey 542LIBS += arch/mips/vr4181/common/vr4181.o \ 543 arch/mips/vr4181/osprey/osprey.o 544LOADADDR := 0x80002000 545endif 546 547# 548# NEC Eagle/Hawk (VR4122/VR4131) board 549# 550ifdef CONFIG_NEC_EAGLE 551SUBDIRS += arch/mips/vr41xx/common \ 552 arch/mips/vr41xx/nec-eagle 553CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 554 arch/mips/vr41xx/nec-eagle/eagle.o 555LOADADDR := 0x80000000 556endif 557 558# 559# ZAO Networks Capcella (VR4131) 560# 561ifdef CONFIG_ZAO_CAPCELLA 562SUBDIRS += arch/mips/vr41xx/common \ 563 arch/mips/vr41xx/zao-capcella 564CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 565 arch/mips/vr41xx/zao-capcella/capcella.o 566LOADADDR := 0x80000000 567endif 568 569# 570# Victor MP-C303/304 (VR4122) 571# 572ifdef CONFIG_VICTOR_MPC30X 573SUBDIRS += arch/mips/vr41xx/common \ 574 arch/mips/vr41xx/victor-mpc30x 575CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 576 arch/mips/vr41xx/victor-mpc30x/mpc30x.o 577LOADADDR := 0x80001000 578endif 579 580# 581# IBM WorkPad z50 (VR4121) 582# 583ifdef CONFIG_IBM_WORKPAD 584SUBDIRS += arch/mips/vr41xx/common \ 585 arch/mips/vr41xx/ibm-workpad 586CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 587 arch/mips/vr41xx/ibm-workpad/workpad.o 588LOADADDR += 0x80004000 589endif 590 591# 592# CASIO CASSIPEIA E-55/65 (VR4111) 593# 594ifdef CONFIG_CASIO_E55 595SUBDIRS += arch/mips/vr41xx/common \ 596 arch/mips/vr41xx/casio-e55 597CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 598 arch/mips/vr41xx/casio-e55/e55.o 599LOADADDR += 0x80004000 600endif 601 602# 603# TANBAC TB0226 Mbase (VR4131) 604# 605ifdef CONFIG_TANBAC_TB0226 606SUBDIRS += arch/mips/vr41xx/common \ 607 arch/mips/vr41xx/tanbac-tb0226 608CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 609 arch/mips/vr41xx/tanbac-tb0226/tb0226.o 610LOADADDR := 0x80000000 611endif 612 613# 614# TANBAC TB0229 (VR4131DIMM) 615# 616ifdef CONFIG_TANBAC_TB0229 617SUBDIRS += arch/mips/vr41xx/common \ 618 arch/mips/vr41xx/tanbac-tb0229 619CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 620 arch/mips/vr41xx/tanbac-tb0229/tb0229.o 621LOADADDR := 0x80000000 622endif 623 624# 625# Philips Nino 626# 627ifdef CONFIG_NINO 628CORE_FILES += arch/mips/philips/nino/nino.o 629SUBDIRS += arch/mips/philips/nino 630LOADADDR := 0x80000000 631endif 632 633# 634# SGI IP22 (Indy/Indigo2) 635# 636ifdef CONFIG_SGI_IP22 637CORE_FILES += arch/mips/sgi-ip22/ip22-kern.o 638LIBS += arch/mips/arc/arclib.a 639SUBDIRS += arch/mips/sgi-ip22 arch/mips/arc 640# 641# Set LOADADDR to >= 0x88069000 if you want to leave space for symmon, 642# 0x88002000 for production kernels. Note that the value must be 643# 8kb aligned or the handling of the current variable will break. 644# 645LOADADDR := 0x88002000 646endif 647 648# 649# Sibyte SB1250 SOC and Broadcom (SiByte) BCM112x SOCs 650# 651ifneq ($(CONFIG_SIBYTE_SB1250)$(CONFIG_SIBYTE_BCM112X),) 652# This is a LIB so that it links at the end, and initcalls are later 653# the sequence; but it is built as an object so that modules don't get 654# removed (as happens, even if they have __initcall/module_init) 655LIBS += arch/mips/sibyte/sb1250/sb1250.o 656SUBDIRS += arch/mips/sibyte/sb1250 657LOADADDR := 0x80100000 658endif 659 660# 661# Sibyte boards: 662# 663# BCM91250A (SWARM), 664# BCM91250E (Sentosa), 665# BCM91120C (CRhine), 666# BCM91120x (Carmel), 667# BCM91125C (CRhone), 668# BCM91125E (Rhone). 669# 670ifdef CONFIG_SIBYTE_BOARD 671LIBS += arch/mips/sibyte/swarm/sbswarm.a 672SUBDIRS += arch/mips/sibyte/swarm 673endif 674 675# 676# Sibyte CFE firmware 677# 678ifdef CONFIG_SIBYTE_CFE 679LIBS += arch/mips/sibyte/cfe/cfe.a 680SUBDIRS += arch/mips/sibyte/cfe 681endif 682 683# 684# SNI RM200 PCI 685# 686ifdef CONFIG_SNI_RM200_PCI 687CORE_FILES += arch/mips/sni/sni.o 688SUBDIRS += arch/mips/sni arch/mips/arc 689LIBS += arch/mips/arc/arclib.a 690LOADADDR := 0x80080000 691endif 692 693# 694# Toshiba JMR-TX3927 board 695# 696ifdef CONFIG_TOSHIBA_JMR3927 697CORE_FILES += arch/mips/jmr3927/rbhma3100/jmr3927.o \ 698 arch/mips/jmr3927/common/tx3927.o 699SUBDIRS += arch/mips/jmr3927/rbhma3100 arch/mips/jmr3927/common 700LOADADDR := 0x80050000 701endif 702 703# 704# Toshiba RBTX4927 board or 705# Toshiba RBTX4937 board 706# 707ifdef CONFIG_TOSHIBA_RBTX4927 708MIPS = arch/mips 709CEC = tx4927 710COMMON = $(MIPS)/$(CEC)/common 711BOARD = $(MIPS)/$(CEC)/toshiba_rbtx4927 712LIBS += $(BOARD)/toshiba_rbtx4927.o $(COMMON)/tx4927.o 713SUBDIRS += $(BOARD) $(COMMON) 714LOADADDR += 0x80020000 715endif 716 717# 718# Choosing incompatible machines durings configuration will result in 719# error messages during linking. Select a default linkscript if 720# none has been choosen above. 721# 722vmlinux: arch/$(ARCH)/ld.script 723 724arch/$(ARCH)/ld.script: arch/$(ARCH)/ld.script.in arch/$(ARCH)/Makefile 725 sed -e 's/@@LOADADDR@@/$(LOADADDR)/' <$< >$@ 726LINKFLAGS += -T arch/$(ARCH)/ld.script 727 728HEAD := arch/mips/kernel/head.o arch/mips/kernel/init_task.o 729 730SUBDIRS := $(addprefix arch/mips/, tools) $(SUBDIRS) $(addprefix arch/mips/, kernel mm lib) 731CORE_FILES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(CORE_FILES) 732LIBS := arch/mips/lib/lib.a $(LIBS) 733 734ifdef CONFIG_BAGET_MIPS 735 736BAGETBOOT = $(MAKE) -C arch/$(ARCH)/baget 737 738balo: vmlinux 739 $(BAGETBOOT) balo 740 741endif 742 743ifdef CONFIG_MIPS_EV64120 744gboot: vmlinux 745 $(MAKE) -C arch/$(ARCH)/galileo-boards/ev64120/compressed 746endif 747 748ifdef CONFIG_LASAT 749rom.bin rom.sw: vmlinux 750 $(MAKE) -C arch/$(ARCH)/lasat/image $@ 751endif 752 753boot: mips-boot 754 755mips-boot: vmlinux 756 @$(MAKEBOOT) boot 757 758vmlinux.ecoff: vmlinux 759 @$(MAKEBOOT) $@ 760 761vmlinux.srec: vmlinux 762 @$(MAKEBOOT) $@ 763 764archclean: 765 @$(MAKEBOOT) clean 766 rm -f arch/$(ARCH)/ld.script 767 $(MAKE) -C arch/$(ARCH)/tools clean 768 $(MAKE) -C arch/mips/baget clean 769 $(MAKE) -C arch/mips/lasat clean 770 771archmrproper: 772 @$(MAKEBOOT) mrproper 773 $(RM) $(TOPDIR)/include/asm-$(ARCH)/offset.h 774 $(MAKE) -C arch/$(ARCH)/tools mrproper 775 776archdep: 777 if [ ! -f $(TOPDIR)/include/asm-$(ARCH)/offset.h ]; then \ 778 touch $(TOPDIR)/include/asm-$(ARCH)/offset.h; \ 779 fi; 780 @$(MAKEBOOT) dep 781

