aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/Makefile2
-rw-r--r--arch/powerpc/boot/Makefile25
2 files changed, 25 insertions, 2 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 81a531d84ff9..d6014a67694b 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE)
148 148
149CPPFLAGS_vmlinux.lds := -Upowerpc 149CPPFLAGS_vmlinux.lds := -Upowerpc
150 150
151BOOT_TARGETS = zImage zImage.initrd uImage 151BOOT_TARGETS = zImage zImage.initrd zImage.dts zImage.dts_initrd uImage
152 152
153PHONY += $(BOOT_TARGETS) 153PHONY += $(BOOT_TARGETS)
154 154
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 5c384aad1184..01b683987e7d 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -154,9 +154,27 @@ targets += $(image-y) $(initrd-y)
154 154
155$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz 155$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
156 156
157dts- := $(patsubst zImage%, zImage.dts%, $(image-n) $(image-))
158dts-y := $(patsubst zImage%, zImage.dts%, $(image-y))
159dts-y := $(filter-out $(image-y), $(dts-y))
160targets += $(image-y) $(dts-y)
161
162dts_initrd- := $(patsubst zImage%, zImage.dts_initrd%, $(image-n) $(image-))
163dts_initrd-y := $(patsubst zImage%, zImage.dts_initrd%, $(image-y))
164dts_initrd-y := $(filter-out $(image-y), $(dts_initrd-y))
165targets += $(image-y) $(dts_initrd-y)
166
167$(addprefix $(obj)/, $(dts_initrd-y)): $(obj)/ramdisk.image.gz
168
157# Don't put the ramdisk on the pattern rule; when its missing make will try 169# Don't put the ramdisk on the pattern rule; when its missing make will try
158# the pattern rule with less dependencies that also matches (even with the 170# the pattern rule with less dependencies that also matches (even with the
159# hard dependency listed). 171# hard dependency listed).
172$(obj)/zImage.dts_initrd.%: vmlinux $(wrapperbits) $(dts) $(obj)/ramdisk.image.gz
173 $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz)
174
175$(obj)/zImage.dts.%: vmlinux $(wrapperbits) $(dts)
176 $(call if_changed,wrap,$*,$(dts))
177
160$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) 178$(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
161 $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) 179 $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
162 180
@@ -195,13 +213,18 @@ $(obj)/zImage: $(addprefix $(obj)/, $(image-y))
195 @rm -f $@; ln $< $@ 213 @rm -f $@; ln $< $@
196$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) 214$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))
197 @rm -f $@; ln $< $@ 215 @rm -f $@; ln $< $@
216$(obj)/zImage.dts: $(addprefix $(obj)/, $(dts-y))
217 @rm -f $@; ln $< $@
218$(obj)/zImage.dts_initrd: $(addprefix $(obj)/, $(dts_initrd-y))
219 @rm -f $@; ln $< $@
220
198 221
199install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) 222install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
200 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< 223 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
201 224
202# anything not in $(targets) 225# anything not in $(targets)
203clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ 226clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \
204 treeImage.* 227 treeImage.* zImage.dts zImage.dts_initrd
205 228
206# clean up files cached by wrapper 229# clean up files cached by wrapper
207clean-kernel := vmlinux.strip vmlinux.bin 230clean-kernel := vmlinux.strip vmlinux.bin