Makefile 21 KB

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