binman: Obtain the list of device trees from the config

We always have a device tree for U-Boot proper. But we may also have one
for SPL and TPL. Add a new Entry method to find out what DTs an entry
has, and use that list when updating DTs.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-09-14 04:57:22 -06:00
parent f46621d255
commit 539aece516
5 changed files with 46 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
from __future__ import print_function
from collections import OrderedDict
from sets import Set
import sys
import fdt_util
@@ -92,6 +93,13 @@ class Section(object):
entry.SetPrefix(self._name_prefix)
self._entries[node.name] = entry
def GetFdtSet(self):
"""Get the set of device tree files used by this image"""
fdt_set = Set()
for entry in self._entries.values():
fdt_set.update(entry.GetFdtSet())
return fdt_set
def SetOffset(self, offset):
self._offset = offset