All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fdt: Adjust Makefile to find .dtsi include files
@ 2012-04-19 14:29 ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2012-04-19 14:29 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Devicetree Discuss, Jerry Van Baren

The device tree compiler now has an option to specify the search path
for its files. Use this option when compiling in preference to
pre-processing the file.

Update Tegra here also to prevent build breakage.

This requires a recent dtc (commit de6b762 in git://jdl.com/software/dtc.git).

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 board/nvidia/dts/tegra2-seaboard.dts |    2 +-
 dts/Makefile                         |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/board/nvidia/dts/tegra2-seaboard.dts b/board/nvidia/dts/tegra2-seaboard.dts
index 6ba3ec4..70df567 100644
--- a/board/nvidia/dts/tegra2-seaboard.dts
+++ b/board/nvidia/dts/tegra2-seaboard.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 /memreserve/ 0x1c000000 0x04000000;
-/include/ ARCH_CPU_DTS
+/include/ "tegra20.dtsi"
 
 / {
 	model = "NVIDIA Seaboard";
diff --git a/dts/Makefile b/dts/Makefile
index 5792afd..e771498 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -35,8 +35,8 @@ $(if $(CONFIG_ARCH_DEVICE_TREE),,\
 $(error Your architecture does not have device tree support enabled. \
 Please define CONFIG_ARCH_DEVICE_TREE))
 
-# We preprocess the device tree file provide a useful define
-DTS_CPPFLAGS := -DARCH_CPU_DTS=\"../arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
+# Provide a list of include directories for dtc
+DTS_FLAGS := -i $(SRCTREE)/arch/$(ARCH)/dts
 
 all:	$(obj).depend $(LIB)
 
@@ -46,9 +46,7 @@ all:	$(obj).depend $(LIB)
 DT_BIN	:= $(obj)dt.dtb
 
 $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
-	cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
-	$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
-	rm $@.tmp
+	$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DTS_FLAGS) $<
 
 process_lds = \
 	$(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] fdt: Adjust Makefile to find .dtsi include files
@ 2012-04-19 14:29 ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2012-04-19 14:29 UTC (permalink / raw)
  To: u-boot

The device tree compiler now has an option to specify the search path
for its files. Use this option when compiling in preference to
pre-processing the file.

Update Tegra here also to prevent build breakage.

This requires a recent dtc (commit de6b762 in git://jdl.com/software/dtc.git).

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 board/nvidia/dts/tegra2-seaboard.dts |    2 +-
 dts/Makefile                         |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/board/nvidia/dts/tegra2-seaboard.dts b/board/nvidia/dts/tegra2-seaboard.dts
index 6ba3ec4..70df567 100644
--- a/board/nvidia/dts/tegra2-seaboard.dts
+++ b/board/nvidia/dts/tegra2-seaboard.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 /memreserve/ 0x1c000000 0x04000000;
-/include/ ARCH_CPU_DTS
+/include/ "tegra20.dtsi"
 
 / {
 	model = "NVIDIA Seaboard";
diff --git a/dts/Makefile b/dts/Makefile
index 5792afd..e771498 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -35,8 +35,8 @@ $(if $(CONFIG_ARCH_DEVICE_TREE),,\
 $(error Your architecture does not have device tree support enabled. \
 Please define CONFIG_ARCH_DEVICE_TREE))
 
-# We preprocess the device tree file provide a useful define
-DTS_CPPFLAGS := -DARCH_CPU_DTS=\"../arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
+# Provide a list of include directories for dtc
+DTS_FLAGS := -i $(SRCTREE)/arch/$(ARCH)/dts
 
 all:	$(obj).depend $(LIB)
 
@@ -46,9 +46,7 @@ all:	$(obj).depend $(LIB)
 DT_BIN	:= $(obj)dt.dtb
 
 $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
-	cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
-	$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
-	rm $@.tmp
+	$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DTS_FLAGS) $<
 
 process_lds = \
 	$(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fdt: Adjust Makefile to find .dtsi include files
  2012-04-19 14:29 ` [U-Boot] " Simon Glass
@ 2012-04-19 18:29     ` Wolfgang Denk
  -1 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2012-04-19 18:29 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List, Jerry Van Baren, Devicetree Discuss

Dear Simon Glass,

In message <1334845777-30913-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> you wrote:
> The device tree compiler now has an option to specify the search path
> for its files. Use this option when compiling in preference to
> pre-processing the file.
> 
> Update Tegra here also to prevent build breakage.
> 
> This requires a recent dtc (commit de6b762 in git://jdl.com/software/dtc.git).
> 
> Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ---
>  board/nvidia/dts/tegra2-seaboard.dts |    2 +-
>  dts/Makefile                         |    8 +++-----
>  2 files changed, 4 insertions(+), 6 deletions(-)

NAK.  THis breaks building on all systems that use the
distribution-provided DTC with this error:

	dtc: invalid option -- 'i'


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd-ynQEQJNshbs@public.gmane.org
"What if" is a trademark of Hewlett Packard, so stop using it in your
sentences without permission, or risk being sued.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] fdt: Adjust Makefile to find .dtsi include files
@ 2012-04-19 18:29     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2012-04-19 18:29 UTC (permalink / raw)
  To: u-boot

Dear Simon Glass,

In message <1334845777-30913-1-git-send-email-sjg@chromium.org> you wrote:
> The device tree compiler now has an option to specify the search path
> for its files. Use this option when compiling in preference to
> pre-processing the file.
> 
> Update Tegra here also to prevent build breakage.
> 
> This requires a recent dtc (commit de6b762 in git://jdl.com/software/dtc.git).
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  board/nvidia/dts/tegra2-seaboard.dts |    2 +-
>  dts/Makefile                         |    8 +++-----
>  2 files changed, 4 insertions(+), 6 deletions(-)

NAK.  THis breaks building on all systems that use the
distribution-provided DTC with this error:

	dtc: invalid option -- 'i'


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"What if" is a trademark of Hewlett Packard, so stop using it in your
sentences without permission, or risk being sued.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-19 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19 14:29 [PATCH] fdt: Adjust Makefile to find .dtsi include files Simon Glass
2012-04-19 14:29 ` [U-Boot] " Simon Glass
     [not found] ` <1334845777-30913-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-04-19 18:29   ` Wolfgang Denk
2012-04-19 18:29     ` [U-Boot] " Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.