diff options
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r-- | arch/powerpc/Makefile | 34 |
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 | ||
15 | HAS_BIARCH := $(call cc-option-yn, -m32) | 15 | HAS_BIARCH := $(call cc-option-yn, -m32) |
16 | 16 | ||
17 | ifeq ($(CONFIG_PPC64),y) | ||
18 | OLDARCH := ppc64 | ||
19 | SZ := 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 |
22 | CROSS32_COMPILE ?= | 18 | CROSS32_COMPILE ?= |
23 | 19 | ||
@@ -37,6 +33,12 @@ endif | |||
37 | 33 | ||
38 | export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY | 34 | export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY |
39 | 35 | ||
36 | KBUILD_DEFCONFIG := $(shell uname -m)_defconfig | ||
37 | |||
38 | ifeq ($(CONFIG_PPC64),y) | ||
39 | OLDARCH := ppc64 | ||
40 | SZ := 64 | ||
41 | |||
40 | new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) | 42 | new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) |
41 | 43 | ||
42 | ifeq ($(new_nm),y) | 44 | ifeq ($(new_nm),y) |
@@ -111,9 +113,6 @@ cpu-as-$(CONFIG_E200) += -Wa,-me200 | |||
111 | AFLAGS += $(cpu-as-y) | 113 | AFLAGS += $(cpu-as-y) |
112 | CFLAGS += $(cpu-as-y) | 114 | CFLAGS += $(cpu-as-y) |
113 | 115 | ||
114 | # Default to the common case. | ||
115 | KBUILD_DEFCONFIG := common_defconfig | ||
116 | |||
117 | head-y := arch/powerpc/kernel/head_32.o | 116 | head-y := arch/powerpc/kernel/head_32.o |
118 | head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o | 117 | head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o |
119 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o | 118 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o |
@@ -125,11 +124,11 @@ head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o | |||
125 | head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o | 124 | head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o |
126 | 125 | ||
127 | core-y += arch/powerpc/kernel/ \ | 126 | core-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/ |
131 | core-$(CONFIG_PPC32) += arch/ppc/kernel/ | ||
133 | core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ | 132 | core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ |
134 | core-$(CONFIG_XMON) += arch/powerpc/xmon/ | 133 | core-$(CONFIG_XMON) += arch/powerpc/xmon/ |
135 | core-$(CONFIG_APUS) += arch/ppc/amiga/ | 134 | core-$(CONFIG_APUS) += arch/ppc/amiga/ |
@@ -139,7 +138,7 @@ drivers-$(CONFIG_CPM2) += arch/ppc/8260_io/ | |||
139 | 138 | ||
140 | drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ | 139 | drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ |
141 | 140 | ||
142 | defaultimage-$(CONFIG_PPC32) := uImage zImage | 141 | defaultimage-$(CONFIG_PPC32) := zImage |
143 | defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux | 142 | defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux |
144 | defaultimage-$(CONFIG_PPC_PSERIES) := zImage | 143 | defaultimage-$(CONFIG_PPC_PSERIES) := zImage |
145 | KBUILD_IMAGE := $(defaultimage-y) | 144 | KBUILD_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 | ||
157 | boot := arch/$(OLDARCH)/boot | 156 | boot := arch/$(ARCH)/boot |
158 | 157 | ||
159 | # urk | ||
160 | ifeq ($(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)/%,$@) |
163 | else | ||
164 | $(BOOT_TARGETS): vmlinux | ||
165 | $(Q)$(MAKE) ARCH=ppc $(build)=$(boot) $@ | ||
166 | endif | ||
167 | |||
168 | uImage: vmlinux | ||
169 | $(Q)$(MAKE) ARCH=$(OLDARCH) $(build)=$(boot)/images $(boot)/images/$@ | ||
170 | 160 | ||
171 | define archhelp | 161 | define 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' |
179 | endef | 168 | endef |
180 | 169 | ||
181 | archclean: | 170 | archclean: |
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 | ||
186 | archprepare: checkbin | 174 | archprepare: checkbin |