[PATCH 15/17] bootwrapper: Add cmd_wrap_dt.

Scott Wood scottwood at freescale.com
Sat Mar 17 04:29:11 EST 2007


This provides a function to call the wrapper script with a device tree
source file, as specified by CONFIG_DEVICE_TREE.

Signed-off-by: Scott Wood <scottwood at freescale.com>
---
 arch/powerpc/Kconfig       |   16 ++++++++++++++++
 arch/powerpc/boot/Makefile |    6 ++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index e720527..2f8f05b 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -967,6 +967,22 @@ config SECCOMP
 
 	  If unsure, say Y. Only embedded should say N here.
 
+config DEVICE_TREE
+	string "Static device tree source file"
+	help
+	  This specifies the device tree source (.dts) file to be
+	  compiled and included when building the bootwrapper.
+	  If a relative filename is given, then it will be relative
+	  to arch/powerpc/boot/dts.
+
+	  This is required when building a cuImage target for an
+	  older U-Boot, which cannot pass a device tree itself.
+	  Such a kernel will not work with a newer U-Boot that
+	  tries to pass a device tree (unless you tell it not to).
+	  If your U-Boot does not mention a device tree in
+	  "help bootm", then use the cuImage target and specify
+	  a device tree here.  Otherwise, use the uImage target.
+
 endmenu
 
 config ISA_DMA_API
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 55da383..1cdabb2 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -120,6 +120,12 @@ quiet_cmd_wrap_initrd = WRAP    $@
       cmd_wrap_initrd =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
 				-i $(obj)/ramdisk.image.gz vmlinux
 
+dts = $(if $(shell echo $(CONFIG_) | grep '^/'),\
+       ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE)
+quiet_cmd_wrap_dt = WRAP    $@
+      cmd_wrap_dt = $(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
+                    -s "$(dts)" vmlinux
+
 $(obj)/zImage.chrp: vmlinux $(wrapperbits)
 	$(call cmd,wrap,chrp)
 
-- 
1.5.0.3




More information about the Linuxppc-dev mailing list