linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Michal Marek <mmarek@suse.cz>,
	David Gibson <david@gibson.dropbear.id.au>,
	Jon Loeliger <jdl@jdl.com>, Rob Herring <rob.herring@calxeda.com>,
	Scott Wood <scottwood@freescale.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, linux-arch@vger.kernel.org,
	Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH V6 2/2] kbuild: run the pre-processor on *.dts files
Date: Wed, 14 Nov 2012 13:18:24 -0700	[thread overview]
Message-ID: <50A3FC90.7030105@wwwdotorg.org> (raw)
In-Reply-To: <20121114192548.59F093E0B7C@localhost>

On 11/14/2012 12:25 PM, Grant Likely wrote:
> On Mon, 12 Nov 2012 13:58:27 -0700, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> Modify cmd_dtc to run the C pre-processor on the input .dts file before
>> passing it to dtc for final compilation. This allows the use of #define
>> and #include within the .dts file.

> Ugh, I'm definitely nervous about turning this on because of the long
> term implications so I'm going to punt on actually making a decision
> about it for the momemnt. However, I do have a question...

Hmmm. So how do we get to a decision on this then?

>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>> index 425578e..33432f4 100644
>> --- a/scripts/Makefile.lib
>> +++ b/scripts/Makefile.lib
>> @@ -269,6 +269,15 @@ cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile
>>  $(obj)/%.dtb: $(src)/dts/%.dts FORCE
>>  	$(call if_changed_dep,dtc)
>>  
>> +dtc-tmp = $(subst $(comma),_,$(dot-target).dts)
>> +
>> +quiet_cmd_dtc_cpp = DTC+CPP $@
>> +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)
>> +
>> +$(obj)/%.dtb: $(src)/dts/%.dtsp FORCE
>> +	$(call if_changed_dep,dtc_cpp)
> 
> Why this instead of a "%.dts: %.dtsp" rule? Then the exact same dtc rule
> gets used in both cases.
> 
> The .dtb rule is probably already rather oddball in that it puts the
> output one directory below the input. That probably should be cleaned
> up.

I was a little nervous about potentially having some *.dts be primary
source files, and others be derived from *.dtsp (assuming that we
convert platforms to this new feature as desired, rather than en-mass).
It seems like it'd just cause confusion; people might just end up
accidentally editing a *.dts that was generated without realizing it.

  reply	other threads:[~2012-11-14 20:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 20:58 [PATCH V6 1/2] kbuild: centralize .dts->.dtb rule Stephen Warren
2012-11-12 20:58 ` Stephen Warren
2012-11-12 20:58 ` [PATCH V6 2/2] kbuild: run the pre-processor on *.dts files Stephen Warren
2012-11-12 20:58   ` Stephen Warren
2012-11-14 19:25   ` Grant Likely
2012-11-14 20:18     ` Stephen Warren [this message]
2012-11-14 22:25       ` Grant Likely
2012-11-14 22:25         ` Grant Likely
2012-11-14 19:20 ` [PATCH V6 1/2] kbuild: centralize .dts->.dtb rule Grant Likely

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=50A3FC90.7030105@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jdl@jdl.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=plagnioj@jcrosoft.com \
    --cc=rob.herring@calxeda.com \
    --cc=sam@ravnborg.org \
    --cc=scottwood@freescale.com \
    --cc=swarren@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).