[U-Boot] [PATCH 01/15] fdt: Use sed instead of cpp to pre-process the dtc

Mike Frysinger vapier at gentoo.org
Fri Dec 28 17:42:03 CET 2012


On Friday 28 December 2012 09:55:52 Simon Glass wrote:
> On Thu, Dec 27, 2012 at 4:03 PM, Stephen Warren wrote:
> > On 12/26/2012 03:28 PM, Simon Glass wrote:
> >> Include file support in dtc is still not available in common
> >> distributions so we need to keep our preprocessing arrangement around
> >> for a little longer.
> >> 
> >> But # is commonly used in FDT files, so use sed instead of cpp for this
> >> preprocessing.
> > 
> > This sounds like the wrong approach to me. I'd suggest using what I
> > 
> > proposed for the kernel:
> >> cmd_dtc_cpp = $(CPP) $(cpp_flags) -D__DTS__ -x assembler-with-cpp -o
> >> $(dtc-tmp) $< ; \
> >> 
> >>         $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS)
> >>         $(dtc-tmp)
> > 
> > The "-x assembler-with-cpp" is what solves the # problem IIRC.
> 
> I originally used CPP as an expedient means of converting the
> ARCH_CPU_DTS symbol until we all have a dtc with include path support.
> 
> Are you saying that we want to actually use the CPP on tthe device
> tree and (presumably) use U-Boot include files within the FDT?

sounds reasonable to me.  we already do it with linker scripts, and if the 
kernel is doing it, it means we can (possibly) share more.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121228/25432cdf/attachment.pgp>


More information about the U-Boot mailing list