mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
binman: Allow entries to expand after packing
Add support for detecting entries that change size after they have already been packed, and re-running packing when it happens. This removes the limitation that entry size cannot change after PackEntries() is called. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
bf6906bab4
commit
c52c9e7da8
12 changed files with 184 additions and 25 deletions
|
@ -55,6 +55,10 @@ class Image:
|
|||
self._filename = filename
|
||||
self._section = bsection.Section('main-section', None, self._node, self)
|
||||
|
||||
def Raise(self, msg):
|
||||
"""Convenience function to raise an error referencing an image"""
|
||||
raise ValueError("Image '%s': %s" % (self._node.path, msg))
|
||||
|
||||
def GetFdtSet(self):
|
||||
"""Get the set of device tree files used by this image"""
|
||||
return self._section.GetFdtSet()
|
||||
|
@ -100,6 +104,10 @@ class Image:
|
|||
"""
|
||||
self._section.GetEntryOffsets()
|
||||
|
||||
def ResetForPack(self):
|
||||
"""Reset offset/size fields so that packing can be done again"""
|
||||
self._section.ResetForPack()
|
||||
|
||||
def PackEntries(self):
|
||||
"""Pack all entries into the image"""
|
||||
self._section.PackEntries()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue