aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/Makefile')
-rw-r--r--arch/powerpc/boot/Makefile49
1 files changed, 34 insertions, 15 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 3716594ea33e..5c384aad1184 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -37,13 +37,15 @@ zlib := inffast.c inflate.c inftrees.c
37zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h 37zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
38zliblinuxheader := zlib.h zconf.h zutil.h 38zliblinuxheader := zlib.h zconf.h zutil.h
39 39
40$(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \ 40$(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
41 $(addprefix $(obj)/,$(zlibheader)) 41 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
42 42
43src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ 43src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
44 ns16550.c serial.c simple_alloc.c div64.S util.S \ 44 ns16550.c serial.c simple_alloc.c div64.S util.S \
45 gunzip_util.c elf_util.c $(zlib) devtree.c 45 gunzip_util.c elf_util.c $(zlib) devtree.c \
46src-plat := of.c cuboot-83xx.c cuboot-85xx.c 46 44x.c ebony.c
47src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
48 cuboot-ebony.c treeboot-ebony.c
47src-boot := $(src-wlib) $(src-plat) empty.c 49src-boot := $(src-wlib) $(src-plat) empty.c
48 50
49src-boot := $(addprefix $(obj)/, $(src-boot)) 51src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -129,7 +131,14 @@ image-$(CONFIG_PPC_CELLEB) += zImage.pseries
129image-$(CONFIG_PPC_CHRP) += zImage.chrp 131image-$(CONFIG_PPC_CHRP) += zImage.chrp
130image-$(CONFIG_PPC_EFIKA) += zImage.chrp 132image-$(CONFIG_PPC_EFIKA) += zImage.chrp
131image-$(CONFIG_PPC_PMAC) += zImage.pmac 133image-$(CONFIG_PPC_PMAC) += zImage.pmac
132image-$(CONFIG_DEFAULT_UIMAGE) += uImage cuImage 134image-$(CONFIG_PPC_HOLLY) += zImage.holly-elf
135image-$(CONFIG_DEFAULT_UIMAGE) += uImage
136
137ifneq ($(CONFIG_DEVICE_TREE),"")
138image-$(CONFIG_PPC_83xx) += cuImage.83xx
139image-$(CONFIG_PPC_85xx) += cuImage.85xx
140image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
141endif
133 142
134# For 32-bit powermacs, build the COFF and miboot images 143# For 32-bit powermacs, build the COFF and miboot images
135# as well as the ELF images. 144# as well as the ELF images.
@@ -138,7 +147,8 @@ image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot
138endif 147endif
139 148
140initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) 149initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))
141initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) 150initrd-y := $(patsubst zImage%, zImage.initrd%, \
151 $(patsubst treeImage%, treeImage.initrd%, $(image-y)))
142initrd-y := $(filter-out $(image-y), $(initrd-y)) 152initrd-y := $(filter-out $(image-y), $(initrd-y))
143targets += $(image-y) $(initrd-y) 153targets += $(image-y) $(initrd-y)
144 154
@@ -159,18 +169,27 @@ $(obj)/zImage.ps3: vmlinux
159$(obj)/zImage.initrd.ps3: vmlinux 169$(obj)/zImage.initrd.ps3: vmlinux
160 @echo " WARNING zImage.initrd.ps3 not supported (yet)" 170 @echo " WARNING zImage.initrd.ps3 not supported (yet)"
161 171
172$(obj)/zImage.holly-elf: vmlinux $(wrapperbits)
173 $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,)
174
175$(obj)/zImage.initrd.holly-elf: vmlinux $(wrapperbits) $(obj)/ramdisk.image.gz
176 $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,$(obj)/ramdisk.image.gz)
177
162$(obj)/uImage: vmlinux $(wrapperbits) 178$(obj)/uImage: vmlinux $(wrapperbits)
163 $(call if_changed,wrap,uboot) 179 $(call if_changed,wrap,uboot)
164 180
165cuboot-plat-$(CONFIG_83xx) += 83xx 181# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
166cuboot-plat-$(CONFIG_85xx) += 85xx
167cuboot-plat-y += unknown-platform
168
169dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\ 182dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
170 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE) 183 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
184
185$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
186 $(call if_changed,wrap,cuboot-$*,$(dts))
187
188$(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits)
189 $(call if_changed,wrap,treeboot-$*,$(dts))
171 190
172$(obj)/cuImage: vmlinux $(wrapperbits) 191$(obj)/treeImage.initrd.%: vmlinux $(dts) $(wrapperbits)
173 $(call if_changed,wrap,cuboot-$(word 1,$(cuboot-plat-y)),$(dts)) 192 $(call if_changed,wrap,treeboot-$*,$(dts),,$(obj)/ramdisk.image.gz)
174 193
175$(obj)/zImage: $(addprefix $(obj)/, $(image-y)) 194$(obj)/zImage: $(addprefix $(obj)/, $(image-y))
176 @rm -f $@; ln $< $@ 195 @rm -f $@; ln $< $@
@@ -181,8 +200,8 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
181 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< 200 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
182 201
183# anything not in $(targets) 202# anything not in $(targets)
184clean-files += $(image-) $(initrd-) zImage zImage.initrd \ 203clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \
185 cuImage.elf cuImage.bin.gz 204 treeImage.*
186 205
187# clean up files cached by wrapper 206# clean up files cached by wrapper
188clean-kernel := vmlinux.strip vmlinux.bin 207clean-kernel := vmlinux.strip vmlinux.bin