aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-09-14 04:57:22 -0600
committerSimon Glass <sjg@chromium.org>2018-09-28 11:09:01 -0600
commit539aece516d87084437a38d879a1b91c661209f8 (patch)
treea45acd2eefdd43707b7f5176a1b24e008b8d3668 /tools/binman/entry.py
parentf46621d255181bd8d1e8092945ffc66147b88531 (diff)
downloadu-boot-539aece516d87084437a38d879a1b91c661209f8.zip
u-boot-539aece516d87084437a38d879a1b91c661209f8.tar.gz
u-boot-539aece516d87084437a38d879a1b91c661209f8.tar.bz2
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>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 4b87156..e5f55774 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -18,6 +18,7 @@ except:
have_importlib = False
import os
+from sets import Set
import sys
import fdt_util
@@ -164,6 +165,20 @@ class Entry(object):
def GetDefaultFilename(self):
return None
+ def GetFdtSet(self):
+ """Get the set of device trees used by this entry
+
+ Returns:
+ Set containing the filename from this entry, if it is a .dtb, else
+ an empty set
+ """
+ fname = self.GetDefaultFilename()
+ # It would be better to use isinstance(self, Entry_blob_dtb) here but
+ # we cannot access Entry_blob_dtb
+ if fname and fname.endswith('.dtb'):
+ return Set([fname])
+ return Set()
+
def AddMissingProperties(self):
"""Add new properties to the device tree as needed for this entry"""
for prop in ['offset', 'size', 'image-pos']: