Makefile 24 KB

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