aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile34
1 files changed, 11 insertions, 23 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index d41ad2e675db..98f67c78d1bd 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -14,10 +14,6 @@
14 14
15HAS_BIARCH := $(call cc-option-yn, -m32) 15HAS_BIARCH := $(call cc-option-yn, -m32)
16 16
17ifeq ($(CONFIG_PPC64),y)
18OLDARCH := ppc64
19SZ := 64
20
21# Set default 32 bits cross compilers for vdso and boot wrapper 17# Set default 32 bits cross compilers for vdso and boot wrapper
22CROSS32_COMPILE ?= 18CROSS32_COMPILE ?=
23 19
@@ -37,6 +33,12 @@ endif
37 33
38export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY 34export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY
39 35
36KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
37
38ifeq ($(CONFIG_PPC64),y)
39OLDARCH := ppc64
40SZ := 64
41
40new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) 42new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
41 43
42ifeq ($(new_nm),y) 44ifeq ($(new_nm),y)
@@ -111,9 +113,6 @@ cpu-as-$(CONFIG_E200) += -Wa,-me200
111AFLAGS += $(cpu-as-y) 113AFLAGS += $(cpu-as-y)
112CFLAGS += $(cpu-as-y) 114CFLAGS += $(cpu-as-y)
113 115
114# Default to the common case.
115KBUILD_DEFCONFIG := common_defconfig
116
117head-y := arch/powerpc/kernel/head_32.o 116head-y := arch/powerpc/kernel/head_32.o
118head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o 117head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o
119head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o 118head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
@@ -125,11 +124,11 @@ head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o
125head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o 124head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
126 125
127core-y += arch/powerpc/kernel/ \ 126core-y += arch/powerpc/kernel/ \
128 arch/$(OLDARCH)/kernel/ \
129 arch/powerpc/mm/ \ 127 arch/powerpc/mm/ \
130 arch/powerpc/lib/ \ 128 arch/powerpc/lib/ \
131 arch/powerpc/sysdev/ \ 129 arch/powerpc/sysdev/ \
132 arch/powerpc/platforms/ 130 arch/powerpc/platforms/
131core-$(CONFIG_PPC32) += arch/ppc/kernel/
133core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ 132core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/
134core-$(CONFIG_XMON) += arch/powerpc/xmon/ 133core-$(CONFIG_XMON) += arch/powerpc/xmon/
135core-$(CONFIG_APUS) += arch/ppc/amiga/ 134core-$(CONFIG_APUS) += arch/ppc/amiga/
@@ -139,7 +138,7 @@ drivers-$(CONFIG_CPM2) += arch/ppc/8260_io/
139 138
140drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ 139drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
141 140
142defaultimage-$(CONFIG_PPC32) := uImage zImage 141defaultimage-$(CONFIG_PPC32) := zImage
143defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux 142defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
144defaultimage-$(CONFIG_PPC_PSERIES) := zImage 143defaultimage-$(CONFIG_PPC_PSERIES) := zImage
145KBUILD_IMAGE := $(defaultimage-y) 144KBUILD_IMAGE := $(defaultimage-y)
@@ -154,33 +153,22 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
154 153
155.PHONY: $(BOOT_TARGETS) 154.PHONY: $(BOOT_TARGETS)
156 155
157boot := arch/$(OLDARCH)/boot 156boot := arch/$(ARCH)/boot
158 157
159# urk
160ifeq ($(CONFIG_PPC64),y)
161$(BOOT_TARGETS): vmlinux 158$(BOOT_TARGETS): vmlinux
162 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) 159 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
163else
164$(BOOT_TARGETS): vmlinux
165 $(Q)$(MAKE) ARCH=ppc $(build)=$(boot) $@
166endif
167
168uImage: vmlinux
169 $(Q)$(MAKE) ARCH=$(OLDARCH) $(build)=$(boot)/images $(boot)/images/$@
170 160
171define archhelp 161define archhelp
172 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/images/zImage.*)' 162 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
173 @echo ' uImage - Create a bootable image for U-Boot / PPCBoot'
174 @echo ' install - Install kernel using' 163 @echo ' install - Install kernel using'
175 @echo ' (your) ~/bin/installkernel or' 164 @echo ' (your) ~/bin/installkernel or'
176 @echo ' (distribution) /sbin/installkernel or' 165 @echo ' (distribution) /sbin/installkernel or'
177 @echo ' install to $$(INSTALL_PATH) and run lilo' 166 @echo ' install to $$(INSTALL_PATH) and run lilo'
178 @echo ' *_defconfig - Select default config from arch/$(ARCH)/ppc/configs' 167 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
179endef 168endef
180 169
181archclean: 170archclean:
182 $(Q)$(MAKE) $(clean)=$(boot) 171 $(Q)$(MAKE) $(clean)=$(boot)
183 # Temporary hack until we have migrated to asm-powerpc
184 $(Q)rm -rf arch/$(ARCH)/include 172 $(Q)rm -rf arch/$(ARCH)/include
185 173
186archprepare: checkbin 174archprepare: checkbin