aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-15 21:38:21 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-15 21:52:21 -0500
commit94b212c29f685ca54b5689a8e89ac7671c43d651 (patch)
tree356266520a5ba530b2a5b77b68e90e87a2402ecb /arch/powerpc/Makefile
parent7486a38f683d49e6f8b2b9050ff06778b151a40c (diff)
powerpc: Move ppc64 boot wrapper code over to arch/powerpc
This also extends the code to handle 32-bit ELF vmlinux files as well as 64-bit ones. This is sufficient for booting on new-world 32-bit powermacs (i.e. all recent machines). Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile25
1 files changed, 7 insertions, 18 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index d41ad2e675db..99dbea8c5c50 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,10 @@ endif
37 33
38export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY 34export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY
39 35
36ifeq ($(CONFIG_PPC64),y)
37OLDARCH := ppc64
38SZ := 64
39
40new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) 40new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
41 41
42ifeq ($(new_nm),y) 42ifeq ($(new_nm),y)
@@ -139,7 +139,7 @@ drivers-$(CONFIG_CPM2) += arch/ppc/8260_io/
139 139
140drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ 140drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
141 141
142defaultimage-$(CONFIG_PPC32) := uImage zImage 142defaultimage-$(CONFIG_PPC32) := zImage
143defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux 143defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
144defaultimage-$(CONFIG_PPC_PSERIES) := zImage 144defaultimage-$(CONFIG_PPC_PSERIES) := zImage
145KBUILD_IMAGE := $(defaultimage-y) 145KBUILD_IMAGE := $(defaultimage-y)
@@ -154,23 +154,13 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
154 154
155.PHONY: $(BOOT_TARGETS) 155.PHONY: $(BOOT_TARGETS)
156 156
157boot := arch/$(OLDARCH)/boot 157boot := arch/$(ARCH)/boot
158 158
159# urk
160ifeq ($(CONFIG_PPC64),y)
161$(BOOT_TARGETS): vmlinux 159$(BOOT_TARGETS): vmlinux
162 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) 160 $(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 161
171define archhelp 162define archhelp
172 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/images/zImage.*)' 163 @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' 164 @echo ' install - Install kernel using'
175 @echo ' (your) ~/bin/installkernel or' 165 @echo ' (your) ~/bin/installkernel or'
176 @echo ' (distribution) /sbin/installkernel or' 166 @echo ' (distribution) /sbin/installkernel or'
@@ -180,7 +170,6 @@ endef
180 170
181archclean: 171archclean:
182 $(Q)$(MAKE) $(clean)=$(boot) 172 $(Q)$(MAKE) $(clean)=$(boot)
183 # Temporary hack until we have migrated to asm-powerpc
184 $(Q)rm -rf arch/$(ARCH)/include 173 $(Q)rm -rf arch/$(ARCH)/include
185 174
186archprepare: checkbin 175archprepare: checkbin