Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a00cec48ccda0f2b550ad4082d6e95c7cc232925
Commit:     a00cec48ccda0f2b550ad4082d6e95c7cc232925
Parent:     941b7adf347dc3e6e2bf87b2af1ef8a42b617a63
Author:     Mark A. Greer <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 1 05:55:35 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Mon Jun 25 17:00:09 2007 +1000

    [POWERPC] When appropriate, wrap device tree with zImage
    
    There are 2 config options that indicate whether the platform being built
    has a device tree source file associated with it.  Namely,
    CONFIG_WANT_DEVICE_TREE and CONFIG_DEVICE_TREE.  When 
CONFIG_WANT_DEVICE_TREE
    is 'y' and CONFIG_DEVICE_TREE isn't an empty string, automatically wrap
    the specified device tree with the zImage being built.
    
    To achieve this, the 'dts' variable will only be set when the conditions
    above are true.  The changes to the zImage.initrd.% and zImage.% rules
    cause the device tree to be wrapped when 'dts' is set; otherwise, they
    will work as they previosly did (i.e., build a zImage with no device tree).
    
    Signed-off-by: Mark A. Greer <[EMAIL PROTECTED]>
    Acked-by: David Gibson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/Makefile |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 75e1e56..29361d7 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -157,14 +157,24 @@ targets   += $(image-y) $(initrd-y)
 
 $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
 
+# If CONFIG_WANT_DEVICE_TREE is set and CONFIG_DEVICE_TREE isn't an
+# empty string, define 'dts' to be path to the dts
+# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
+ifeq ($(CONFIG_WANT_DEVICE_TREE),y)
+ifneq ($(CONFIG_DEVICE_TREE),"")
+dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
+       ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
+endif
+endif
+
 # Don't put the ramdisk on the pattern rule; when its missing make will try
 # the pattern rule with less dependencies that also matches (even with the
 # hard dependency listed).
-$(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
-       $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
+$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) $(dts)
+       $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz)
 
-$(obj)/zImage.%: vmlinux $(wrapperbits)
-       $(call if_changed,wrap,$*)
+$(obj)/zImage.%: vmlinux $(wrapperbits) $(dts)
+       $(call if_changed,wrap,$*,$(dts))
 
 $(obj)/zImage.iseries: vmlinux
        $(STRIP) -s -R .comment $< -o $@
@@ -184,10 +194,6 @@ $(obj)/zImage.initrd.holly-elf: vmlinux $(wrapperbits) 
$(obj)/ramdisk.image.gz
 $(obj)/uImage: vmlinux $(wrapperbits)
        $(call if_changed,wrap,uboot)
 
-# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
-dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
-       ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
-
 $(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
        $(call if_changed,wrap,cuboot-$*,$(dts))
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to