1 # 1 # 2 # This file is subject to the terms and condit 2 # This file is subject to the terms and conditions of the GNU General Public 3 # License. See the file "COPYING" in the main 3 # License. See the file "COPYING" in the main directory of this archive 4 # for more details. 4 # for more details. 5 # 5 # 6 # Copyright (C) 1994, 95, 96, 2003 by Ralf Bae !! 6 # Copyright (C) 1994, 1995, 1996 by Ralf Baechle 7 # DECStation modifications by Paul M. Antoine, 7 # DECStation modifications by Paul M. Antoine, 1996 8 # Copyright (C) 2002, 2003, 2004 Maciej W. Ro 8 # Copyright (C) 2002, 2003, 2004 Maciej W. Rozycki 9 # 9 # 10 # This file is included by the global makefile 10 # This file is included by the global makefile so that you can add your own 11 # architecture-specific flags and dependencies !! 11 # architecture-specific flags and dependencies. Remember to do have actions >> 12 # for "archclean" and "archdep" for cleaning up and making dependencies for >> 13 # this architecture 12 # 14 # 13 15 14 archscripts: scripts_basic << 15 $(Q)$(MAKE) $(build)=arch/mips/tools e << 16 ifeq ($(CONFIG_CPU_LOONGSON3_WORKAROUNDS),y) << 17 $(Q)$(MAKE) $(build)=arch/mips/tools l << 18 endif << 19 $(Q)$(MAKE) $(build)=arch/mips/boot/to << 20 << 21 KBUILD_DEFCONFIG := 32r2el_defconfig << 22 KBUILD_DTBS := dtbs << 23 << 24 # 16 # 25 # Select the object file format to substitute 17 # Select the object file format to substitute into the linker script. 26 # 18 # 27 ifdef CONFIG_CPU_LITTLE_ENDIAN 19 ifdef CONFIG_CPU_LITTLE_ENDIAN 28 32bit-tool-archpref = mipsel !! 20 tool-prefix = mipsel-linux- 29 64bit-tool-archpref = mips64el !! 21 ld-emul = elf32ltsmip 30 32bit-bfd = elf32-tradlittlemips << 31 64bit-bfd = elf64-tradlittlemips << 32 32bit-emul = elf32ltsmip << 33 64bit-emul = elf64ltsmip << 34 else 22 else 35 32bit-tool-archpref = mips !! 23 tool-prefix = mips-linux- 36 64bit-tool-archpref = mips64 !! 24 ld-emul = elf32btsmip 37 32bit-bfd = elf32-tradbigmips !! 25 endif 38 64bit-bfd = elf64-tradbigmips !! 26 39 32bit-emul = elf32btsmip !! 27 ifdef CONFIG_CROSSCOMPILE 40 64bit-emul = elf64btsmip !! 28 CROSS_COMPILE = $(tool-prefix) 41 endif 29 endif 42 30 43 ifdef CONFIG_32BIT !! 31 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot 44 tool-archpref = $(32bit-tool-archpre !! 32 45 UTS_MACHINE := mips !! 33 # >> 34 # >> 35 # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel >> 36 # code since it only slows down the whole thing. At some point we might make >> 37 # use of global pointer optimizations but their use of $28 conflicts with >> 38 # the current pointer optimization. >> 39 # >> 40 # The DECStation requires an ECOFF kernel for remote booting, other MIPS >> 41 # machines may also. Since BFD is incredibly buggy with respect to >> 42 # crossformat linking we rely on the elf2ecoff tool for format conversion. >> 43 # >> 44 GCCFLAGS := -I $(TOPDIR)/include/asm/gcc >> 45 GCCFLAGS += -G 0 -mno-abicalls -fno-pic -pipe >> 46 GCCFLAGS += $(call check_gcc, -finline-limit=100000,) >> 47 LINKFLAGS += -G 0 -static -n >> 48 MODFLAGS += -mlong-calls >> 49 >> 50 ifdef CONFIG_DEBUG_INFO >> 51 GCCFLAGS += -g >> 52 ifdef CONFIG_SB1XXX_CORELIS >> 53 GCCFLAGS += -mno-sched-prolog -fno-omit-frame-pointer 46 endif 54 endif 47 ifdef CONFIG_64BIT << 48 tool-archpref = $(64bit-tool-archpre << 49 UTS_MACHINE := mips64 << 50 endif 55 endif 51 56 52 ifdef cross_compiling !! 57 # 53 ifeq ($(CROSS_COMPILE),) !! 58 # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>) 54 CROSS_COMPILE := $(call cc-cross-prefix, $ !! 59 # 55 endif !! 60 # <cpu0>,<isa0> -- preferred CPU and ISA designations (may require >> 61 # recent tools) >> 62 # <cpu1>,<isa1> -- fallback CPU and ISA designations (have to work >> 63 # with up to the oldest supported tools) >> 64 # <isa2> -- an ISA designation used as an ABI selector for >> 65 # gcc versions that do not support "-mabi=32" >> 66 # (depending on the CPU type, either "mips1" or >> 67 # "mips2") >> 68 # >> 69 set_gccflags = $(shell \ >> 70 while :; do \ >> 71 cpu=$(1); isa=-$(2); \ >> 72 for gcc_opt in -march= -mcpu=; do \ >> 73 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \ >> 74 -xc /dev/null > /dev/null 2>&1 && \ >> 75 break 2; \ >> 76 done; \ >> 77 cpu=$(3); isa=-$(4); \ >> 78 for gcc_opt in -march= -mcpu=; do \ >> 79 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \ >> 80 -xc /dev/null > /dev/null 2>&1 && \ >> 81 break 2; \ >> 82 done; \ >> 83 break; \ >> 84 done; \ >> 85 gcc_abi=-mabi=32; gcc_cpu=$$cpu; \ >> 86 if $(CC) $$gcc_abi -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then \ >> 87 gcc_isa=$$isa; \ >> 88 else \ >> 89 gcc_abi=; gcc_isa=-$(5); \ >> 90 fi; \ >> 91 gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \ >> 92 while :; do \ >> 93 for gas_opt in -Wa,-march= -Wa,-mcpu=; do \ >> 94 $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \ >> 95 -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \ >> 96 break 2; \ >> 97 done; \ >> 98 gas_abi=; gas_opt=; gas_cpu=; gas_isa=; \ >> 99 break; \ >> 100 done; \ >> 101 if test "$$gcc_opt" = -march= && test -n "$$gcc_abi"; then \ >> 102 $(CC) $$gcc_abi $$gcc_opt$$gcc_cpu -S -o /dev/null \ >> 103 -xc /dev/null > /dev/null 2>&1 && \ >> 104 gcc_isa=; \ >> 105 fi; \ >> 106 echo $$gcc_abi $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_abi $$gas_opt$$gas_cpu $$gas_isa) >> 107 >> 108 # >> 109 # CPU-dependent compiler/assembler options for optimization. >> 110 # >> 111 ifdef CONFIG_CPU_R3000 >> 112 GCCFLAGS += $(call set_gccflags,r3000,mips1,r3000,mips1,mips1) >> 113 endif >> 114 ifdef CONFIG_CPU_TX39XX >> 115 GCCFLAGS += $(call set_gccflags,r3900,mips1,r3000,mips1,mips1) >> 116 endif >> 117 ifdef CONFIG_CPU_R6000 >> 118 GCCFLAGS += $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \ >> 119 -Wa,--trap >> 120 endif >> 121 ifdef CONFIG_CPU_R4300 >> 122 GCCFLAGS += $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \ >> 123 -Wa,--trap >> 124 endif >> 125 ifdef CONFIG_CPU_VR41XX >> 126 GCCFLAGS += $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \ >> 127 -Wa,--trap >> 128 endif >> 129 ifdef CONFIG_CPU_R4X00 >> 130 GCCFLAGS += $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ >> 131 -Wa,--trap >> 132 endif >> 133 ifdef CONFIG_CPU_TX49XX >> 134 GCCFLAGS += $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ >> 135 -Wa,--trap >> 136 endif >> 137 ifdef CONFIG_CPU_MIPS32 >> 138 GCCFLAGS += $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \ >> 139 -Wa,--trap >> 140 endif >> 141 ifdef CONFIG_CPU_MIPS64 >> 142 GCCFLAGS += $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \ >> 143 -Wa,--trap 56 endif 144 endif >> 145 ifdef CONFIG_CPU_R5000 >> 146 GCCFLAGS += $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \ >> 147 -Wa,--trap >> 148 endif >> 149 ifdef CONFIG_CPU_R5432 >> 150 GCCFLAGS += $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \ >> 151 -Wa,--trap >> 152 endif >> 153 ifdef CONFIG_CPU_NEVADA >> 154 GCCFLAGS += $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \ >> 155 -Wa,--trap >> 156 #GCCFLAGS += $(call check_gcc,-mmad,) >> 157 endif >> 158 ifdef CONFIG_CPU_RM7000 >> 159 GCCFLAGS += $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \ >> 160 -Wa,--trap >> 161 endif >> 162 ifdef CONFIG_CPU_RM9000 >> 163 GCCFLAGS += $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \ >> 164 -Wa,--trap >> 165 endif >> 166 ifdef CONFIG_CPU_SB1 >> 167 GCCFLAGS += $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \ >> 168 -Wa,--trap >> 169 ifdef CONFIG_SB1_PASS_1_WORKAROUNDS >> 170 MODFLAGS += -msb1-pass1-workarounds >> 171 endif >> 172 endif >> 173 >> 174 AFLAGS += $(GCCFLAGS) >> 175 CFLAGS += $(GCCFLAGS) 57 176 58 ifdef CONFIG_FUNCTION_GRAPH_TRACER !! 177 LD += -m $(ld-emul) 59 ifndef KBUILD_MCOUNT_RA_ADDRESS !! 178 60 ifeq ($(call cc-option-yn,-mmcount-ra-addr !! 179 61 cflags-y += -mmcount-ra-address -DKBUILD !! 180 # 62 endif !! 181 # We unconditionally build the math emulator 63 endif !! 182 # >> 183 CORE_FILES += arch/mips/math-emu/fpu_emulator.o >> 184 SUBDIRS += arch/mips/math-emu >> 185 >> 186 # >> 187 # ramdisk/initrd support >> 188 # You need a compressed ramdisk image, named ramdisk.gz in >> 189 # arch/mips/ramdisk >> 190 # >> 191 ifdef CONFIG_EMBEDDED_RAMDISK >> 192 CORE_FILES += arch/mips/ramdisk/ramdisk.o >> 193 SUBDIRS += arch/mips/ramdisk 64 endif 194 endif 65 cflags-y += $(call cc-option, -mno-check-zero- << 66 195 67 ifdef CONFIG_32BIT << 68 ld-emul = $(32bit-emul) << 69 vmlinux-32 = vmlinux << 70 vmlinux-64 = vmlinux.64 << 71 196 72 cflags-y += -mabi=32 !! 197 # >> 198 # Board-dependent options and extra files >> 199 # >> 200 >> 201 # >> 202 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. >> 203 # >> 204 ifdef CONFIG_MIPS_JAZZ >> 205 CORE_FILES += arch/mips/jazz/jazz.o >> 206 SUBDIRS += arch/mips/jazz arch/mips/arc >> 207 LIBS += arch/mips/arc/arclib.a >> 208 LOADADDR := 0x80080000 73 endif 209 endif 74 210 75 ifdef CONFIG_64BIT !! 211 # 76 ld-emul = $(64bit-emul) !! 212 # Au1000 (Alchemy Semi PB1000) eval board 77 vmlinux-32 = vmlinux.32 !! 213 # 78 vmlinux-64 = vmlinux !! 214 ifdef CONFIG_MIPS_PB1000 >> 215 LIBS += arch/mips/au1000/pb1000/pb1000.o \ >> 216 arch/mips/au1000/common/au1000.o >> 217 SUBDIRS += arch/mips/au1000/pb1000 arch/mips/au1000/common >> 218 LOADADDR := 0x80100000 >> 219 endif 79 220 80 cflags-y += -mabi=64 !! 221 # >> 222 # Au1100 (Alchemy Semi PB1100) eval board >> 223 # >> 224 ifdef CONFIG_MIPS_PB1100 >> 225 LIBS += arch/mips/au1000/pb1100/pb1100.o \ >> 226 arch/mips/au1000/common/au1000.o >> 227 SUBDIRS += arch/mips/au1000/pb1100 arch/mips/au1000/common >> 228 LOADADDR += 0x80100000 81 endif 229 endif 82 230 83 all-$(CONFIG_BOOT_ELF32) := $(vmlinux-3 !! 231 # 84 all-$(CONFIG_BOOT_ELF64) := $(vmlinux-6 !! 232 # Au1500 (Alchemy Semi PB1500) eval board 85 all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz !! 233 # >> 234 ifdef CONFIG_MIPS_PB1500 >> 235 LIBS += arch/mips/au1000/pb1500/pb1500.o \ >> 236 arch/mips/au1000/common/au1000.o >> 237 SUBDIRS += arch/mips/au1000/pb1500 arch/mips/au1000/common >> 238 LOADADDR := 0x80100000 >> 239 endif 86 240 87 # 241 # 88 # GCC uses -G 0 -mabicalls -fpic as default. !! 242 # Au1x00 (AMD/Alchemy) eval boards 89 # code since it only slows down the whole thin << 90 # use of global pointer optimizations but thei << 91 # the current pointer optimization. << 92 # 243 # 93 # The DECStation requires an ECOFF kernel for !! 244 ifdef CONFIG_MIPS_DB1000 94 # machines may also. Since BFD is incredibly !! 245 LIBS += arch/mips/au1000/db1x00/db1x00.o \ 95 # crossformat linking we rely on the elf2ecoff !! 246 arch/mips/au1000/common/au1000.o >> 247 SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common >> 248 LOADADDR += 0x80100000 >> 249 endif >> 250 >> 251 ifdef CONFIG_MIPS_DB1500 >> 252 LIBS += arch/mips/au1000/db1x00/db1x00.o \ >> 253 arch/mips/au1000/common/au1000.o >> 254 SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common >> 255 LOADADDR += 0x80100000 >> 256 endif >> 257 >> 258 ifdef CONFIG_MIPS_DB1550 >> 259 LIBS += arch/mips/au1000/db1x00/db1x00.o \ >> 260 arch/mips/au1000/common/au1000.o >> 261 SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common >> 262 LOADADDR += 0x80100000 >> 263 endif >> 264 >> 265 ifdef CONFIG_MIPS_DB1100 >> 266 LIBS += arch/mips/au1000/db1x00/db1x00.o \ >> 267 arch/mips/au1000/common/au1000.o >> 268 SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common >> 269 LOADADDR += 0x80100000 >> 270 endif >> 271 >> 272 ifdef CONFIG_MIPS_HYDROGEN3 >> 273 LIBS += arch/mips/au1000/hydrogen3/hydrogen3.o \ >> 274 arch/mips/au1000/common/au1000.o >> 275 SUBDIRS += arch/mips/au1000/hydrogen3 arch/mips/au1000/common >> 276 LOADADDR += 0x80100000 >> 277 endif >> 278 >> 279 ifdef CONFIG_MIPS_BOSPORUS >> 280 LIBS += arch/mips/au1000/db1x00/db1x00.o \ >> 281 arch/mips/au1000/common/au1000.o >> 282 SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common >> 283 LOADADDR += 0x80100000 >> 284 endif >> 285 >> 286 ifdef CONFIG_MIPS_MIRAGE >> 287 LIBS += arch/mips/au1000/db1x00/db1x00.o \ >> 288 arch/mips/au1000/common/au1000.o >> 289 SUBDIRS += arch/mips/au1000/db1x00 arch/mips/au1000/common >> 290 LOADADDR += 0x80100000 >> 291 endif >> 292 >> 293 ifdef CONFIG_MIPS_XXS1500 >> 294 LIBS += arch/mips/au1000/xxs1500/xxs1500.o \ >> 295 arch/mips/au1000/common/au1000.o >> 296 SUBDIRS += arch/mips/au1000/xxs1500 arch/mips/au1000/common >> 297 LOADADDR += 0x80100000 >> 298 endif >> 299 >> 300 ifdef CONFIG_MIPS_MTX1 >> 301 LIBS += arch/mips/au1000/mtx-1/mtx-1.o \ >> 302 arch/mips/au1000/common/au1000.o >> 303 SUBDIRS += arch/mips/au1000/mtx-1 arch/mips/au1000/common >> 304 LOADADDR += 0x80100000 >> 305 endif >> 306 >> 307 ifdef CONFIG_MIPS_PB1550 >> 308 LIBS += arch/mips/au1000/pb1550/pb1550.o \ >> 309 arch/mips/au1000/common/au1000.o >> 310 SUBDIRS += arch/mips/au1000/pb1550 arch/mips/au1000/common >> 311 LOADADDR += 0x80100000 >> 312 endif >> 313 >> 314 >> 315 # >> 316 # Cogent CSB250 96 # 317 # 97 cflags-y += -G 0 -mno-a !! 318 ifdef CONFIG_COGENT_CSB250 98 cflags-y += -msoft-floa !! 319 LIBS += arch/mips/au1000/csb250/csb250.o \ 99 LDFLAGS_vmlinux += -G 0 -stati !! 320 arch/mips/au1000/common/au1000.o 100 KBUILD_AFLAGS_MODULE += -mlong-call !! 321 SUBDIRS += arch/mips/au1000/csb250 arch/mips/au1000/common 101 KBUILD_CFLAGS_MODULE += -mlong-call !! 322 LOADADDR := 0x80100000 >> 323 endif 102 324 103 ifeq ($(CONFIG_RELOCATABLE),y) !! 325 ifdef CONFIG_PCI 104 LDFLAGS_vmlinux += --emit-relo !! 326 CORE_FILES += arch/mips/pci/pci-core.o >> 327 SUBDIRS += arch/mips/pci 105 endif 328 endif 106 329 107 cflags-y += -ffreestanding !! 330 # >> 331 # Algorithmics P4032 >> 332 # >> 333 ifdef CONFIG_ALGOR_P4032 >> 334 CORE_FILES += arch/mips/algor/algor.o >> 335 SUBDIRS += arch/mips/algor >> 336 LOADADDR := 0x80000000 >> 337 endif 108 338 109 cflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB !! 339 # 110 cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -EL !! 340 # Baget/MIPS >> 341 # >> 342 ifdef CONFIG_BAGET_MIPS >> 343 SUBDIRS += arch/mips/baget arch/mips/baget/prom >> 344 LIBS += arch/mips/baget/baget.a arch/mips/baget/prom/bagetlib.a >> 345 LOADADDR := 0x80001000 >> 346 endif 111 347 112 cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-o !! 348 # 113 -fno-omit-f !! 349 # Cobalt Server >> 350 # >> 351 ifdef CONFIG_MIPS_COBALT >> 352 SUBDIRS += arch/mips/cobalt >> 353 CORE_FILES += arch/mips/cobalt/cobalt.o >> 354 LOADADDR := 0x80080000 >> 355 endif 114 356 115 # Some distribution-specific toolchains might << 116 # option during the build, which adds a simple << 117 # of every function. This stack probe is to e << 118 # stack space, else a SEGV is generated. This << 119 # as kernel stacks are small, placed in unmapp << 120 # grow when overflowed. Especially on SGI IP2 << 121 # lead to a NULL pointer dereference in _raw_s << 122 # 357 # 123 # In disassembly, this stack probe appears at !! 358 # DECstation family 124 # sd zero,<offset>(sp) << 125 # Where <offset> is a negative value. << 126 # 359 # 127 cflags-y += -fno-stack-check !! 360 ifdef CONFIG_DECSTATION >> 361 CORE_FILES += arch/mips/dec/dec.o >> 362 SUBDIRS += arch/mips/dec arch/mips/dec/prom >> 363 LIBS += arch/mips/dec/prom/rexlib.a >> 364 LOADADDR := 0x80040000 >> 365 endif 128 366 129 # binutils from v2.35 when built with --enable << 130 # supports an -mfix-loongson3-llsc flag which << 131 # instruction to work around a CPU bug (see __ << 132 # for a description). << 133 # 367 # 134 # We disable this in order to prevent the asse !! 368 # Galileo EV64120 Board 135 # instruction that labels refer to, ie. if we << 136 # 369 # 137 # 1: ll v0, 0(a0) !! 370 ifdef CONFIG_MIPS_EV64120 >> 371 LIBS += arch/mips/gt64120/common/gt64120.o \ >> 372 arch/mips/gt64120/ev64120/ev64120.o >> 373 SUBDIRS += arch/mips/gt64120/common arch/mips/gt64120/ev64120 >> 374 LOADADDR := 0x80100000 >> 375 endif >> 376 138 # 377 # 139 # ...then with the assembler fix applied the l !! 378 # Galileo EV96100 Board 140 # instruction inserted by the assembler, and i !! 379 # 141 # exception table the table would no longer co !! 380 ifdef CONFIG_MIPS_EV96100 142 # instruction. !! 381 LIBS += arch/mips/galileo-boards/ev96100/ev96100.o >> 382 SUBDIRS += arch/mips/galileo-boards/ev96100 >> 383 LOADADDR := 0x80100000 >> 384 endif >> 385 143 # 386 # 144 # Avoid this by explicitly disabling that asse !! 387 # Globespan IVR eval board with QED 5231 CPU 145 # 388 # 146 cflags-y += $(call cc-option,-Wa$(comma)-mno-f !! 389 ifdef CONFIG_MIPS_IVR >> 390 LIBS += arch/mips/ite-boards/ivr/ivr.o \ >> 391 arch/mips/ite-boards/generic/it8172.o >> 392 SUBDIRS += arch/mips/ite-boards/generic arch/mips/ite-boards/ivr >> 393 LOADADDR := 0x80100000 >> 394 endif 147 395 148 # 396 # 149 # CPU-dependent compiler/assembler options for !! 397 # HP LaserJet 150 # 398 # 151 cflags-$(CONFIG_CPU_R3000) += $(call cc-o !! 399 ifdef CONFIG_HP_LASERJET 152 cflags-$(CONFIG_CPU_R4300) += $(call cc-o !! 400 SUBDIRS += arch/mips/hp-lj 153 cflags-$(CONFIG_CPU_R4X00) += $(call cc-o !! 401 LIBS += arch/mips/hp-lj/hp-lj.o 154 cflags-$(CONFIG_CPU_TX49XX) += $(call cc-o !! 402 LOADADDR := 0x80030000 155 cflags-$(CONFIG_CPU_MIPS32_R1) += -march=mips !! 403 endif 156 cflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips << 157 cflags-$(CONFIG_CPU_MIPS32_R5) += -march=mips << 158 cflags-$(CONFIG_CPU_MIPS32_R6) += -march=mips << 159 cflags-$(CONFIG_CPU_MIPS64_R1) += -march=mips << 160 cflags-$(CONFIG_CPU_MIPS64_R2) += -march=mips << 161 cflags-$(CONFIG_CPU_MIPS64_R5) += -march=mips << 162 cflags-$(CONFIG_CPU_MIPS64_R6) += -march=mips << 163 cflags-$(CONFIG_CPU_P5600) += $(call cc-o << 164 -Wa,--trap -modd-spreg << 165 cflags-$(CONFIG_CPU_R5000) += $(call cc-o << 166 -Wa,--trap << 167 cflags-$(CONFIG_CPU_R5500) += $(call cc-o << 168 -Wa,--trap << 169 cflags-$(CONFIG_CPU_NEVADA) += $(call cc-o << 170 -Wa,--trap << 171 cflags-$(CONFIG_CPU_RM7000) += $(call cc-o << 172 -Wa,--trap << 173 cflags-$(CONFIG_CPU_SB1) += $(call cc-o << 174 -Wa,--trap << 175 cflags-$(CONFIG_CPU_SB1) += $(call cc-o << 176 cflags-$(CONFIG_CPU_SB1) += $(call cc-o << 177 cflags-$(CONFIG_CPU_R10000) += $(call cc-o << 178 -Wa,--trap << 179 cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -march=o << 180 cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix- << 181 cflags-$(CONFIG_CPU_BMIPS) += -march=mips << 182 << 183 cflags-$(CONFIG_CPU_LOONGSON2E) += \ << 184 $(call cc-option,-marc << 185 cflags-$(CONFIG_CPU_LOONGSON2F) += \ << 186 $(call cc-option,-marc << 187 # Some -march= flags enable MMI instructions, << 188 # support being enabled alongside -msoft-float << 189 cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc- << 190 cflags-$(CONFIG_CPU_LOONGSON64) += \ << 191 $(call cc-option,-marc << 192 cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-o << 193 << 194 cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(c << 195 cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(c << 196 cflags-$(CONFIG_CPU_DADDI_WORKAROUNDS) += $(c << 197 ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS << 198 cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa,-m << 199 cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa,- << 200 endif << 201 << 202 # << 203 # Some versions of binutils, not currently mai << 204 # an -mfix-loongson3-llsc flag which emits a s << 205 # to work around a CPU bug (see __SYNC_loongso << 206 # description). << 207 # << 208 # We disable this in order to prevent the asse << 209 # instruction that labels refer to, ie. if we << 210 # << 211 # 1: ll v0, 0(a0) << 212 # << 213 # ...then with the assembler fix applied the l << 214 # instruction inserted by the assembler, and i << 215 # exception table the table would no longer co << 216 # instruction. << 217 # << 218 # Avoid this by explicitly disabling that asse << 219 # binutils does not merge support for the flag << 220 # this later - for now it ensures vendor toolc << 221 # << 222 cflags-$(CONFIG_CPU_LOONGSON64) += $(call as-o << 223 << 224 # For smartmips configurations, there are hund << 225 # in assembly and header files. smartmips is o << 226 # and there is no support for 64-bit. Various << 227 # similar directives in the kernel will spam t << 228 # Warning: the `smartmips' extension requires << 229 # or << 230 # Warning: the 64-bit MIPS architecture does n << 231 # Pass -Wa,--no-warn to disable all assembler << 232 # been fixed properly. << 233 mips-cflags := $(c << 234 ifeq ($(CONFIG_CPU_HAS_SMARTMIPS),y) << 235 smartmips-ase := $(c << 236 cflags-$(smartmips-ase) += -ms << 237 endif << 238 ifeq ($(CONFIG_CPU_MICROMIPS),y) << 239 micromips-ase := $(c << 240 cflags-$(micromips-ase) += -mm << 241 endif << 242 ifeq ($(CONFIG_CPU_HAS_MSA),y) << 243 toolchain-msa := $(c << 244 cflags-$(toolchain-msa) += -DT << 245 endif << 246 toolchain-virt := $(c << 247 cflags-$(toolchain-virt) += -DT << 248 # For -mmicromips, use -Wa,-fatal-warnings to << 249 # only warns << 250 xpa-cflags-y := $(m << 251 xpa-cflags-$(micromips-ase) += -mm << 252 toolchain-xpa := $(c << 253 cflags-$(toolchain-xpa) += -DT << 254 toolchain-crc := $(c << 255 cflags-$(toolchain-crc) += -DT << 256 toolchain-dsp := $(c << 257 cflags-$(toolchain-dsp) += -DT << 258 toolchain-ginv := $(c << 259 cflags-$(toolchain-ginv) += -DT << 260 << 261 # << 262 # Firmware support << 263 # << 264 libs-$(CONFIG_FW_ARC) += arch/mips/f << 265 libs-$(CONFIG_FW_CFE) += arch/mips/f << 266 libs-$(CONFIG_FW_SNIPROM) += arch/mips/f << 267 libs-y += arch/mips/f << 268 404 269 # 405 # 270 # Kernel compression !! 406 # ITE 8172 eval board with QED 5231 CPU 271 # 407 # 272 ifdef CONFIG_SYS_SUPPORTS_ZBOOT !! 408 ifdef CONFIG_MIPS_ITE8172 273 COMPRESSION_FNAME = vmlinuz !! 409 LIBS += arch/mips/ite-boards/qed-4n-s01b/ite.o \ 274 else !! 410 arch/mips/ite-boards/generic/it8172.o 275 COMPRESSION_FNAME = vmlinux !! 411 SUBDIRS += arch/mips/ite-boards/generic arch/mips/ite-boards/qed-4n-s01b >> 412 LOADADDR := 0x80100000 276 endif 413 endif 277 414 278 # 415 # 279 # Board-dependent options and extra files !! 416 # MIPS Atlas board 280 # 417 # 281 include $(srctree)/arch/mips/Kbuild.platforms !! 418 ifdef CONFIG_MIPS_ATLAS >> 419 LIBS += arch/mips/mips-boards/atlas/atlas.o \ >> 420 arch/mips/mips-boards/generic/mipsboards.o >> 421 SUBDIRS += arch/mips/mips-boards/generic arch/mips/mips-boards/atlas >> 422 LOADADDR := 0x80100000 >> 423 endif 282 424 283 ifdef CONFIG_PHYSICAL_START !! 425 # 284 load-y = $(CO !! 426 # MIPS Malta board >> 427 # >> 428 ifdef CONFIG_MIPS_MALTA >> 429 LIBS += arch/mips/mips-boards/malta/malta.o \ >> 430 arch/mips/mips-boards/generic/mipsboards.o >> 431 SUBDIRS += arch/mips/mips-boards/malta arch/mips/mips-boards/generic >> 432 LOADADDR := 0x80100000 285 endif 433 endif 286 434 287 entry-y = $(shell $(ob !! 435 # 288 cflags-y += -I$(srctree !! 436 # MIPS SEAD board 289 drivers-$(CONFIG_PCI) += arch/mips/p !! 437 # 290 !! 438 ifdef CONFIG_MIPS_SEAD 291 # !! 439 LIBS += arch/mips/mips-boards/sead/sead.o \ 292 # Automatically detect the build format. By de !! 440 arch/mips/mips-boards/generic/mipsboards.o 293 # the elf format according to the load address !! 441 SUBDIRS += arch/mips/mips-boards/generic arch/mips/mips-boards/sead 294 # We can always force a build with a 64-bits s !! 442 LOADADDR := 0x80100000 295 # passing 'KBUILD_SYM32=no' option to the make << 296 # << 297 ifdef CONFIG_64BIT << 298 ifndef KBUILD_SYM32 << 299 ifeq ($(shell expr $(load-y) \< 0xffffffff << 300 KBUILD_SYM32 = $(call cc-option-yn, -msy << 301 endif << 302 endif << 303 << 304 ifeq ($(KBUILD_SYM32), y) << 305 cflags-$(KBUILD_SYM32) += -msym32 -DKBUILD << 306 else << 307 ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y) << 308 $(error CONFIG_CPU_DADDI_WORKAROUNDS uns << 309 endif << 310 endif << 311 endif << 312 << 313 # When linking a 32-bit executable the LLVM li << 314 # 32-bit load address that has been sign-exten << 315 # remove the upper 32 bits then, as it is safe << 316 # linkers. << 317 ifdef CONFIG_64BIT << 318 load-ld = $(load-y) << 319 else << 320 load-ld = $(subst 0xff << 321 endif 443 endif 322 444 323 KBUILD_AFLAGS += $(cflags-y) !! 445 # 324 KBUILD_CFLAGS += $(cflags-y) !! 446 # Momentum Ocelot board 325 KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(lo !! 447 # 326 KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoff !! 448 ifdef CONFIG_MOMENCO_OCELOT 327 !! 449 # The Ocelot setup.o must be linked early - it does the ioremap() for the 328 bootvars-y = VMLINUX_LOAD_ADDRESS=$(load- !! 450 # mips_io_port_base. 329 LINKER_LOAD_ADDRESS=$(load-l !! 451 CORE_FILES += arch/mips/gt64120/common/gt64120.o \ 330 VMLINUX_ENTRY_ADDRESS=$(entr !! 452 arch/mips/gt64120/momenco_ocelot/momenco_ocelot.o 331 PLATFORM="$(platform-y)" \ !! 453 SUBDIRS += arch/mips/gt64120/common arch/mips/gt64120/momenco_ocelot 332 ITS_INPUTS="$(its-y)" !! 454 LOADADDR := 0x80100000 333 ifdef CONFIG_32BIT !! 455 endif 334 bootvars-y += ADDR_BITS=32 !! 456 335 endif !! 457 # 336 ifdef CONFIG_64BIT !! 458 # Momentum Ocelot-G board 337 bootvars-y += ADDR_BITS=64 !! 459 # 338 endif !! 460 ifdef CONFIG_MOMENCO_OCELOT_G 339 !! 461 # The Ocelot-G setup.o must be linked early - it does the ioremap() for the 340 # This is required to get dwarf unwinding tabl !! 462 # mips_io_port_base. 341 # instead of .eh_frame so we don't discard the !! 463 CORE_FILES += arch/mips/momentum/ocelot_g/ocelot_g.o 342 KBUILD_CFLAGS += -fno-asynchronous-unwind-tabl !! 464 SUBDIRS += arch/mips/momentum/ocelot_g 343 !! 465 LOADADDR := 0x80100000 344 KBUILD_LDFLAGS += -m $(ld-emul) !! 466 endif 345 !! 467 346 ifdef need-compiler !! 468 # 347 CHECKFLAGS += $(shell $(CC) $(KBUILD_CPPFLAGS) !! 469 # Momentum Ocelot-C and -CS boards 348 grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL !! 470 # 349 sed -e "s/^\#define /-D'/" -e "s/ /'=' !! 471 ifdef CONFIG_MOMENCO_OCELOT_C 350 endif !! 472 # The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the 351 !! 473 # mips_io_port_base. 352 OBJCOPYFLAGS += --remove-section=.r !! 474 CORE_FILES += arch/mips/momentum/ocelot_c/ocelot_c.o 353 !! 475 SUBDIRS += arch/mips/momentum/ocelot_c 354 libs-y += arch/mips/lib/ !! 476 LOADADDR := 0x80100000 355 libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/ma !! 477 endif 356 !! 478 357 drivers-y += arch/mips/c !! 479 ifdef CONFIG_PMC_BIG_SUR 358 !! 480 CORE_FILES += arch/mips/pmc-sierra/big_sur/big_sur.o 359 # suspend and hibernation support !! 481 SUBDIRS += arch/mips/pmc-sierra/big_sur 360 drivers-$(CONFIG_PM) += arch/mips/power/ !! 482 LOADADDR := 0x80100000 361 !! 483 endif 362 # boot image targets (arch/mips/boot/) !! 484 363 boot-y := vmlinux.bin !! 485 ifdef CONFIG_PMC_STRETCH 364 boot-y += vmlinux.ecoff !! 486 CORE_FILES += arch/mips/pmc-sierra/stretch/stretch.o 365 boot-y += vmlinux.srec !! 487 SUBDIRS += arch/mips/pmc-sierra/stretch 366 boot-y += uImage !! 488 LOADADDR := 0x80200000 367 boot-y += uImage.bin !! 489 endif 368 boot-y += uImage.bz2 !! 490 369 boot-y += uImage.gz !! 491 ifdef CONFIG_MOMENCO_JAGUAR_ATX 370 boot-y += uImage.lzma !! 492 LIBS += arch/mips/momentum/jaguar_atx/jaguar_atx.o 371 boot-y += uImage.lzo !! 493 SUBDIRS += arch/mips/momentum/jaguar_atx 372 boot-y += vmlinux.itb !! 494 ifdef CONFIG_JAGUAR_DMALOW 373 boot-y += vmlinux.gz.itb !! 495 LOADADDR := 0x88000000 374 boot-y += vmlinux.bz2.itb << 375 boot-y += vmlinux.lzma.itb << 376 boot-y += vmlinux.lzo.itb << 377 << 378 # compressed boot image targets (arch/mips/boo << 379 bootz-y := vmlinuz << 380 bootz-y += vmlinuz.bin << 381 bootz-y += vmlinuz.ecoff << 382 bootz-y += vmlinuz.srec << 383 bootz-y += uzImage.bin << 384 bootz-y += vmlinuz.itb << 385 << 386 # << 387 # Some machines like the Indy need 32-bit ELF << 388 # Other need ECOFF, so we build a 32-bit ELF b << 389 # convert to ECOFF using elf2ecoff. << 390 # << 391 quiet_cmd_32 = OBJCOPY $@ << 392 cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $( << 393 vmlinux.32: vmlinux << 394 $(call cmd,32) << 395 << 396 # << 397 # The 64-bit ELF tools are pretty broken so at << 398 # ELF files from 32-bit files by conversion. << 399 # << 400 quiet_cmd_64 = OBJCOPY $@ << 401 cmd_64 = $(OBJCOPY) -O $(64bit-bfd) $( << 402 vmlinux.64: vmlinux << 403 $(call cmd,64) << 404 << 405 all: $(all-y) $(KBUILD_DTBS) << 406 << 407 # boot << 408 $(boot-y): $(vmlinux-32) FORCE << 409 $(Q)$(MAKE) $(build)=arch/mips/boot VM << 410 $(bootvars-y) arch/mips/boot/$ << 411 << 412 ifdef CONFIG_SYS_SUPPORTS_ZBOOT << 413 # boot/compressed << 414 $(bootz-y): $(vmlinux-32) FORCE << 415 $(Q)$(MAKE) $(build)=arch/mips/boot/co << 416 $(bootvars-y) 32bit-bfd=$(32bi << 417 else 496 else 418 vmlinuz: FORCE !! 497 LOADADDR := 0x80100000 419 @echo ' CONFIG_SYS_SUPPORTS_ZBOOT is !! 498 endif 420 /bin/false !! 499 endif 421 endif !! 500 422 !! 501 # 423 !! 502 # NEC DDB Vrc-5074 424 CLEAN_FILES += vmlinux.32 vmlinux.64 !! 503 # 425 !! 504 ifdef CONFIG_DDB5074 426 # device-trees !! 505 SUBDIRS += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5074 427 core-y += arch/mips/boot/dts/ !! 506 LIBS += arch/mips/ddb5xxx/common/ddb5xxx.o arch/mips/ddb5xxx/ddb5074/ddb5074.o 428 !! 507 LOADADDR := 0x80080000 429 archprepare: !! 508 endif 430 ifdef CONFIG_MIPS32_N32 !! 509 431 @$(kecho) ' Checking missing-syscalls !! 510 # 432 $(Q)$(MAKE) $(build)=. missing-syscall !! 511 # NEC DDB Vrc-5476 433 endif !! 512 # 434 ifdef CONFIG_MIPS32_O32 !! 513 ifdef CONFIG_DDB5476 435 @$(kecho) ' Checking missing-syscalls !! 514 SUBDIRS += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5476 436 $(Q)$(MAKE) $(build)=. missing-syscall !! 515 LIBS += arch/mips/ddb5xxx/common/ddb5xxx.o \ 437 endif !! 516 arch/mips/ddb5xxx/ddb5476/ddb5476.o 438 !! 517 LOADADDR := 0x80080000 439 install: !! 518 endif 440 $(Q)install -D -m 755 vmlinux $(INSTAL !! 519 441 ifdef CONFIG_SYS_SUPPORTS_ZBOOT !! 520 # 442 $(Q)install -D -m 755 vmlinuz $(INSTAL !! 521 # NEC DDB Vrc-5477 443 endif !! 522 # 444 $(Q)install -D -m 644 .config $(INSTAL !! 523 ifdef CONFIG_DDB5477 445 $(Q)install -D -m 644 System.map $(INS !! 524 SUBDIRS += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5477 446 !! 525 LIBS += arch/mips/ddb5xxx/common/ddb5xxx.o \ 447 archheaders: !! 526 arch/mips/ddb5xxx/ddb5477/ddb5477.o 448 $(Q)$(MAKE) $(build)=arch/mips/kernel/ !! 527 LOADADDR := 0x80100000 449 !! 528 endif 450 define archhelp !! 529 451 echo ' install - install !! 530 ifdef CONFIG_LASAT 452 echo ' vmlinux.ecoff - ECOFF b !! 531 LIBS += arch/mips/lasat/lasatkern.o 453 echo ' vmlinux.bin - Raw bin !! 532 SUBDIRS += arch/mips/lasat 454 echo ' vmlinux.srec - SREC bo !! 533 LOADADDR += 0x80000000 455 echo ' vmlinux.32 - 64-bit !! 534 endif 456 echo ' vmlinuz - Compres !! 535 # 457 echo ' vmlinuz.ecoff - ECOFF z !! 536 # NEC Osprey (vr4181) board 458 echo ' vmlinuz.bin - Raw bin !! 537 # 459 echo ' vmlinuz.srec - SREC zb !! 538 ifdef CONFIG_NEC_OSPREY 460 echo ' uImage - U-Boot !! 539 SUBDIRS += arch/mips/vr4181/common arch/mips/vr4181/osprey 461 echo ' uImage.bin - U-Boot !! 540 LIBS += arch/mips/vr4181/common/vr4181.o \ 462 echo ' uImage.bz2 - U-Boot !! 541 arch/mips/vr4181/osprey/osprey.o 463 echo ' uImage.gz - U-Boot !! 542 LOADADDR := 0x80002000 464 echo ' uImage.lzma - U-Boot !! 543 endif 465 echo ' uImage.lzo - U-Boot !! 544 466 echo ' uzImage.bin - U-Boot !! 545 # 467 echo !! 546 # NEC Eagle/Hawk (VR4122/VR4131) board 468 echo ' These will be default as appro !! 547 # 469 echo !! 548 ifdef CONFIG_NEC_EAGLE 470 echo ' If you are targeting a system !! 549 SUBDIRS += arch/mips/vr41xx/common \ 471 echo ' configure the kernel for a giv !! 550 arch/mips/vr41xx/nec-eagle 472 echo !! 551 CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 473 echo ' {micro32,32,64}{r1,r2,r6}{el,} !! 552 arch/mips/vr41xx/nec-eagle/eagle.o 474 echo !! 553 LOADADDR := 0x80000000 475 echo ' Where BOARDS is some subset of !! 554 endif 476 for board in $(sort $(BOARDS)); do ech !! 555 477 echo !! 556 # 478 echo ' Specifically the following gen !! 557 # ZAO Networks Capcella (VR4131) 479 echo ' supported:' !! 558 # 480 echo !! 559 ifdef CONFIG_ZAO_CAPCELLA 481 $(foreach cfg,$(generic_defconfigs), !! 560 SUBDIRS += arch/mips/vr41xx/common \ 482 printf " %-24s - Build generic kern !! 561 arch/mips/vr41xx/zao-capcella 483 echo !! 562 CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 484 echo ' The following legacy default c !! 563 arch/mips/vr41xx/zao-capcella/capcella.o 485 echo ' generic and can still be used: !! 564 LOADADDR := 0x80000000 486 echo !! 565 endif 487 $(foreach cfg,$(sort $(legacy_defconfi !! 566 488 printf " %-24s - Build $($(cfg)-y)\ !! 567 # 489 echo !! 568 # Victor MP-C303/304 (VR4122) 490 echo ' Otherwise, the following defau !! 569 # 491 endef !! 570 ifdef CONFIG_VICTOR_MPC30X 492 !! 571 SUBDIRS += arch/mips/vr41xx/common \ 493 generic_config_dir = $(srctree)/arch/$(ARCH)/c !! 572 arch/mips/vr41xx/victor-mpc30x 494 generic_defconfigs := !! 573 CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 495 !! 574 arch/mips/vr41xx/victor-mpc30x/mpc30x.o 496 # !! 575 LOADADDR := 0x80001000 497 # If the user generates a generic kernel confi !! 576 endif 498 # list of boards to include the config fragmen !! 577 499 # available board config fragments. !! 578 # 500 # !! 579 # IBM WorkPad z50 (VR4121) 501 ifeq ($(BOARDS),) !! 580 # 502 BOARDS = $(patsubst board-%.config,%,$(notdir !! 581 ifdef CONFIG_IBM_WORKPAD 503 endif !! 582 SUBDIRS += arch/mips/vr41xx/common \ 504 !! 583 arch/mips/vr41xx/ibm-workpad 505 # !! 584 CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 506 # Generic kernel configurations which merge ge !! 585 arch/mips/vr41xx/ibm-workpad/workpad.o 507 # appropriate config fragments from arch/mips/ !! 586 LOADADDR += 0x80004000 508 # the ability to easily configure the kernel f !! 587 endif 509 # endianness & set of boards without duplicati !! 588 510 # hundreds of defconfig files. !! 589 # 511 # !! 590 # CASIO CASSIPEIA E-55/65 (VR4111) 512 define gen_generic_defconfigs !! 591 # 513 $(foreach bits,$(1),$(foreach rev,$(2),$(forea !! 592 ifdef CONFIG_CASIO_E55 514 target := $(bits)$(rev)$(filter el,$(endian))_ !! 593 SUBDIRS += arch/mips/vr41xx/common \ 515 generic_defconfigs += $$(target) !! 594 arch/mips/vr41xx/casio-e55 516 $$(target): $(generic_config_dir)/$(bits)$(rev !! 595 CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 517 $$(target): $(generic_config_dir)/$(endian).co !! 596 arch/mips/vr41xx/casio-e55/e55.o 518 ))) !! 597 LOADADDR += 0x80004000 519 endef !! 598 endif 520 !! 599 521 $(eval $(call gen_generic_defconfigs,32 64,r1 !! 600 # 522 $(eval $(call gen_generic_defconfigs,micro32,r !! 601 # TANBAC TB0226 Mbase (VR4131) 523 !! 602 # 524 define describe_generic_defconfig !! 603 ifdef CONFIG_TANBAC_TB0226 525 $(subst 32r,MIPS32 r,$(subst 64r,MIPS64 r,$(su !! 604 SUBDIRS += arch/mips/vr41xx/common \ 526 endef !! 605 arch/mips/vr41xx/tanbac-tb0226 527 !! 606 CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 528 .PHONY: $(generic_defconfigs) !! 607 arch/mips/vr41xx/tanbac-tb0226/tb0226.o 529 $(generic_defconfigs): !! 608 LOADADDR := 0x80000000 530 $(Q)$(CONFIG_SHELL) $(srctree)/scripts !! 609 endif 531 -m -O $(objtree) $(srctree)/ar !! 610 532 grep -Ev '^#' !! 611 # 533 $(Q)cp $(KCONFIG_CONFIG) $(objtree)/.c !! 612 # TANBAC TB0229 (VR4131DIMM) 534 $(Q)$(MAKE) -f $(srctree)/Makefile old !! 613 # 535 KCONFIG_CONFIG=$(objtree)/.con !! 614 ifdef CONFIG_TANBAC_TB0229 536 $(Q)$(CONFIG_SHELL) $(srctree)/arch/$( !! 615 SUBDIRS += arch/mips/vr41xx/common \ 537 $(srctree) $(objtree) $(objtre !! 616 arch/mips/vr41xx/tanbac-tb0229 538 "$(origin BOARDS)" $(BOARDS) !! 617 CORE_FILES += arch/mips/vr41xx/common/vr41xx.o \ 539 $(Q)$(MAKE) -f $(srctree)/Makefile old !! 618 arch/mips/vr41xx/tanbac-tb0229/tb0229.o 540 !! 619 LOADADDR := 0x80000000 541 # !! 620 endif 542 # Prevent generic merge_config rules attemptin !! 621 543 # !! 622 # 544 $(generic_config_dir)/%.config: ; !! 623 # Philips Nino 545 !! 624 # 546 # !! 625 ifdef CONFIG_NINO 547 # Prevent direct use of generic_defconfig, whi !! 626 CORE_FILES += arch/mips/philips/nino/nino.o 548 # basis of the various ISA-specific targets ge !! 627 SUBDIRS += arch/mips/philips/nino 549 # !! 628 LOADADDR := 0x80000000 550 .PHONY: generic_defconfig !! 629 endif 551 generic_defconfig: !! 630 552 $(Q)echo "generic_defconfig is not int !! 631 # 553 $(Q)echo "used via an ISA-specific tar !! 632 # SGI IP22 (Indy/Indigo2) 554 $(Q)echo !! 633 # 555 $(Q)for cfg in $(generic_defconfigs); !! 634 ifdef CONFIG_SGI_IP22 556 $(Q)echo !! 635 CORE_FILES += arch/mips/sgi-ip22/ip22-kern.o 557 $(Q)false !! 636 LIBS += arch/mips/arc/arclib.a 558 !! 637 SUBDIRS += arch/mips/sgi-ip22 arch/mips/arc 559 # !! 638 # 560 # Legacy defconfig compatibility - these targe !! 639 # Set LOADADDR to >= 0x88069000 if you want to leave space for symmon, 561 # now that the boards have been converted to u !! 640 # 0x88002000 for production kernels. Note that the value must be 562 # wrappers around the generic rules above. !! 641 # 8kb aligned or the handling of the current variable will break. 563 # !! 642 # 564 legacy_defconfigs += ocelot_defc !! 643 LOADADDR := 0x88002000 565 ocelot_defconfig-y := 32r2el_defc !! 644 endif 566 !! 645 567 legacy_defconfigs += sead3_defco !! 646 # 568 sead3_defconfig-y := 32r2el_defc !! 647 # Sibyte SB1250 SOC and Broadcom (SiByte) BCM112x SOCs 569 !! 648 # 570 legacy_defconfigs += sead3micro_ !! 649 ifneq ($(CONFIG_SIBYTE_SB1250)$(CONFIG_SIBYTE_BCM112X),) 571 sead3micro_defconfig-y := micro32r2el !! 650 # This is a LIB so that it links at the end, and initcalls are later 572 !! 651 # the sequence; but it is built as an object so that modules don't get 573 legacy_defconfigs += xilfpga_def !! 652 # removed (as happens, even if they have __initcall/module_init) 574 xilfpga_defconfig-y := 32r2el_defc !! 653 LIBS += arch/mips/sibyte/sb1250/sb1250.o 575 !! 654 SUBDIRS += arch/mips/sibyte/sb1250 576 legacy_defconfigs += pistachio_d !! 655 LOADADDR := 0x80100000 577 pistachio_defconfig-y := 32r2el_defc !! 656 endif 578 !! 657 579 .PHONY: $(legacy_defconfigs) !! 658 # 580 $(legacy_defconfigs): !! 659 # Sibyte boards: 581 $(Q)$(MAKE) -f $(srctree)/Makefile $($ !! 660 # >> 661 # BCM91250A (SWARM), >> 662 # BCM91250E (Sentosa), >> 663 # BCM91120C (CRhine), >> 664 # BCM91120x (Carmel), >> 665 # BCM91125C (CRhone), >> 666 # BCM91125E (Rhone). >> 667 # >> 668 ifdef CONFIG_SIBYTE_BOARD >> 669 LIBS += arch/mips/sibyte/swarm/sbswarm.a >> 670 SUBDIRS += arch/mips/sibyte/swarm >> 671 endif >> 672 >> 673 # >> 674 # Sibyte CFE firmware >> 675 # >> 676 ifdef CONFIG_SIBYTE_CFE >> 677 LIBS += arch/mips/sibyte/cfe/cfe.a >> 678 SUBDIRS += arch/mips/sibyte/cfe >> 679 endif >> 680 >> 681 # >> 682 # SNI RM200 PCI >> 683 # >> 684 ifdef CONFIG_SNI_RM200_PCI >> 685 CORE_FILES += arch/mips/sni/sni.o >> 686 SUBDIRS += arch/mips/sni arch/mips/arc >> 687 LIBS += arch/mips/arc/arclib.a >> 688 LOADADDR := 0x80080000 >> 689 endif >> 690 >> 691 # >> 692 # Toshiba JMR-TX3927 board >> 693 # >> 694 ifdef CONFIG_TOSHIBA_JMR3927 >> 695 CORE_FILES += arch/mips/jmr3927/rbhma3100/jmr3927.o \ >> 696 arch/mips/jmr3927/common/tx3927.o >> 697 SUBDIRS += arch/mips/jmr3927/rbhma3100 arch/mips/jmr3927/common >> 698 LOADADDR := 0x80050000 >> 699 endif >> 700 >> 701 # >> 702 # Toshiba RBTX4927 board or >> 703 # Toshiba RBTX4937 board >> 704 # >> 705 ifdef CONFIG_TOSHIBA_RBTX4927 >> 706 MIPS = arch/mips >> 707 CEC = tx4927 >> 708 COMMON = $(MIPS)/$(CEC)/common >> 709 BOARD = $(MIPS)/$(CEC)/toshiba_rbtx4927 >> 710 LIBS += $(BOARD)/toshiba_rbtx4927.o $(COMMON)/tx4927.o >> 711 SUBDIRS += $(BOARD) $(COMMON) >> 712 LOADADDR += 0x80020000 >> 713 endif >> 714 >> 715 # >> 716 # Choosing incompatible machines durings configuration will result in >> 717 # error messages during linking. Select a default linkscript if >> 718 # none has been choosen above. >> 719 # >> 720 vmlinux: arch/$(ARCH)/ld.script >> 721 >> 722 arch/$(ARCH)/ld.script: arch/$(ARCH)/ld.script.in arch/$(ARCH)/Makefile >> 723 sed -e 's/@@LOADADDR@@/$(LOADADDR)/' <$< >$@ >> 724 LINKFLAGS += -T arch/$(ARCH)/ld.script >> 725 >> 726 HEAD := arch/mips/kernel/head.o arch/mips/kernel/init_task.o >> 727 >> 728 SUBDIRS := $(addprefix arch/mips/, tools) $(SUBDIRS) $(addprefix arch/mips/, kernel mm lib) >> 729 CORE_FILES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(CORE_FILES) >> 730 LIBS := arch/mips/lib/lib.a $(LIBS) >> 731 >> 732 ifdef CONFIG_BAGET_MIPS >> 733 >> 734 BAGETBOOT = $(MAKE) -C arch/$(ARCH)/baget >> 735 >> 736 balo: vmlinux >> 737 $(BAGETBOOT) balo >> 738 >> 739 endif >> 740 >> 741 ifdef CONFIG_MIPS_EV64120 >> 742 gboot: vmlinux >> 743 $(MAKE) -C arch/$(ARCH)/galileo-boards/ev64120/compressed >> 744 endif >> 745 >> 746 ifdef CONFIG_LASAT >> 747 rom.bin rom.sw: vmlinux >> 748 $(MAKE) -C arch/$(ARCH)/lasat/image $@ >> 749 endif >> 750 >> 751 boot: mips-boot >> 752 >> 753 mips-boot: vmlinux >> 754 @$(MAKEBOOT) boot >> 755 >> 756 vmlinux.ecoff: vmlinux >> 757 @$(MAKEBOOT) $@ >> 758 >> 759 vmlinux.srec: vmlinux >> 760 @$(MAKEBOOT) $@ >> 761 >> 762 archclean: >> 763 @$(MAKEBOOT) clean >> 764 rm -f arch/$(ARCH)/ld.script >> 765 $(MAKE) -C arch/$(ARCH)/tools clean >> 766 $(MAKE) -C arch/mips/baget clean >> 767 $(MAKE) -C arch/mips/lasat clean >> 768 >> 769 archmrproper: >> 770 @$(MAKEBOOT) mrproper >> 771 $(RM) $(TOPDIR)/include/asm-$(ARCH)/offset.h >> 772 $(MAKE) -C arch/$(ARCH)/tools mrproper >> 773 >> 774 archdep: >> 775 if [ ! -f $(TOPDIR)/include/asm-$(ARCH)/offset.h ]; then \ >> 776 touch $(TOPDIR)/include/asm-$(ARCH)/offset.h; \ >> 777 fi; >> 778 @$(MAKEBOOT) dep
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.