scripts/dts/extract_dts_includes: Limit conf file to DT prefix defines

Only write out to the .conf file if the define starts with "DT_".  The
the conf file should only be used by sanitycheck, west, and
kconfigfunctions at this time.  In the future we should remove it, so
lets limit what's it exposing at this time.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-02-09 06:30:51 -06:00 committed by Kumar Gala
commit 1f1282afa4

View file

@ -392,14 +392,15 @@ def write_conf(f):
f.write('# ' + node.split('/')[-1] + '\n')
for prop in sorted(defs[node]):
if prop != 'aliases':
if prop != 'aliases' and prop.startswith("DT_"):
f.write('%s=%s\n' % (prop, defs[node][prop]))
for alias in sorted(defs[node]['aliases']):
alias_target = defs[node]['aliases'][alias]
if alias_target not in defs[node]:
alias_target = defs[node]['aliases'][alias_target]
f.write('%s=%s\n' % (alias, defs[node].get(alias_target)))
if alias.startswith("DT_"):
f.write('%s=%s\n' % (alias, defs[node].get(alias_target)))
f.write('\n')