Skip to content

RFC ARM: use C pre-processor with dtc

Stephen Warren linux-arm-kernel linux-devicetree 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] ARM: use C pre-processor with dtc
Quoted 18 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 17 lines · Stephen Warren

From: Stephen Warren <[email protected]>

This series adds some build rules to run cpp on *.dts-cpp prior to invoking dtc, and converts Tegra to the new rule as an example. What do people think?

I assume that you've applied the dtc patches I sent yesterday. They aren't in this series. See:

https://lists.ozlabs.org/pipermail/devicetree-discuss/2012-September/020182.html
https://lists.ozlabs.org/pipermail/devicetree-discuss/2012-September/020183.html
https://lists.ozlabs.org/pipermail/devicetree-discuss/2012-September/020181.html

Note: those patches are against upstream dtc. If you wish to test this series, apply the dtc patches to upstream dtc, build it, and copy the resultant dtc binary over the top of scripts/dtc/dtc.

Quoted 6 lines
Quoted 4 lines

Stephen Warren (3):
kbuild: introduce cmd_dtc_cpp
ARM: use cmd_dtc_cpp for compilation of *.dts-cpp to *.dtb
ARM: tegra: compile all DT files with cpp

I do not like the extention

It is a bit unwieldy. Perhaps *.dtsp, *.dtsip would be better.

Quoted 1 line

can we run gcc everytime?

Not without editing all the device tree files; any property (or node) name the starts with a # must be escaped; changed from "#foo" to "\#foo" to avoid cpp attempting to interpret it as a pre-processor directive.

Quoted 3 lines

or just do as done for lds

*.dts.S

.S means assembly. (that's why I went with .dts-cpp rather than .dts.cpp).