lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 14 Nov 2012 13:18:24 -0700
From:	Stephen Warren <swarren@...dotorg.org>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	Michal Marek <mmarek@...e.cz>,
	David Gibson <david@...son.dropbear.id.au>,
	Jon Loeliger <jdl@....com>,
	Rob Herring <rob.herring@...xeda.com>,
	Scott Wood <scottwood@...escale.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
	Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org,
	devicetree-discuss@...ts.ozlabs.org, linux-arch@...r.kernel.org,
	Stephen Warren <swarren@...dia.com>
Subject: Re: [PATCH V6 2/2] kbuild: run the pre-processor on *.dts files

On 11/14/2012 12:25 PM, Grant Likely wrote:
> On Mon, 12 Nov 2012 13:58:27 -0700, Stephen Warren <swarren@...dotorg.org> wrote:
>> From: Stephen Warren <swarren@...dia.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ