return compress
return None
+def compress_name(compress):
+ """Look up the name of a compression algorithm
+
+ Args:
+ compress: Compression algorithm number to find (COMPRESS_...)
+
+ Returns:
+ Compression algorithm name (string)
+
+ Raises:
+ KeyError if the algorithm number is invalid
+ """
+ return COMPRESS_NAMES[compress]
+
def align_int(val, align):
"""Align a value up to the given alignment
entry.AddMissingProperties()
if entry._cbfs_compress:
state.AddZeroProp(entry._node, 'uncomp-size')
+ # Store the 'compress' property, since we don't look at
+ # 'cbfs-compress' in Entry.ReadData()
+ state.AddString(entry._node, 'compress',
+ cbfs_util.compress_name(entry._cbfs_compress))
def SetCalculatedProperties(self):
"""Set the value of device-tree properties calculated by binman"""
Entry.ListEntries(self, entries, indent)
for entry in self._cbfs_entries.values():
entry.ListEntries(entries, indent + 1)
+
+ def GetEntries(self):
+ return self._cbfs_entries