diff options
-rw-r--r-- | arch/powerpc/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/Makefile | 26 |
2 files changed, 16 insertions, 12 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index ab5cfe8ef988..dd8082522da3 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -164,7 +164,7 @@ boot := arch/$(ARCH)/boot | |||
164 | $(BOOT_TARGETS): vmlinux | 164 | $(BOOT_TARGETS): vmlinux |
165 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) | 165 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
166 | 166 | ||
167 | bootwrapper_install: | 167 | bootwrapper_install %.dtb: |
168 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) | 168 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
169 | 169 | ||
170 | define archhelp | 170 | define archhelp |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 73f3fd8ba21e..a31d4e12b910 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -287,11 +287,11 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) | |||
287 | $(call if_changed,wrap,$*) | 287 | $(call if_changed,wrap,$*) |
288 | 288 | ||
289 | # dtbImage% - a dtbImage is a zImage with an embedded device tree blob | 289 | # dtbImage% - a dtbImage is a zImage with an embedded device tree blob |
290 | $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | 290 | $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb |
291 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) | 291 | $(call if_changed,wrap,$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) |
292 | 292 | ||
293 | $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | 293 | $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb |
294 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts) | 294 | $(call if_changed,wrap,$*,,$(obj)/$*.dtb) |
295 | 295 | ||
296 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) | 296 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) |
297 | # prefix | 297 | # prefix |
@@ -304,14 +304,18 @@ $(obj)/zImage.iseries: vmlinux | |||
304 | $(obj)/uImage: vmlinux $(wrapperbits) | 304 | $(obj)/uImage: vmlinux $(wrapperbits) |
305 | $(call if_changed,wrap,uboot) | 305 | $(call if_changed,wrap,uboot) |
306 | 306 | ||
307 | $(obj)/cuImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) | 307 | $(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) |
308 | $(call if_changed,wrap,cuboot-$*,$(dtstree)/$*.dts) | 308 | $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb) |
309 | 309 | ||
310 | $(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts $(wrapperbits) | 310 | $(obj)/treeImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) |
311 | $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) | 311 | $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) |
312 | 312 | ||
313 | $(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) | 313 | $(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) |
314 | $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts) | 314 | $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb) |
315 | |||
316 | # Rule to build device tree blobs | ||
317 | $(obj)/%.dtb: $(dtstree)/%.dts $(obj)/dtc | ||
318 | $(obj)/dtc -O dtb -o $(obj)/$*.dtb -b 0 $(DTS_FLAGS) $(dtstree)/$*.dts | ||
315 | 319 | ||
316 | # If there isn't a platform selected then just strip the vmlinux. | 320 | # If there isn't a platform selected then just strip the vmlinux. |
317 | ifeq (,$(image-y)) | 321 | ifeq (,$(image-y)) |
@@ -328,7 +332,7 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) | |||
328 | 332 | ||
329 | # anything not in $(targets) | 333 | # anything not in $(targets) |
330 | clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ | 334 | clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ |
331 | otheros.bld | 335 | otheros.bld *.dtb |
332 | 336 | ||
333 | # clean up files cached by wrapper | 337 | # clean up files cached by wrapper |
334 | clean-kernel := vmlinux.strip vmlinux.bin | 338 | clean-kernel := vmlinux.strip vmlinux.bin |