]>
Commit | Line | Data |
---|---|---|
14cf11af PM |
1 | # This file is included by the global makefile so that you can add your own |
2 | # architecture-specific flags and dependencies. Remember to do have actions | |
3 | # for "archclean" and "archdep" for cleaning up and making dependencies for | |
4 | # this architecture. | |
5 | # | |
6 | # This file is subject to the terms and conditions of the GNU General Public | |
7 | # License. See the file "COPYING" in the main directory of this archive | |
8 | # for more details. | |
9 | # | |
10 | # Copyright (C) 1994 by Linus Torvalds | |
11 | # Changes for PPC by Gary Thomas | |
12 | # Rewritten by Cort Dougan and Paul Mackerras | |
13 | # | |
14 | ||
14cf11af PM |
15 | HAS_BIARCH := $(call cc-option-yn, -m32) |
16 | ||
14cf11af PM |
17 | # Set default 32 bits cross compilers for vdso and boot wrapper |
18 | CROSS32_COMPILE ?= | |
19 | ||
20 | CROSS32CC := $(CROSS32_COMPILE)gcc | |
2bf11819 | 21 | CROSS32AR := $(CROSS32_COMPILE)ar |
14cf11af PM |
22 | |
23 | ifeq ($(HAS_BIARCH),y) | |
24 | ifeq ($(CROSS32_COMPILE),) | |
25 | CROSS32CC := $(CC) -m32 | |
43c9127d | 26 | KBUILD_ARFLAGS += --target=elf32-powerpc |
14cf11af PM |
27 | endif |
28 | endif | |
29 | ||
1976aef9 | 30 | export CROSS32CC CROSS32AR |
14cf11af | 31 | |
ca786f83 | 32 | ifeq ($(CROSS_COMPILE),) |
8a5abdf8 | 33 | KBUILD_DEFCONFIG := $(shell uname -m)_defconfig |
ca786f83 AB |
34 | else |
35 | KBUILD_DEFCONFIG := ppc64_defconfig | |
36 | endif | |
8a5abdf8 | 37 | |
94b212c2 | 38 | ifeq ($(CONFIG_PPC64),y) |
14cf11af PM |
39 | new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) |
40 | ||
41 | ifeq ($(new_nm),y) | |
42 | NM := $(NM) --synthetic | |
43 | endif | |
a0588015 | 44 | endif |
14cf11af | 45 | |
68201fbb ME |
46 | # BITS is used as extension for files which are available in a 32 bit |
47 | # and a 64 bit version to simplify shared Makefiles. | |
48 | # e.g.: obj-y += foo_$(BITS).o | |
49 | export BITS | |
50 | ||
51 | ifdef CONFIG_PPC64 | |
52 | BITS := 64 | |
53 | else | |
54 | BITS := 32 | |
14cf11af PM |
55 | endif |
56 | ||
57073e27 ME |
57 | machine-y = ppc |
58 | machine-$(CONFIG_PPC64) += 64 | |
59 | machine-$(CONFIG_CPU_LITTLE_ENDIAN) += le | |
60 | UTS_MACHINE := $(subst $(space),,$(machine-y)) | |
190554db | 61 | |
b40b2386 ME |
62 | # XXX This needs to be before we override LD below |
63 | ifdef CONFIG_PPC32 | |
64 | KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o | |
65 | else | |
66 | ifeq ($(call ld-ifversion, -ge, 225000000, y),y) | |
67 | # Have the linker provide sfpr if possible. | |
68 | # There is a corresponding test in arch/powerpc/lib/Makefile | |
69 | KBUILD_LDFLAGS_MODULE += --save-restore-funcs | |
70 | else | |
71 | KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o | |
72 | endif | |
73 | endif | |
74 | ||
d72b0801 | 75 | ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y) |
d72b0801 | 76 | override LD += -EL |
d72b0801 IM |
77 | LDEMULATION := lppc |
78 | GNUTARGET := powerpcle | |
79 | MULTIPLEWORD := -mno-multiple | |
d3d35d95 | 80 | KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect) |
d72b0801 | 81 | else |
d72b0801 IM |
82 | override LD += -EB |
83 | LDEMULATION := ppc | |
84 | GNUTARGET := powerpc | |
85 | MULTIPLEWORD := -mmultiple | |
86 | endif | |
87 | ||
4dc831aa | 88 | ifdef CONFIG_PPC64 |
cc23b972 | 89 | ifndef CONFIG_CC_IS_CLANG |
4dc831aa NP |
90 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1) |
91 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mcall-aixdesc) | |
92 | aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1) | |
93 | aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2 | |
94 | endif | |
cc23b972 | 95 | endif |
4dc831aa | 96 | |
164af597 | 97 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian |
4dc831aa | 98 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian) |
164af597 ME |
99 | ifneq ($(cc-name),clang) |
100 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align | |
101 | endif | |
102 | ||
103 | aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian) | |
104 | aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian | |
105 | ||
14cf11af | 106 | ifeq ($(HAS_BIARCH),y) |
68201fbb ME |
107 | override AS += -a$(BITS) |
108 | override LD += -m elf$(BITS)$(LDEMULATION) | |
109 | override CC += -m$(BITS) | |
43c9127d | 110 | KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET) |
14cf11af PM |
111 | endif |
112 | ||
9c5f7d39 SP |
113 | LDFLAGS_vmlinux-y := -Bstatic |
114 | LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie | |
115 | LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y) | |
83a092cf | 116 | LDFLAGS_vmlinux += $(call ld-option,--orphan-handling=warn) |
14cf11af | 117 | |
1fbe9cf2 AB |
118 | ifeq ($(CONFIG_PPC64),y) |
119 | ifeq ($(call cc-option-yn,-mcmodel=medium),y) | |
120 | # -mcmodel=medium breaks modules because it uses 32bit offsets from | |
121 | # the TOC pointer to create pointers where possible. Pointers into the | |
122 | # percpu data area are created by this method. | |
123 | # | |
124 | # The kernel module loader relocates the percpu data section from the | |
125 | # original location (starting with 0xd...) to somewhere in the base | |
126 | # kernel percpu data space (starting with 0xc...). We need a full | |
127 | # 64bit relocation for this to work, hence -mcmodel=large. | |
128 | KBUILD_CFLAGS_MODULE += -mcmodel=large | |
129 | else | |
130 | export NO_MINIMAL_TOC := -mno-minimal-toc | |
131 | endif | |
132 | endif | |
133 | ||
a50a862e | 134 | CFLAGS-$(CONFIG_PPC64) := $(call cc-option,-mtraceback=no) |
cc23b972 | 135 | ifndef CONFIG_CC_IS_CLANG |
721aeaa9 | 136 | ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y) |
238abecd | 137 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc)) |
721aeaa9 AB |
138 | AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2) |
139 | else | |
4dc831aa | 140 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) |
238abecd | 141 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc) |
4dc831aa | 142 | AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) |
721aeaa9 | 143 | endif |
cc23b972 | 144 | endif |
238abecd | 145 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc)) |
98679fb0 | 146 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) |
95459f64 JS |
147 | # Clang unconditionally reserves r2 on ppc32 and does not support the flag |
148 | # https://bugs.llvm.org/show_bug.cgi?id=39555 | |
149 | CFLAGS-$(CONFIG_PPC32) := $(call cc-option, -ffixed-r2) | |
150 | ||
151 | # Clang doesn't support -mmultiple / -mno-multiple | |
152 | # https://bugs.llvm.org/show_bug.cgi?id=39556 | |
153 | CFLAGS-$(CONFIG_PPC32) += $(call cc-option, $(MULTIPLEWORD)) | |
154 | ||
d23c6fb4 | 155 | |
01718ba6 | 156 | ifeq ($(CONFIG_PPC_BOOK3S_64),y) |
d23c6fb4 | 157 | CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4) |
3a849815 | 158 | CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4 |
01718ba6 SW |
159 | else |
160 | CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 | |
161 | endif | |
162 | ||
8c50b72a | 163 | ifdef CONFIG_MPROFILE_KERNEL |
b71c9ffb | 164 | ifeq ($(shell $(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__),OK) |
8c50b72a TD |
165 | CC_FLAGS_FTRACE := -pg -mprofile-kernel |
166 | KBUILD_CPPFLAGS += -DCC_USING_MPROFILE_KERNEL | |
167 | else | |
168 | # If the user asked for mprofile-kernel but the toolchain doesn't | |
169 | # support it, emit a warning and deliberately break the build later | |
170 | # with mprofile-kernel-not-supported. We would prefer to make this an | |
171 | # error right here, but then the user would never be able to run | |
172 | # oldconfig to change their configuration. | |
173 | $(warning Compiler does not support mprofile-kernel, set CONFIG_DISABLE_MPROFILE_KERNEL) | |
174 | CC_FLAGS_FTRACE := -mprofile-kernel-not-supported | |
175 | endif | |
176 | endif | |
177 | ||
d23c6fb4 AB |
178 | CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell) |
179 | CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4) | |
180 | CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5) | |
181 | CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) | |
182 | CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) | |
ff2e466a | 183 | CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8) |
d23c6fb4 | 184 | |
cbf8a358 TC |
185 | # Altivec option not allowed with e500mc64 in GCC. |
186 | ifeq ($(CONFIG_ALTIVEC),y) | |
187 | E5500_CPU := -mcpu=powerpc64 | |
188 | else | |
01718ba6 | 189 | E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) |
cbf8a358 | 190 | endif |
01718ba6 SW |
191 | CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU) |
192 | CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU)) | |
193 | ||
847f56b0 SW |
194 | ifeq ($(CONFIG_PPC32),y) |
195 | ifeq ($(CONFIG_PPC_E500MC),y) | |
196 | CFLAGS-y += $(call cc-option,-mcpu=e500mc,-mcpu=powerpc) | |
197 | else | |
198 | CFLAGS-$(CONFIG_E500) += $(call cc-option,-mcpu=8540 -msoft-float,-mcpu=powerpc) | |
199 | endif | |
200 | endif | |
201 | ||
7998eb3d GR |
202 | asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) |
203 | ||
204 | KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr) | |
58aedccb | 205 | KBUILD_AFLAGS += -Iarch/$(ARCH) $(AFLAGS-y) |
a50a862e AB |
206 | KBUILD_CFLAGS += $(call cc-option,-msoft-float) |
207 | KBUILD_CFLAGS += -pipe -Iarch/$(ARCH) $(CFLAGS-y) | |
a0f97e06 | 208 | CPP = $(CC) -E $(KBUILD_CFLAGS) |
14cf11af | 209 | |
68201fbb | 210 | CHECKFLAGS += -m$(BITS) -D__powerpc__ -D__powerpc$(BITS)__ |
62c2c5cf DA |
211 | ifdef CONFIG_CPU_BIG_ENDIAN |
212 | CHECKFLAGS += -D__BIG_ENDIAN__ | |
213 | else | |
214 | CHECKFLAGS += -D__LITTLE_ENDIAN__ | |
215 | endif | |
14cf11af | 216 | |
d5b35cff AP |
217 | ifeq ($(CONFIG_476FPE_ERR46),y) |
218 | KBUILD_LDFLAGS_MODULE += --ppc476-workaround \ | |
219 | -T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds | |
220 | endif | |
221 | ||
d23c6fb4 | 222 | # No AltiVec or VSX instructions when building kernel |
a0f97e06 | 223 | KBUILD_CFLAGS += $(call cc-option,-mno-altivec) |
d23c6fb4 | 224 | KBUILD_CFLAGS += $(call cc-option,-mno-vsx) |
d3f67fbb | 225 | |
0197cd2e | 226 | # No SPE instruction when building kernel |
ce400c01 | 227 | # (We use all available options to help semi-broken compilers) |
0197cd2e | 228 | KBUILD_CFLAGS += $(call cc-option,-mno-spe) |
ce400c01 | 229 | KBUILD_CFLAGS += $(call cc-option,-mspe=no) |
0197cd2e | 230 | |
14cf11af PM |
231 | # Enable unit-at-a-time mode when possible. It shrinks the |
232 | # kernel considerably. | |
a0f97e06 | 233 | KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) |
14cf11af | 234 | |
d0679c73 AK |
235 | # FIXME: the module load should be taught about the additional relocs |
236 | # generated by this. | |
237 | # revert to pre-gcc-4.4 behaviour of .eh_frame | |
238 | KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) | |
239 | ||
57647a4d BH |
240 | # Never use string load/store instructions as they are |
241 | # often slow when they are implemented at all | |
a50a862e | 242 | KBUILD_CFLAGS += $(call cc-option,-mno-string) |
14cf11af | 243 | |
f48b8296 | 244 | ifeq ($(CONFIG_6xx),y) |
a0f97e06 | 245 | KBUILD_CFLAGS += -mcpu=powerpc |
f48b8296 OH |
246 | endif |
247 | ||
7563dc64 | 248 | # Work around a gcc code-gen bug with -fno-omit-frame-pointer. |
606576ce | 249 | ifeq ($(CONFIG_FUNCTION_TRACER),y) |
2f0125c9 NP |
250 | # Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8 |
251 | # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44199 | |
252 | # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828 | |
253 | ifneq ($(cc-name),clang) | |
254 | KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog) | |
255 | endif | |
7563dc64 TB |
256 | endif |
257 | ||
14cf11af | 258 | cpu-as-$(CONFIG_4xx) += -Wa,-m405 |
9ddf0075 | 259 | cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) |
14cf11af | 260 | cpu-as-$(CONFIG_E200) += -Wa,-me200 |
1e228db7 JS |
261 | |
262 | # When using '-many -mpower4' gas will first try and find a matching power4 | |
263 | # mnemonic and failing that it will allow any valid mnemonic that GAS knows | |
264 | # about. GCC will pass -many to GAS when assembling, clang does not. | |
265 | cpu-as-$(CONFIG_PPC_BOOK3S_64) += -Wa,-mpower4 -Wa,-many | |
eb536b39 | 266 | cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc) |
14cf11af | 267 | |
222d394d | 268 | KBUILD_AFLAGS += $(cpu-as-y) |
a0f97e06 | 269 | KBUILD_CFLAGS += $(cpu-as-y) |
14cf11af | 270 | |
164af597 ME |
271 | KBUILD_AFLAGS += $(aflags-y) |
272 | KBUILD_CFLAGS += $(cflags-y) | |
273 | ||
68201fbb | 274 | head-y := arch/powerpc/kernel/head_$(BITS).o |
968159c0 | 275 | head-$(CONFIG_PPC_8xx) := arch/powerpc/kernel/head_8xx.o |
15f6527e | 276 | head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o |
14cf11af PM |
277 | head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o |
278 | head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o | |
279 | ||
9994a338 | 280 | head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o |
14cf11af | 281 | head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o |
e821ea70 | 282 | head-$(CONFIG_ALTIVEC) += arch/powerpc/kernel/vector.o |
5ac47f7a | 283 | head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += arch/powerpc/kernel/prom_init.o |
14cf11af | 284 | |
daec962e | 285 | core-y += arch/powerpc/kernel/ \ |
daec962e PM |
286 | arch/powerpc/mm/ \ |
287 | arch/powerpc/lib/ \ | |
288 | arch/powerpc/sysdev/ \ | |
1a3d1fc2 | 289 | arch/powerpc/platforms/ \ |
0ca87f05 | 290 | arch/powerpc/math-emu/ \ |
323a6bf1 | 291 | arch/powerpc/crypto/ \ |
0ca87f05 | 292 | arch/powerpc/net/ |
f78541dc | 293 | core-$(CONFIG_XMON) += arch/powerpc/xmon/ |
bbf45ba5 | 294 | core-$(CONFIG_KVM) += arch/powerpc/kvm/ |
f2699491 | 295 | core-$(CONFIG_PERF_EVENTS) += arch/powerpc/perf/ |
0d976313 | 296 | core-$(CONFIG_KEXEC_FILE) += arch/powerpc/purgatory/ |
14cf11af PM |
297 | |
298 | drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ | |
299 | ||
135f0b17 | 300 | # Default to zImage, override when needed |
25431333 | 301 | all: zImage |
14cf11af | 302 | |
e32e78c5 | 303 | # With make 3.82 we cannot mix normal and wildcard targets |
fc5ccb8f | 304 | BOOT_TARGETS1 := zImage zImage.initrd uImage vmlinux.strip |
11eab297 | 305 | BOOT_TARGETS2 := zImage% dtbImage% treeImage.% cuImage.% simpleImage.% uImage.% |
cabb5587 | 306 | |
e32e78c5 | 307 | PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2) |
cabb5587 | 308 | |
94b212c2 | 309 | boot := arch/$(ARCH)/boot |
14cf11af | 310 | |
e32e78c5 | 311 | $(BOOT_TARGETS1): vmlinux |
1196d7aa | 312 | $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
e32e78c5 | 313 | $(BOOT_TARGETS2): vmlinux |
1196d7aa | 314 | $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
e32e78c5 SR |
315 | |
316 | ||
317 | bootwrapper_install: | |
1196d7aa | 318 | $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
773f76b1 | 319 | |
8662d0bc | 320 | %.dtb: scripts |
1196d7aa | 321 | $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
14cf11af | 322 | |
ea4d1a87 CB |
323 | # Used to create 'merged defconfigs' |
324 | # To use it $(call) it with the first argument as the base defconfig | |
325 | # and the second argument as a space separated list of .config files to merge, | |
326 | # without the .config suffix. | |
327 | define merge_into_defconfig | |
328 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ | |
329 | -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \ | |
330 | $(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config) | |
331 | +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig | |
332 | endef | |
333 | ||
334 | PHONY += pseries_le_defconfig | |
335 | pseries_le_defconfig: | |
336 | $(call merge_into_defconfig,pseries_defconfig,le) | |
337 | ||
2adc48a6 ME |
338 | PHONY += ppc64le_defconfig |
339 | ppc64le_defconfig: | |
340 | $(call merge_into_defconfig,ppc64_defconfig,le) | |
341 | ||
3603c52f ME |
342 | PHONY += powernv_be_defconfig |
343 | powernv_be_defconfig: | |
344 | $(call merge_into_defconfig,powernv_defconfig,be) | |
345 | ||
44d54014 SW |
346 | PHONY += mpc85xx_defconfig |
347 | mpc85xx_defconfig: | |
348 | $(call merge_into_defconfig,mpc85xx_basic_defconfig,\ | |
349 | 85xx-32bit 85xx-hw fsl-emb-nonhw) | |
350 | ||
351 | PHONY += mpc85xx_smp_defconfig | |
352 | mpc85xx_smp_defconfig: | |
353 | $(call merge_into_defconfig,mpc85xx_basic_defconfig,\ | |
354 | 85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw) | |
355 | ||
356 | PHONY += corenet32_smp_defconfig | |
357 | corenet32_smp_defconfig: | |
358 | $(call merge_into_defconfig,corenet_basic_defconfig,\ | |
e0b80f00 | 359 | 85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw dpaa) |
44d54014 SW |
360 | |
361 | PHONY += corenet64_smp_defconfig | |
362 | corenet64_smp_defconfig: | |
363 | $(call merge_into_defconfig,corenet_basic_defconfig,\ | |
e0b80f00 | 364 | 85xx-64bit 85xx-smp altivec 85xx-hw fsl-emb-nonhw dpaa) |
44d54014 | 365 | |
43de32c5 AIB |
366 | PHONY += mpc86xx_defconfig |
367 | mpc86xx_defconfig: | |
368 | $(call merge_into_defconfig,mpc86xx_basic_defconfig,\ | |
369 | 86xx-hw fsl-emb-nonhw) | |
370 | ||
371 | PHONY += mpc86xx_smp_defconfig | |
372 | mpc86xx_smp_defconfig: | |
373 | $(call merge_into_defconfig,mpc86xx_basic_defconfig,\ | |
374 | 86xx-smp 86xx-hw fsl-emb-nonhw) | |
375 | ||
14cf11af | 376 | define archhelp |
70bf0333 GL |
377 | @echo '* zImage - Build default images selected by kernel config' |
378 | @echo ' zImage.* - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)' | |
379 | @echo ' uImage - U-Boot native image format' | |
380 | @echo ' cuImage.<dt> - Backwards compatible U-Boot image for older' | |
381 | @echo ' versions which do not support device trees' | |
382 | @echo ' dtbImage.<dt> - zImage with an embedded device tree blob' | |
383 | @echo ' simpleImage.<dt> - Firmware independent image.' | |
384 | @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)' | |
14cf11af | 385 | @echo ' install - Install kernel using' |
caa27b66 SR |
386 | @echo ' (your) ~/bin/$(INSTALLKERNEL) or' |
387 | @echo ' (distribution) /sbin/$(INSTALLKERNEL) or' | |
14cf11af | 388 | @echo ' install to $$(INSTALL_PATH) and run lilo' |
437a58db | 389 | @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' |
70bf0333 GL |
390 | @echo '' |
391 | @echo ' Targets with <dt> embed a device tree blob inside the image' | |
392 | @echo ' These targets support board with firmware that does not' | |
393 | @echo ' support passing a device tree directly. Replace <dt> with the' | |
394 | @echo ' name of a dts file from the arch/$(ARCH)/boot/dts/ directory' | |
395 | @echo ' (minus the .dts extension).' | |
14cf11af PM |
396 | endef |
397 | ||
3f85d63e | 398 | install: |
25431333 | 399 | $(Q)$(MAKE) $(build)=$(boot) install |
928370c6 | 400 | |
8150caad RM |
401 | vdso_install: |
402 | ifeq ($(CONFIG_PPC64),y) | |
403 | $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@ | |
404 | endif | |
248e5d5e | 405 | ifdef CONFIG_VDSO32 |
8150caad | 406 | $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@ |
248e5d5e | 407 | endif |
8150caad | 408 | |
14cf11af | 409 | archclean: |
a3a9e99e | 410 | $(Q)$(MAKE) $(clean)=$(boot) |
70567293 | 411 | |
14cf11af PM |
412 | archprepare: checkbin |
413 | ||
14cf11af PM |
414 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output |
415 | # to stdout and these checks are run even on install targets. | |
416 | TOUT := .tmp_gas_check | |
14cf11af | 417 | |
47ce46a1 NP |
418 | # Check toolchain versions: |
419 | # - gcc-4.6 is the minimum kernel-wide version so nothing required. | |
14cf11af | 420 | checkbin: |
60e065f7 ME |
421 | @if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \ |
422 | && $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \ | |
423 | echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \ | |
424 | echo 'in some circumstances.' ; \ | |
425 | echo -n '*** Please use a different binutils version.' ; \ | |
426 | false ; \ | |
427 | fi | |
428 | ||
14cf11af PM |
429 | |
430 | CLEAN_FILES += $(TOUT) | |
431 |