All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] device tree compilation problems.
Date: Fri, 13 Apr 2012 10:45:04 -0700	[thread overview]
Message-ID: <CAPnjgZ09OSft7dHcN9V2_X_g8296FMSY+uSc-Q_jqLNQdzzaDg@mail.gmail.com> (raw)
In-Reply-To: <20120123080825.7EED616BEE15@gemini.denx.de>

Hi Wolfgang,

On Mon, Jan 23, 2012 at 12:08 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Simon Glass,
>
> In message <CAPnjgZ3s2+w0PPyUh8c4JqgSEmSbZwWDeqBqUWKz_Bf1O0O6UQ@mail.gmail.com> you wrote:
>>
>> > ?$(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
> ...
>> The lines above are running the .dts file through the C proprocessor
>> to create a tmp file, which is then compiled. It is only really used
>> to get the name of the SOC's device tree include file - see the
>> definition of DTS_CPPFLAGS.
>
> Is there actually any reason for the "cat" (the UUOCA seems to be
> extinct these days, cf. http://partmaps.org/era/unix/award.html) and
> the tmp file?
>
> Why not rewriting as
>
> ? ? ? ?$(CPP) -P $(DTS_CPPFLAGS) < $< | \
> ? ? ? ?$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} -

Any errors produce messages with line numbers, and it is nice for
people to be able to look up the file, go to the right line and see
what is actually being compiled. So that's why I did this - although I
certainly could use tee.

But instead I have been working on getting rid of the need for the CPP
step - the -i flag (include path) has now made it into dtc so before
long I will submit a patch to tidy up this logic and remove the
problem.

>
> ?

Regards,
Simon

>
> 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
> ######## This message was made from 100% recycled electrons. ########

      reply	other threads:[~2012-04-13 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23  2:16 [U-Boot] device tree compilation problems hanumant
2012-01-23  7:09 ` Simon Glass
2012-01-23  8:08   ` Wolfgang Denk
2012-04-13 17:45     ` Simon Glass [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnjgZ09OSft7dHcN9V2_X_g8296FMSY+uSc-Q_jqLNQdzzaDg@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.