aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/boot/Makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 75e1e5681ad8..29361d76ef1b 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -157,14 +157,24 @@ targets += $(image-y) $(initrd-y)
157 157
158$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz 158$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
159 159
160# If CONFIG_WANT_DEVICE_TREE is set and CONFIG_DEVICE_TREE isn't an
161# empty string, define 'dts' to be path to the dts
162# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
163ifeq ($(CONFIG_WANT_DEVICE_TREE),y)
164ifneq ($(CONFIG_DEVICE_TREE),"")
165dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
166 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
167endif
168endif
169
160# Don't put the ramdisk on the pattern rule; when its missing make will try 170# Don't put the ramdisk on the pattern rule; when its missing make will try
161# the pattern rule with less dependencies that also matches (even with the 171# the pattern rule with less dependencies that also matches (even with the
162# hard dependency listed). 172# hard dependency listed).
163$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) 173$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) $(dts)
164 $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) 174 $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz)
165 175
166$(obj)/zImage.%: vmlinux $(wrapperbits) 176$(obj)/zImage.%: vmlinux $(wrapperbits) $(dts)
167 $(call if_changed,wrap,$*) 177 $(call if_changed,wrap,$*,$(dts))
168 178
169$(obj)/zImage.iseries: vmlinux 179$(obj)/zImage.iseries: vmlinux
170 $(STRIP) -s -R .comment $< -o $@ 180 $(STRIP) -s -R .comment $< -o $@
@@ -184,10 +194,6 @@ $(obj)/zImage.initrd.holly-elf: vmlinux $(wrapperbits) $(obj)/ramdisk.image.gz
184$(obj)/uImage: vmlinux $(wrapperbits) 194$(obj)/uImage: vmlinux $(wrapperbits)
185 $(call if_changed,wrap,uboot) 195 $(call if_changed,wrap,uboot)
186 196
187# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
188dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
189 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
190
191$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits) 197$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
192 $(call if_changed,wrap,cuboot-$*,$(dts)) 198 $(call if_changed,wrap,cuboot-$*,$(dts))
193 199