mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
binman: Add a SetCalculatedProperties() method
Once binman has packed the image, the position and size of each entry is known. It is then possible for binman to update the device tree with these positions. Since placeholder values have been added, this does not affect the size of the device tree and therefore the packing does not need to be performed again. Add a new SetCalculatedProperties method to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ecab89737a
commit
078ab1a2f5
7 changed files with 67 additions and 9 deletions
|
@ -54,6 +54,17 @@ class Image:
|
|||
self._filename = filename
|
||||
self._section = bsection.Section('main-section', self._node)
|
||||
|
||||
def AddMissingProperties(self):
|
||||
"""Add properties that are not present in the device tree
|
||||
|
||||
When binman has completed packing the entries the position and size of
|
||||
each entry are known. But before this the device tree may not specify
|
||||
these. Add any missing properties, with a dummy value, so that the
|
||||
size of the entry is correct. That way we can insert the correct values
|
||||
later.
|
||||
"""
|
||||
self._section.AddMissingProperties()
|
||||
|
||||
def ProcessFdt(self, fdt):
|
||||
return self._section.ProcessFdt(fdt)
|
||||
|
||||
|
@ -82,6 +93,9 @@ class Image:
|
|||
"""Check that entries do not overlap or extend outside the image"""
|
||||
self._section.CheckEntries()
|
||||
|
||||
def SetCalculatedProperties(self):
|
||||
self._section.SetCalculatedProperties()
|
||||
|
||||
def ProcessEntryContents(self):
|
||||
"""Call the ProcessContents() method for each entry
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue