Commit 1cc3cfc5 authored by Tom Rini's avatar Tom Rini

PPC32: Fix building of most of the zImage targets.

After talking with Kai Germaschewski, change some of the PPC32
boot Makefiles from using obj- to boot- to avoid some (unwanted here) help
from Rules.make
parent ca980f75
...@@ -21,14 +21,14 @@ TFTPIMAGE = $(TFTPBOOT).smp ...@@ -21,14 +21,14 @@ TFTPIMAGE = $(TFTPBOOT).smp
endif endif
LD_ARGS = -T ../ld.script -Ttext 0x00800000 -Bstatic LD_ARGS = -T ../ld.script -Ttext 0x00800000 -Bstatic
obj-y := head.o ../simple/legacy.o misc.o of1275.o \ boot-y := head.o ../simple/legacy.o misc.o of1275.o \
../common/util.o ../common/string.o \ ../common/util.o ../common/string.o \
../common/misc-common.o ../common/misc-common.o
OBJCOPY_ARGS = -O elf32-powerpc OBJCOPY_ARGS = -O elf32-powerpc
LIBS = ../lib/zlib.a LIBS = ../lib/zlib.a
obj-$(CONFIG_SERIAL_CONSOLE) += ../common/ns16550.o boot-$(CONFIG_SERIAL_CONSOLE) += ../common/ns16550.o
obj-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o boot-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o
# Tools # Tools
MKPREP := ../utils/mkprep MKPREP := ../utils/mkprep
...@@ -40,18 +40,18 @@ CFLAGS_kbd.o += -I$(TOPDIR)/drivers/char ...@@ -40,18 +40,18 @@ CFLAGS_kbd.o += -I$(TOPDIR)/drivers/char
all: zImage all: zImage
zImage: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz ../common/dummy.o \ zImage: $(boot-y) $(LIBS) ../ld.script ../images/vmlinux.gz ../common/dummy.o \
$(MKPREP) $(MKPREP)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section=.image=../images/vmlinux.gz \ --add-section=.image=../images/vmlinux.gz \
--set-section-flags=.image=contents,alloc,load,readonly,data \ --set-section-flags=.image=contents,alloc,load,readonly,data \
../common/dummy.o image.o ../common/dummy.o image.o
$(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS) $(LD) $(LD_ARGS) -o $@ $(boot-y) image.o $(LIBS)
$(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr
$(MKPREP) -pbp $@ ../images/$@.prep $(MKPREP) -pbp $@ ../images/$@.prep
rm -f $@ rm -f $@
zImage.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz $(MKPREP) \ zImage.initrd: $(boot-y) $(LIBS) ../ld.script ../images/vmlinux.gz $(MKPREP) \
../common/dummy.o ../common/dummy.o
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section=.ramdisk=../images/ramdisk.image.gz \ --add-section=.ramdisk=../images/ramdisk.image.gz \
...@@ -59,7 +59,7 @@ zImage.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz $(MKPREP) \ ...@@ -59,7 +59,7 @@ zImage.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz $(MKPREP) \
--add-section=.image=../images/vmlinux.gz \ --add-section=.image=../images/vmlinux.gz \
--set-section-flags=.image=contents,alloc,load,readonly,data \ --set-section-flags=.image=contents,alloc,load,readonly,data \
../common/dummy.o image.o ../common/dummy.o image.o
$(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS) $(LD) $(LD_ARGS) -o $@ $(boot-y) image.o $(LIBS)
$(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr
$(MKPREP) -pbp $@ ../images/$@.prep $(MKPREP) -pbp $@ ../images/$@.prep
rm -f $@ rm -f $@
......
...@@ -122,22 +122,22 @@ endif ...@@ -122,22 +122,22 @@ endif
OBJCOPY_ARGS := -O elf32-powerpc OBJCOPY_ARGS := -O elf32-powerpc
# head.o and ../common/relocate.o must be at the start. # head.o and ../common/relocate.o must be at the start.
obj-y := head.o ../common/relocate.o $(HEADHELP) \ boot-y := head.o ../common/relocate.o $(HEADHELP) \
$(MISC) ../common/misc-common.o \ $(MISC) ../common/misc-common.o \
../common/string.o ../common/util.o ../common/string.o ../common/util.o
obj-$(CONFIG_4xx) += embed_config.o boot-$(CONFIG_4xx) += embed_config.o
obj-$(CONFIG_8xx) += embed_config.o boot-$(CONFIG_8xx) += embed_config.o
obj-$(CONFIG_8260) += embed_config.o boot-$(CONFIG_8260) += embed_config.o
obj-$(CONFIG_BSEIP) += iic.o boot-$(CONFIG_BSEIP) += iic.o
obj-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o
obj-$(CONFIG_RPXCLASSIC) += iic.o pci.o qspan_pci.o boot-$(CONFIG_RPXCLASSIC) += iic.o pci.o qspan_pci.o
obj-$(CONFIG_RPXLITE) += iic.o boot-$(CONFIG_RPXLITE) += iic.o
# Different boards need different serial implementations. # Different boards need different serial implementations.
ifeq ($(CONFIG_SERIAL_CONSOLE),y) ifeq ($(CONFIG_SERIAL_CONSOLE),y)
obj-$(CONFIG_8xx) += m8xx_tty.o boot-$(CONFIG_8xx) += m8xx_tty.o
obj-$(CONFIG_8260) += m8260_tty.o boot-$(CONFIG_8260) += m8260_tty.o
obj-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o boot-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o
obj-$(CONFIG_SERIAL) += ../common/ns16550.o boot-$(CONFIG_SERIAL) += ../common/ns16550.o
endif endif
LIBS := ../lib/zlib.a LIBS := ../lib/zlib.a
...@@ -147,16 +147,16 @@ MKBUGBOOT := ../utils/mkbugboot ...@@ -147,16 +147,16 @@ MKBUGBOOT := ../utils/mkbugboot
MKPREP := ../utils/mkprep MKPREP := ../utils/mkprep
MKTREE := ../utils/mktree MKTREE := ../utils/mktree
zvmlinux: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz ../common/dummy.o zvmlinux: $(boot-y) $(LIBS) ../ld.script ../images/vmlinux.gz ../common/dummy.o
$(OBJCOPY) $(OBJCOPY_ARGS) \ $(OBJCOPY) $(OBJCOPY_ARGS) \
--add-section=.image=../images/vmlinux.gz \ --add-section=.image=../images/vmlinux.gz \
--set-section-flags=.image=contents,alloc,load,readonly,data \ --set-section-flags=.image=contents,alloc,load,readonly,data \
../common/dummy.o image.o ../common/dummy.o image.o
$(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS) $(LD) $(LD_ARGS) -o $@ $(boot-y) image.o $(LIBS)
$(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr \ $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr \
-R .ramdisk -R .sysmap -R .ramdisk -R .sysmap
zvmlinux.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz \ zvmlinux.initrd: $(boot-y) $(LIBS) ../ld.script ../images/vmlinux.gz \
../common/dummy.o ../common/dummy.o
$(OBJCOPY) $(OBJCOPY_ARGS) \ $(OBJCOPY) $(OBJCOPY_ARGS) \
--add-section=.ramdisk=../images/ramdisk.image.gz \ --add-section=.ramdisk=../images/ramdisk.image.gz \
...@@ -164,7 +164,7 @@ zvmlinux.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz \ ...@@ -164,7 +164,7 @@ zvmlinux.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz \
--add-section=.image=../images/vmlinux.gz \ --add-section=.image=../images/vmlinux.gz \
--set-section-flags=.image=contents,alloc,load,readonly,data \ --set-section-flags=.image=contents,alloc,load,readonly,data \
../common/dummy.o image.o ../common/dummy.o image.o
$(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS) $(LD) $(LD_ARGS) -o $@ $(boot-y) image.o $(LIBS)
$(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr \ $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr \
-R .sysmap -R .sysmap
......
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