Makefile 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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, 95, 96, 2003 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" cleaning up for this architecture.
  13. #
  14. as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
  15. -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
  16. else echo "$(2)"; fi ;)
  17. cflags-y :=
  18. #
  19. # Select the object file format to substitute into the linker script.
  20. #
  21. ifdef CONFIG_CPU_LITTLE_ENDIAN
  22. 32bit-tool-prefix = mipsel-linux-
  23. 64bit-tool-prefix = mips64el-linux-
  24. 32bit-bfd = elf32-tradlittlemips
  25. 64bit-bfd = elf64-tradlittlemips
  26. 32bit-emul = elf32ltsmip
  27. 64bit-emul = elf64ltsmip
  28. else
  29. 32bit-tool-prefix = mips-linux-
  30. 64bit-tool-prefix = mips64-linux-
  31. 32bit-bfd = elf32-tradbigmips
  32. 64bit-bfd = elf64-tradbigmips
  33. 32bit-emul = elf32btsmip
  34. 64bit-emul = elf64btsmip
  35. endif
  36. ifdef CONFIG_MIPS32
  37. gcc-abi = 32
  38. tool-prefix = $(32bit-tool-prefix)
  39. UTS_MACHINE := mips
  40. endif
  41. ifdef CONFIG_MIPS64
  42. gcc-abi = 64
  43. tool-prefix = $(64bit-tool-prefix)
  44. UTS_MACHINE := mips64
  45. endif
  46. ifdef CONFIG_CROSSCOMPILE
  47. CROSS_COMPILE := $(tool-prefix)
  48. endif
  49. ifdef CONFIG_BUILD_ELF64
  50. gas-abi = 64
  51. ld-emul = $(64bit-emul)
  52. vmlinux-32 = vmlinux.32
  53. vmlinux-64 = vmlinux
  54. else
  55. gas-abi = 32
  56. ld-emul = $(32bit-emul)
  57. vmlinux-32 = vmlinux
  58. vmlinux-64 = vmlinux.64
  59. cflags-$(CONFIG_MIPS64) += $(call cc-option,-mno-explicit-relocs)
  60. endif
  61. #
  62. # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel
  63. # code since it only slows down the whole thing. At some point we might make
  64. # use of global pointer optimizations but their use of $28 conflicts with
  65. # the current pointer optimization.
  66. #
  67. # The DECStation requires an ECOFF kernel for remote booting, other MIPS
  68. # machines may also. Since BFD is incredibly buggy with respect to
  69. # crossformat linking we rely on the elf2ecoff tool for format conversion.
  70. #
  71. cflags-y += -I $(TOPDIR)/include/asm/gcc
  72. cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
  73. cflags-y += $(call cc-option, -finline-limit=100000)
  74. LDFLAGS_vmlinux += -G 0 -static -n
  75. MODFLAGS += -mlong-calls
  76. cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer
  77. #
  78. # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>)
  79. #
  80. # <cpu0>,<isa0> -- preferred CPU and ISA designations (may require
  81. # recent tools)
  82. # <cpu1>,<isa1> -- fallback CPU and ISA designations (have to work
  83. # with up to the oldest supported tools)
  84. # <isa2> -- an ISA designation used as an ABI selector for
  85. # gcc versions that do not support "-mabi=32"
  86. # (depending on the CPU type, either "mips1" or
  87. # "mips2")
  88. #
  89. set_gccflags = $(shell \
  90. while :; do \
  91. cpu=$(1); isa=-$(2); \
  92. for gcc_opt in -march= -mcpu=; do \
  93. $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
  94. -xc /dev/null > /dev/null 2>&1 && \
  95. break 2; \
  96. done; \
  97. cpu=$(3); isa=-$(4); \
  98. for gcc_opt in -march= -mcpu=; do \
  99. $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
  100. -xc /dev/null > /dev/null 2>&1 && \
  101. break 2; \
  102. done; \
  103. break; \
  104. done; \
  105. gcc_abi=-mabi=$(gcc-abi); gcc_cpu=$$cpu; \
  106. if $(CC) $$gcc_abi -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then \
  107. gcc_isa=$$isa; \
  108. else \
  109. gcc_abi=; gcc_isa=-$(5); \
  110. fi; \
  111. gas_abi=-Wa,-$(gcc-abi); gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
  112. while :; do \
  113. for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
  114. $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
  115. -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
  116. break 2; \
  117. done; \
  118. gas_abi=; gas_opt=; gas_cpu=; gas_isa=; \
  119. break; \
  120. done; \
  121. if test "$(gcc-abi)" != "$(gas-abi)"; then \
  122. gas_abi="-Wa,-$(gas-abi) -Wa,-mgp$(gcc-abi)"; \
  123. fi; \
  124. if test "$$gcc_opt" = -march= && test -n "$$gcc_abi"; then \
  125. $(CC) $$gcc_abi $$gcc_opt$$gcc_cpu -S -o /dev/null \
  126. -xc /dev/null > /dev/null 2>&1 && \
  127. gcc_isa=; \
  128. fi; \
  129. echo $$gcc_abi $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_abi $$gas_opt$$gas_cpu $$gas_isa)
  130. #
  131. # CPU-dependent compiler/assembler options for optimization.
  132. #
  133. cflags-$(CONFIG_CPU_R3000) += \
  134. $(call set_gccflags,r3000,mips1,r3000,mips1,mips1)
  135. cflags-$(CONFIG_CPU_TX39XX) += \
  136. $(call set_gccflags,r3900,mips1,r3000,mips1,mips1)
  137. cflags-$(CONFIG_CPU_R6000) += \
  138. $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \
  139. -Wa,--trap
  140. cflags-$(CONFIG_CPU_R4300) += \
  141. $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \
  142. -Wa,--trap
  143. cflags-$(CONFIG_CPU_VR41XX) += \
  144. $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \
  145. -Wa,--trap
  146. cflags-$(CONFIG_CPU_R4X00) += \
  147. $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
  148. -Wa,--trap
  149. cflags-$(CONFIG_CPU_TX49XX) += \
  150. $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
  151. -Wa,--trap
  152. cflags-$(CONFIG_CPU_MIPS32) += \
  153. $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \
  154. -Wa,--trap
  155. cflags-$(CONFIG_CPU_MIPS64) += \
  156. $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \
  157. -Wa,--trap
  158. cflags-$(CONFIG_CPU_R5000) += \
  159. $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \
  160. -Wa,--trap
  161. cflags-$(CONFIG_CPU_R5432) += \
  162. $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \
  163. -Wa,--trap
  164. cflags-$(CONFIG_CPU_NEVADA) += \
  165. $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \
  166. -Wa,--trap
  167. # $(call cc-option,-mmad)
  168. cflags-$(CONFIG_CPU_RM7000) += \
  169. $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \
  170. -Wa,--trap
  171. cflags-$(CONFIG_CPU_RM9000) += \
  172. $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \
  173. -Wa,--trap
  174. cflags-$(CONFIG_CPU_SB1) += \
  175. $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \
  176. -Wa,--trap
  177. cflags-$(CONFIG_CPU_R8000) += \
  178. $(call set_gccflags,r8000,mips4,r8000,mips4,mips2) \
  179. -Wa,--trap
  180. cflags-$(CONFIG_CPU_R10000) += \
  181. $(call set_gccflags,r10000,mips4,r8000,mips4,mips2) \
  182. -Wa,--trap
  183. ifdef CONFIG_CPU_SB1
  184. ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
  185. MODFLAGS += -msb1-pass1-workarounds
  186. endif
  187. endif
  188. #
  189. # Firmware support
  190. #
  191. libs-$(CONFIG_ARC) += arch/mips/arc/
  192. libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/
  193. #
  194. # Board-dependent options and extra files
  195. #
  196. #
  197. # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
  198. #
  199. core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
  200. cflags-$(CONFIG_MACH_JAZZ) += -Iinclude/asm-mips/mach-jazz
  201. load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000
  202. #
  203. # Common Alchemy Au1x00 stuff
  204. #
  205. core-$(CONFIG_SOC_AU1X00) += arch/mips/au1000/common/
  206. cflags-$(CONFIG_SOC_AU1X00) += -Iinclude/asm-mips/mach-au1x00
  207. #
  208. # AMD Alchemy Pb1000 eval board
  209. #
  210. libs-$(CONFIG_MIPS_PB1000) += arch/mips/au1000/pb1000/
  211. cflags-$(CONFIG_MIPS_PB1000) += -Iinclude/asm-mips/mach-pb1x00
  212. load-$(CONFIG_MIPS_PB1000) += 0xffffffff80100000
  213. #
  214. # AMD Alchemy Pb1100 eval board
  215. #
  216. libs-$(CONFIG_MIPS_PB1100) += arch/mips/au1000/pb1100/
  217. cflags-$(CONFIG_MIPS_PB1100) += -Iinclude/asm-mips/mach-pb1x00
  218. load-$(CONFIG_MIPS_PB1100) += 0xffffffff80100000
  219. #
  220. # AMD Alchemy Pb1500 eval board
  221. #
  222. libs-$(CONFIG_MIPS_PB1500) += arch/mips/au1000/pb1500/
  223. cflags-$(CONFIG_MIPS_PB1500) += -Iinclude/asm-mips/mach-pb1x00
  224. load-$(CONFIG_MIPS_PB1500) += 0xffffffff80100000
  225. #
  226. # AMD Alchemy Pb1550 eval board
  227. #
  228. libs-$(CONFIG_MIPS_PB1550) += arch/mips/au1000/pb1550/
  229. cflags-$(CONFIG_MIPS_PB1550) += -Iinclude/asm-mips/mach-pb1x00
  230. load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000
  231. #
  232. # AMD Alchemy Db1000 eval board
  233. #
  234. libs-$(CONFIG_MIPS_DB1000) += arch/mips/au1000/db1x00/
  235. cflags-$(CONFIG_MIPS_DB1000) += -Iinclude/asm-mips/mach-db1x00
  236. load-$(CONFIG_MIPS_DB1000) += 0xffffffff80100000
  237. #
  238. # AMD Alchemy Db1100 eval board
  239. #
  240. libs-$(CONFIG_MIPS_DB1100) += arch/mips/au1000/db1x00/
  241. cflags-$(CONFIG_MIPS_DB1100) += -Iinclude/asm-mips/mach-db1x00
  242. load-$(CONFIG_MIPS_DB1100) += 0xffffffff80100000
  243. #
  244. # AMD Alchemy Db1500 eval board
  245. #
  246. libs-$(CONFIG_MIPS_DB1500) += arch/mips/au1000/db1x00/
  247. cflags-$(CONFIG_MIPS_DB1500) += -Iinclude/asm-mips/mach-db1x00
  248. load-$(CONFIG_MIPS_DB1500) += 0xffffffff80100000
  249. #
  250. # AMD Alchemy Db1550 eval board
  251. #
  252. libs-$(CONFIG_MIPS_DB1550) += arch/mips/au1000/db1x00/
  253. cflags-$(CONFIG_MIPS_DB1550) += -Iinclude/asm-mips/mach-db1x00
  254. load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000
  255. #
  256. # AMD Alchemy Bosporus eval board
  257. #
  258. libs-$(CONFIG_MIPS_BOSPORUS) += arch/mips/au1000/db1x00/
  259. cflags-$(CONFIG_MIPS_BOSPORUS) += -Iinclude/asm-mips/mach-db1x00
  260. load-$(CONFIG_MIPS_BOSPORUS) += 0xffffffff80100000
  261. #
  262. # AMD Alchemy Mirage eval board
  263. #
  264. libs-$(CONFIG_MIPS_MIRAGE) += arch/mips/au1000/db1x00/
  265. cflags-$(CONFIG_MIPS_MIRAGE) += -Iinclude/asm-mips/mach-db1x00
  266. load-$(CONFIG_MIPS_MIRAGE) += 0xffffffff80100000
  267. #
  268. # 4G-Systems eval board
  269. #
  270. libs-$(CONFIG_MIPS_MTX1) += arch/mips/au1000/mtx-1/
  271. load-$(CONFIG_MIPS_MTX1) += 0xffffffff80100000
  272. #
  273. # MyCable eval board
  274. #
  275. libs-$(CONFIG_MIPS_XXS1500) += arch/mips/au1000/xxs1500/
  276. load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
  277. #
  278. # Cobalt Server
  279. #
  280. core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/
  281. load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000
  282. #
  283. # DECstation family
  284. #
  285. core-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/
  286. cflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec
  287. libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/
  288. load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000
  289. CLEAN_FILES += drivers/tc/lk201-map.c
  290. #
  291. # Galileo EV64120 Board
  292. #
  293. core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/ev64120/
  294. core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/common/
  295. cflags-$(CONFIG_MIPS_EV64120) += -Iinclude/asm-mips/mach-ev64120
  296. load-$(CONFIG_MIPS_EV64120) += 0xffffffff80100000
  297. #
  298. # Galileo EV96100 Board
  299. #
  300. core-$(CONFIG_MIPS_EV96100) += arch/mips/galileo-boards/ev96100/
  301. cflags-$(CONFIG_MIPS_EV96100) += -Iinclude/asm-mips/mach-ev96100
  302. load-$(CONFIG_MIPS_EV96100) += 0xffffffff80100000
  303. #
  304. # Globespan IVR eval board with QED 5231 CPU
  305. #
  306. core-$(CONFIG_ITE_BOARD_GEN) += arch/mips/ite-boards/generic/
  307. core-$(CONFIG_MIPS_IVR) += arch/mips/ite-boards/ivr/
  308. load-$(CONFIG_MIPS_IVR) += 0xffffffff80100000
  309. #
  310. # ITE 8172 eval board with QED 5231 CPU
  311. #
  312. core-$(CONFIG_MIPS_ITE8172) += arch/mips/ite-boards/qed-4n-s01b/
  313. load-$(CONFIG_MIPS_ITE8172) += 0xffffffff80100000
  314. #
  315. # For all MIPS, Inc. eval boards
  316. #
  317. core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/
  318. #
  319. # MIPS Atlas board
  320. #
  321. core-$(CONFIG_MIPS_ATLAS) += arch/mips/mips-boards/atlas/
  322. cflags-$(CONFIG_MIPS_ATLAS) += -Iinclude/asm-mips/mach-atlas
  323. cflags-$(CONFIG_MIPS_ATLAS) += -Iinclude/asm-mips/mach-mips
  324. load-$(CONFIG_MIPS_ATLAS) += 0xffffffff80100000
  325. #
  326. # MIPS Malta board
  327. #
  328. core-$(CONFIG_MIPS_MALTA) += arch/mips/mips-boards/malta/
  329. cflags-$(CONFIG_MIPS_MALTA) += -Iinclude/asm-mips/mach-mips
  330. load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
  331. #
  332. # MIPS SEAD board
  333. #
  334. core-$(CONFIG_MIPS_SEAD) += arch/mips/mips-boards/sead/
  335. load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
  336. #
  337. # Momentum Ocelot board
  338. #
  339. # The Ocelot setup.o must be linked early - it does the ioremap() for the
  340. # mips_io_port_base.
  341. #
  342. core-$(CONFIG_MOMENCO_OCELOT) += arch/mips/gt64120/common/ \
  343. arch/mips/gt64120/momenco_ocelot/
  344. cflags-$(CONFIG_MOMENCO_OCELOT) += -Iinclude/asm-mips/mach-ocelot
  345. load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000
  346. #
  347. # Momentum Ocelot-G board
  348. #
  349. # The Ocelot-G setup.o must be linked early - it does the ioremap() for the
  350. # mips_io_port_base.
  351. #
  352. core-$(CONFIG_MOMENCO_OCELOT_G) += arch/mips/momentum/ocelot_g/
  353. load-$(CONFIG_MOMENCO_OCELOT_G) += 0xffffffff80100000
  354. #
  355. # Momentum Ocelot-C and -CS boards
  356. #
  357. # The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the
  358. # mips_io_port_base.
  359. core-$(CONFIG_MOMENCO_OCELOT_C) += arch/mips/momentum/ocelot_c/
  360. load-$(CONFIG_MOMENCO_OCELOT_C) += 0xffffffff80100000
  361. #
  362. # PMC-Sierra Yosemite
  363. #
  364. core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/
  365. cflags-$(CONFIG_PMC_YOSEMITE) += -Iinclude/asm-mips/mach-yosemite
  366. load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000
  367. #
  368. # Momentum Ocelot-3
  369. #
  370. core-$(CONFIG_MOMENCO_OCELOT_3) += arch/mips/momentum/ocelot_3/
  371. cflags-$(CONFIG_MOMENCO_OCELOT_3) += -Iinclude/asm-mips/mach-ocelot3
  372. load-$(CONFIG_MOMENCO_OCELOT_3) += 0xffffffff80100000
  373. #
  374. # Momentum Jaguar ATX
  375. #
  376. core-$(CONFIG_MOMENCO_JAGUAR_ATX) += arch/mips/momentum/jaguar_atx/
  377. cflags-$(CONFIG_MOMENCO_JAGUAR_ATX) += -Iinclude/asm-mips/mach-ja
  378. #ifdef CONFIG_JAGUAR_DMALOW
  379. #load-$(CONFIG_MOMENCO_JAGUAR_ATX) += 0xffffffff88000000
  380. #else
  381. load-$(CONFIG_MOMENCO_JAGUAR_ATX) += 0xffffffff80100000
  382. #endif
  383. #
  384. # NEC DDB
  385. #
  386. core-$(CONFIG_DDB5XXX_COMMON) += arch/mips/ddb5xxx/common/
  387. #
  388. # NEC DDB Vrc-5074
  389. #
  390. core-$(CONFIG_DDB5074) += arch/mips/ddb5xxx/ddb5074/
  391. load-$(CONFIG_DDB5074) += 0xffffffff80080000
  392. #
  393. # NEC DDB Vrc-5476
  394. #
  395. core-$(CONFIG_DDB5476) += arch/mips/ddb5xxx/ddb5476/
  396. load-$(CONFIG_DDB5476) += 0xffffffff80080000
  397. #
  398. # NEC DDB Vrc-5477
  399. #
  400. core-$(CONFIG_DDB5477) += arch/mips/ddb5xxx/ddb5477/
  401. load-$(CONFIG_DDB5477) += 0xffffffff80100000
  402. core-$(CONFIG_LASAT) += arch/mips/lasat/
  403. cflags-$(CONFIG_LASAT) += -Iinclude/asm-mips/mach-lasat
  404. load-$(CONFIG_LASAT) += 0xffffffff80000000
  405. #
  406. # NEC Osprey (vr4181) board
  407. #
  408. core-$(CONFIG_NEC_OSPREY) += arch/mips/vr4181/common/ \
  409. arch/mips/vr4181/osprey/
  410. load-$(CONFIG_NEC_OSPREY) += 0xffffffff80002000
  411. #
  412. # Common VR41xx
  413. #
  414. core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/
  415. cflags-$(CONFIG_MACH_VR41XX) += -Iinclude/asm-mips/mach-vr41xx
  416. #
  417. # NEC VR4133
  418. #
  419. core-$(CONFIG_NEC_CMBVR4133) += arch/mips/vr41xx/nec-cmbvr4133/
  420. load-$(CONFIG_NEC_CMBVR4133) += 0xffffffff80100000
  421. #
  422. # ZAO Networks Capcella (VR4131)
  423. #
  424. core-$(CONFIG_ZAO_CAPCELLA) += arch/mips/vr41xx/zao-capcella/
  425. load-$(CONFIG_ZAO_CAPCELLA) += 0xffffffff80000000
  426. #
  427. # Victor MP-C303/304 (VR4122)
  428. #
  429. core-$(CONFIG_VICTOR_MPC30X) += arch/mips/vr41xx/victor-mpc30x/
  430. load-$(CONFIG_VICTOR_MPC30X) += 0xffffffff80001000
  431. #
  432. # IBM WorkPad z50 (VR4121)
  433. #
  434. core-$(CONFIG_IBM_WORKPAD) += arch/mips/vr41xx/ibm-workpad/
  435. load-$(CONFIG_IBM_WORKPAD) += 0xffffffff80004000
  436. #
  437. # CASIO CASSIPEIA E-55/65 (VR4111)
  438. #
  439. core-$(CONFIG_CASIO_E55) += arch/mips/vr41xx/casio-e55/
  440. load-$(CONFIG_CASIO_E55) += 0xffffffff80004000
  441. #
  442. # TANBAC TB0226 Mbase (VR4131)
  443. #
  444. core-$(CONFIG_TANBAC_TB0226) += arch/mips/vr41xx/tanbac-tb0226/
  445. load-$(CONFIG_TANBAC_TB0226) += 0xffffffff80000000
  446. #
  447. # TANBAC TB0229 VR4131DIMM (VR4131)
  448. #
  449. core-$(CONFIG_TANBAC_TB0229) += arch/mips/vr41xx/tanbac-tb0229/
  450. load-$(CONFIG_TANBAC_TB0229) += 0xffffffff80000000
  451. #
  452. # SGI IP22 (Indy/Indigo2)
  453. #
  454. # Set the load address to >= 0xffffffff88069000 if you want to leave space for
  455. # symmon, 0xffffffff80002000 for production kernels. Note that the value must
  456. # be aligned to a multiple of the kernel stack size or the handling of the
  457. # current variable will break so for 64-bit kernels we have to raise the start
  458. # address by 8kb.
  459. #
  460. core-$(CONFIG_SGI_IP22) += arch/mips/sgi-ip22/
  461. cflags-$(CONFIG_SGI_IP22) += -Iinclude/asm-mips/mach-ip22
  462. ifdef CONFIG_MIPS32
  463. load-$(CONFIG_SGI_IP22) += 0xffffffff88002000
  464. endif
  465. ifdef CONFIG_MIPS64
  466. load-$(CONFIG_SGI_IP22) += 0xffffffff88004000
  467. endif
  468. #
  469. # SGI-IP27 (Origin200/2000)
  470. #
  471. # Set the load address to >= 0xc000000000300000 if you want to leave space for
  472. # symmon, 0xc00000000001c000 for production kernels. Note that the value must
  473. # be 16kb aligned or the handling of the current variable will break.
  474. #
  475. ifdef CONFIG_SGI_IP27
  476. core-$(CONFIG_SGI_IP27) += arch/mips/sgi-ip27/
  477. cflags-$(CONFIG_SGI_IP27) += -Iinclude/asm-mips/mach-ip27
  478. ifdef CONFIG_BUILD_ELF64
  479. ifdef CONFIG_MAPPED_KERNEL
  480. load-$(CONFIG_SGI_IP27) += 0xc00000004001c000
  481. OBJCOPYFLAGS := --change-addresses=0x3fffffff80000000
  482. dataoffset-$(CONFIG_SGI_IP27) += 0x01000000
  483. else
  484. load-$(CONFIG_SGI_IP27) += 0xa80000000001c000
  485. OBJCOPYFLAGS := --change-addresses=0x57ffffff80000000
  486. endif
  487. else
  488. ifdef CONFIG_MAPPED_KERNEL
  489. load-$(CONFIG_SGI_IP27) += 0xffffffffc001c000
  490. OBJCOPYFLAGS := --change-addresses=0xc000000080000000
  491. dataoffset-$(CONFIG_SGI_IP27) += 0x01000000
  492. else
  493. load-$(CONFIG_SGI_IP27) += 0xffffffff8001c000
  494. OBJCOPYFLAGS := --change-addresses=0xa800000080000000
  495. endif
  496. endif
  497. endif
  498. #
  499. # SGI-IP32 (O2)
  500. #
  501. # Set the load address to >= 80069000 if you want to leave space for symmon,
  502. # 0xffffffff80004000 for production kernels. Note that the value must be aligned to
  503. # a multiple of the kernel stack size or the handling of the current variable
  504. # will break.
  505. #
  506. core-$(CONFIG_SGI_IP32) += arch/mips/sgi-ip32/
  507. cflags-$(CONFIG_SGI_IP32) += -Iinclude/asm-mips/mach-ip32
  508. load-$(CONFIG_SGI_IP32) += 0xffffffff80004000
  509. #
  510. # Sibyte SB1250 SOC
  511. #
  512. # This is a LIB so that it links at the end, and initcalls are later
  513. # the sequence; but it is built as an object so that modules don't get
  514. # removed (as happens, even if they have __initcall/module_init)
  515. #
  516. core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/
  517. cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte
  518. core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/
  519. cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte
  520. #
  521. # Sibyte BCM91120x (Carmel) board
  522. # Sibyte BCM91120C (CRhine) board
  523. # Sibyte BCM91125C (CRhone) board
  524. # Sibyte BCM91125E (Rhone) board
  525. # Sibyte SWARM board
  526. #
  527. libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/
  528. load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000
  529. libs-$(CONFIG_SIBYTE_CRHINE) += arch/mips/sibyte/swarm/
  530. load-$(CONFIG_SIBYTE_CRHINE) := 0xffffffff80100000
  531. libs-$(CONFIG_SIBYTE_CRHONE) += arch/mips/sibyte/swarm/
  532. load-$(CONFIG_SIBYTE_CRHONE) := 0xffffffff80100000
  533. libs-$(CONFIG_SIBYTE_RHONE) += arch/mips/sibyte/swarm/
  534. load-$(CONFIG_SIBYTE_RHONE) := 0xffffffff80100000
  535. libs-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/
  536. load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000
  537. libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/
  538. load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000
  539. #
  540. # SNI RM200 PCI
  541. #
  542. core-$(CONFIG_SNI_RM200_PCI) += arch/mips/sni/
  543. cflags-$(CONFIG_SNI_RM200_PCI) += -Iinclude/asm-mips/mach-rm200
  544. load-$(CONFIG_SNI_RM200_PCI) += 0xffffffff80600000
  545. #
  546. # Toshiba JMR-TX3927 board
  547. #
  548. core-$(CONFIG_TOSHIBA_JMR3927) += arch/mips/jmr3927/rbhma3100/ \
  549. arch/mips/jmr3927/common/
  550. load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000
  551. #
  552. # Toshiba RBTX4927 board or
  553. # Toshiba RBTX4937 board
  554. #
  555. core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
  556. core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
  557. load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
  558. cflags-y += -Iinclude/asm-mips/mach-generic
  559. drivers-$(CONFIG_PCI) += arch/mips/pci/
  560. ifdef CONFIG_MIPS32
  561. ifdef CONFIG_CPU_LITTLE_ENDIAN
  562. JIFFIES = jiffies_64
  563. else
  564. JIFFIES = jiffies_64 + 4
  565. endif
  566. else
  567. JIFFIES = jiffies_64
  568. endif
  569. AFLAGS += $(cflags-y)
  570. CFLAGS += $(cflags-y)
  571. LDFLAGS += -m $(ld-emul)
  572. OBJCOPYFLAGS += --remove-section=.reginfo
  573. #
  574. # Choosing incompatible machines durings configuration will result in
  575. # error messages during linking. Select a default linkscript if
  576. # none has been choosen above.
  577. #
  578. CPPFLAGS_vmlinux.lds := \
  579. $(CFLAGS) \
  580. -D"LOADADDR=$(load-y)" \
  581. -D"JIFFIES=$(JIFFIES)" \
  582. -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
  583. head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
  584. libs-y += arch/mips/lib/
  585. libs-$(CONFIG_MIPS32) += arch/mips/lib-32/
  586. libs-$(CONFIG_MIPS64) += arch/mips/lib-64/
  587. core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
  588. drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
  589. ifdef CONFIG_LASAT
  590. rom.bin rom.sw: vmlinux
  591. $(call descend,arch/mips/lasat/image,$@)
  592. endif
  593. #
  594. # Some machines like the Indy need 32-bit ELF binaries for booting purposes.
  595. # Other need ECOFF, so we build a 32-bit ELF binary for them which we then
  596. # convert to ECOFF using elf2ecoff.
  597. #
  598. vmlinux.32: vmlinux
  599. $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
  600. #
  601. # The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
  602. # ELF files from 32-bit files by conversion.
  603. #
  604. vmlinux.64: vmlinux
  605. $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@
  606. makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
  607. ifdef CONFIG_BOOT_ELF32
  608. all: $(vmlinux-32)
  609. endif
  610. ifdef CONFIG_BOOT_ELF64
  611. all: $(vmlinux-64)
  612. endif
  613. ifdef CONFIG_SNI_RM200_PCI
  614. all: vmlinux.ecoff
  615. endif
  616. vmlinux.ecoff vmlinux.rm200: $(vmlinux-32)
  617. +@$(call makeboot,$@)
  618. vmlinux.srec: $(vmlinux-32)
  619. +@$(call makeboot,$@)
  620. CLEAN_FILES += vmlinux.ecoff \
  621. vmlinux.srec \
  622. vmlinux.rm200.tmp \
  623. vmlinux.rm200
  624. archclean:
  625. @$(MAKE) $(clean)=arch/mips/boot
  626. @$(MAKE) $(clean)=arch/mips/lasat
  627. # Generate <asm/offset.h
  628. #
  629. # The default rule is suffering from funny problems on MIPS so we using our
  630. # own ...
  631. #
  632. # ---------------------------------------------------------------------------
  633. define filechk_gen-asm-offset.h
  634. (set -e; \
  635. echo "#ifndef _ASM_OFFSET_H"; \
  636. echo "#define _ASM_OFFSET_H"; \
  637. echo "/*"; \
  638. echo " * DO NOT MODIFY."; \
  639. echo " *"; \
  640. echo " * This file was generated by arch/$(ARCH)/Makefile"; \
  641. echo " *"; \
  642. echo " */"; \
  643. echo ""; \
  644. sed -ne "/^@@@/s///p"; \
  645. echo "#endif /* _ASM_OFFSET_H */" )
  646. endef
  647. prepare: include/asm-$(ARCH)/offset.h
  648. arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
  649. include/config/MARKER
  650. include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
  651. $(call filechk,gen-asm-offset.h)
  652. CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
  653. include/asm-$(ARCH)/offset.h \
  654. vmlinux.32 \
  655. vmlinux.64 \
  656. vmlinux.ecoff