aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-09-14 04:57:11 -0600
committerSimon Glass <sjg@chromium.org>2018-09-28 11:09:01 -0600
commita326b495cdcfd56507841e38158683e6e4d5894c (patch)
treeed9f9a1077bda5d9c09346c17be149e00e017776 /tools/binman/entry.py
parent35b384cbe5d40e618391cc076409e89cedf9c863 (diff)
downloadu-boot-a326b495cdcfd56507841e38158683e6e4d5894c.zip
u-boot-a326b495cdcfd56507841e38158683e6e4d5894c.tar.gz
u-boot-a326b495cdcfd56507841e38158683e6e4d5894c.tar.bz2
binman: Tidy up the vblock entry
At present if there are two vblock entries an image their contents are written to the same file in the output directory. This prevents checking the contents of each separately. Fix this by adding part of the entry path to the filename, and add some missing comments. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 77cfab9..e671a2e 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -456,3 +456,21 @@ features to produce new behaviours.
if missing:
raise ValueError('Documentation is missing for modules: %s' %
', '.join(missing))
+
+ def GetUniqueName(self):
+ """Get a unique name for a node
+
+ Returns:
+ String containing a unique name for a node, consisting of the name
+ of all ancestors (starting from within the 'binman' node) separated
+ by a dot ('.'). This can be useful for generating unique filesnames
+ in the output directory.
+ """
+ name = self.name
+ node = self._node
+ while node.parent:
+ node = node.parent
+ if node.name == 'binman':
+ break
+ name = '%s.%s' % (node.name, name)
+ return name