Commit df6d6035 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc32: fix 'make O=...'

From: Tom Rini <trini@kernel.crashing.org>

Fix arch/ppc/boot/ so that everything now works with 'make O='.

Partially by: Geoffrey LEVAND <geoffrey.levand@am.sony.com>.
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 8634c9f3
...@@ -17,11 +17,11 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd ...@@ -17,11 +17,11 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
bootdir-y := simple bootdir-y := simple
bootdir-$(CONFIG_PPC_OF) += openfirmware bootdir-$(CONFIG_PPC_OF) += openfirmware
subdir-y := lib/ common/ images/ subdir-y := lib common images
subdir-$(CONFIG_PPC_OF) += of1275/ subdir-$(CONFIG_PPC_OF) += of1275
# for cleaning # for cleaning
subdir- += simple/ openfirmware/ subdir- += simple openfirmware
host-progs := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree) host-progs := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree)
......
...@@ -22,9 +22,10 @@ of1275 := $(boot)/of1275 ...@@ -22,9 +22,10 @@ of1275 := $(boot)/of1275
images := $(boot)/images images := $(boot)/images
OBJCOPY_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment OBJCOPY_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment
COFF_LD_ARGS := -T $(boot)/ld.script -e _start -Ttext 0x00500000 -Bstatic COFF_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00500000 \
CHRP_LD_ARGS := -T $(boot)/ld.script -e _start -Ttext 0x00800000 -Bstatic
NEWWORLD_LD_ARGS:= -T $(boot)/ld.script -e _start -Ttext 0x01000000 CHRP_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00800000
NEWWORLD_LD_ARGS:= -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x01000000
COMMONOBJS := start.o misc.o common.o COMMONOBJS := start.o misc.o common.o
COFFOBJS := coffcrt0.o $(COMMONOBJS) coffmain.o COFFOBJS := coffcrt0.o $(COMMONOBJS) coffmain.o
...@@ -92,11 +93,11 @@ quiet_cmd_gencoffb = COFF $@ ...@@ -92,11 +93,11 @@ quiet_cmd_gencoffb = COFF $@
cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) $< $(LIBS) && \ cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) $< $(LIBS) && \
$(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec)
targets += coffboot targets += coffboot
$(obj)/coffboot: $(obj)/image.o $(COFFOBJS) $(LIBS) $(boot)/ld.script FORCE $(obj)/coffboot: $(obj)/image.o $(COFFOBJS) $(LIBS) $(srctree)/$(boot)/ld.script FORCE
$(call if_changed,gencoffb) $(call if_changed,gencoffb)
targets += coffboot.initrd targets += coffboot.initrd
$(obj)/coffboot.initrd: $(obj)/image.initrd.o $(COFFOBJS) $(LIBS) \ $(obj)/coffboot.initrd: $(obj)/image.initrd.o $(COFFOBJS) $(LIBS) \
$(boot)/ld.script FORCE $(srctree)/$(boot)/ld.script FORCE
$(call if_changed,gencoffb) $(call if_changed,gencoffb)
...@@ -118,20 +119,22 @@ quiet_cmd_gen-elf-pmac = ELF $@ ...@@ -118,20 +119,22 @@ quiet_cmd_gen-elf-pmac = ELF $@
-R .comment $(del-ramdisk-sec) -R .comment $(del-ramdisk-sec)
$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) \ $(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) \
$(obj)/note $(boot)/ld.script $(obj)/note $(srctree)/$(boot)/ld.script
$(call cmd,gen-elf-pmac) $(call cmd,gen-elf-pmac)
$(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \ $(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \
$(LIBS) $(obj)/note $(boot)/ld.script $(LIBS) $(obj)/note \
$(srctree)/$(boot)/ld.script
$(call cmd,gen-elf-pmac) $(call cmd,gen-elf-pmac)
quiet_cmd_gen-chrp = CHRP $@ quiet_cmd_gen-chrp = CHRP $@
cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \ cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \
$(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec)
$(images)/zImage.chrp: $(obj)/image.o $(CHRPOBJS) $(LIBS) $(boot)/ld.script $(images)/zImage.chrp: $(obj)/image.o $(CHRPOBJS) $(LIBS) \
$(srctree)/$(boot)/ld.script
$(call cmd,gen-chrp) $(call cmd,gen-chrp)
$(images)/zImage.initrd.chrp: $(obj)/image.initrd.o $(CHRPOBJS) $(LIBS) \ $(images)/zImage.initrd.chrp: $(obj)/image.initrd.o $(CHRPOBJS) $(LIBS) \
$(boot)/ld.script $(srctree)/$(boot)/ld.script
$(call cmd,gen-chrp) $(call cmd,gen-chrp)
quiet_cmd_addnote = ADDNOTE $@ quiet_cmd_addnote = ADDNOTE $@
......
...@@ -41,7 +41,7 @@ end-y := elf ...@@ -41,7 +41,7 @@ end-y := elf
# if present on 'classic' PPC. # if present on 'classic' PPC.
cacheflag-y := -DCLEAR_CACHES="" cacheflag-y := -DCLEAR_CACHES=""
# This file will flush / disable the L2, and L3 if present. # This file will flush / disable the L2, and L3 if present.
clear_L2_L3 := $(srctree)/$(boot)/simple/clear.S clear_L2_L3 := $(boot)/simple/clear.S
# #
# See arch/ppc/kconfig and arch/ppc/platforms/Kconfig # See arch/ppc/kconfig and arch/ppc/platforms/Kconfig
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment