]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/Makefile
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
[linux-2.6-omap-h63xx.git] / arch / powerpc / Makefile
index 06486406575388f804c1a937036846a0c5b0c9b7..5bc11bd36c1f8eba426466ba7e4b136ca51bb2aa 100644 (file)
@@ -12,9 +12,6 @@
 # Rewritten by Cort Dougan and Paul Mackerras
 #
 
-# This must match PAGE_OFFSET in include/asm-powerpc/page.h.
-KERNELLOAD     := $(CONFIG_KERNEL_START)
-
 HAS_BIARCH     := $(call cc-option-yn, -m32)
 
 ifeq ($(CONFIG_PPC64),y)
@@ -51,13 +48,15 @@ OLDARCH     := ppc
 SZ     := 32
 endif
 
+UTS_MACHINE := $(OLDARCH)
+
 ifeq ($(HAS_BIARCH),y)
 override AS    += -a$(SZ)
 override LD    += -m elf$(SZ)ppc
 override CC    += -m$(SZ)
 endif
 
-LDFLAGS_vmlinux        := -Ttext $(KERNELLOAD) -Bstatic -e $(KERNELLOAD)
+LDFLAGS_vmlinux        := -Bstatic
 
 # The -Iarch/$(ARCH)/include is temporary while we are merging
 CPPFLAGS       += -Iarch/$(ARCH) -Iarch/$(ARCH)/include
@@ -91,6 +90,9 @@ else
 endif
 endif
 
+# No AltiVec instruction when building kernel
+CFLAGS += $(call cc-option,-mno-altivec)
+
 # Enable unit-at-a-time mode when possible. It shrinks the
 # kernel considerably.
 CFLAGS += $(call cc-option,-funit-at-a-time)
@@ -119,20 +121,15 @@ head-$(CONFIG_4xx)                := arch/powerpc/kernel/head_4xx.o
 head-$(CONFIG_44x)             := arch/powerpc/kernel/head_44x.o
 head-$(CONFIG_FSL_BOOKE)       := arch/powerpc/kernel/head_fsl_booke.o
 
-ifeq ($(CONFIG_PPC32),y)
-head-$(CONFIG_6xx)             += arch/powerpc/kernel/idle_6xx.o
+head-$(CONFIG_PPC64)           += arch/powerpc/kernel/entry_64.o
 head-$(CONFIG_PPC_FPU)         += arch/powerpc/kernel/fpu.o
-endif
 
-core-y                         += arch/powerpc/kernel/
-core-y                         += arch/$(OLDARCH)/kernel/
-core-$(CONFIG_PPC32)           += arch/powerpc/mm/
-core-$(CONFIG_PPC64)           += arch/$(OLDARCH)/mm/
-core-$(CONFIG_PPC32)           += arch/powerpc/lib/
-libs-$(CONFIG_PPC64)           += arch/$(OLDARCH)/lib/
-core-y                         += arch/powerpc/sysdev/
-core-y                         += arch/powerpc/platforms/
-core-$(CONFIG_PPC32)           += arch/ppc/syslib/
+core-y                         += arch/powerpc/kernel/ \
+                                  arch/$(OLDARCH)/kernel/ \
+                                  arch/powerpc/mm/ \
+                                  arch/powerpc/lib/ \
+                                  arch/powerpc/sysdev/ \
+                                  arch/powerpc/platforms/
 core-$(CONFIG_MATH_EMULATION)  += arch/ppc/math-emu/
 core-$(CONFIG_XMON)            += arch/powerpc/xmon/
 core-$(CONFIG_APUS)            += arch/ppc/amiga/
@@ -144,6 +141,7 @@ drivers-$(CONFIG_OPROFILE)  += arch/powerpc/oprofile/
 
 defaultimage-$(CONFIG_PPC32)   := uImage zImage
 defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
+defaultimage-$(CONFIG_PPC_PSERIES) := zImage
 KBUILD_IMAGE := $(defaultimage-y)
 all: $(KBUILD_IMAGE)
 
@@ -158,8 +156,14 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
 
 boot := arch/$(OLDARCH)/boot
 
+# urk
+ifeq ($(CONFIG_PPC64),y)
+$(BOOT_TARGETS): vmlinux
+       $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
+else
 $(BOOT_TARGETS): vmlinux
-       $(Q)$(MAKE) ARCH=$(OLDARCH) $(build)=$(boot) $@
+       $(Q)$(MAKE) ARCH=ppc $(build)=$(boot) $@
+endif
 
 uImage: vmlinux
        $(Q)$(MAKE) ARCH=$(OLDARCH) $(build)=$(boot)/images $(boot)/images/$@