[RFC PATCH 1/3] kbuild: introduce cmd_dtc_cpp

Subsystems: kernel build + files below scripts/ (unless maintained elsewhere), the rest

STALE5057d

2 messages, 2 authors, 2012-09-27 · open the first message on its own page

[RFC PATCH 1/3] kbuild: introduce cmd_dtc_cpp

From: Stephen Warren <hidden>
Date: 2012-09-25 19:06:36

From: Stephen Warren <redacted>

cmd_dtc_cpp runs the C pre-processor on the input .dts file before
passing it to dtc for final compilation. This allows used of #define
within the .dts file.

Signed-off-by: Stephen Warren <redacted>
---
 scripts/Makefile.lib |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0be6f11..e3a149e 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -266,6 +266,9 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
 quiet_cmd_dtc = DTC     $@
 cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $<
 
+quiet_cmd_dtc_cpp = DTC+CPP $@
+cmd_dtc_cpp = $(CC) -E -Wp,-MD,$(depfile) -xc $< | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -
+
 # Bzip2
 # ---------------------------------------------------------------------------
 
-- 
1.7.0.4

Re: [RFC PATCH 1/3] kbuild: introduce cmd_dtc_cpp

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2012-09-27 05:44:38

On 13:06 Tue 25 Sep     , Stephen Warren wrote:
quoted hunk
From: Stephen Warren <redacted>

cmd_dtc_cpp runs the C pre-processor on the input .dts file before
passing it to dtc for final compilation. This allows used of #define
within the .dts file.

Signed-off-by: Stephen Warren <redacted>
---
 scripts/Makefile.lib |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0be6f11..e3a149e 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -266,6 +266,9 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
 quiet_cmd_dtc = DTC     $@
 cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $<
 
+quiet_cmd_dtc_cpp = DTC+CPP $@
+cmd_dtc_cpp = $(CC) -E -Wp,-MD,$(depfile) -xc $< | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -
this should go to Makefile.build

and we should keep the same nomecalture as lds with lds.S

here dts.S

and is it possible to cmd with it

Best Regards,
J.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help