Makefile 24 KB

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