1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 01:02:19 +02: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:
Simon Glass
2018-07-06 10:27:41 -06:00
parent ecab89737a
commit 078ab1a2f5
7 changed files with 67 additions and 9 deletions

View File

@@ -144,6 +144,8 @@ def Binman(options, args):
# without changing the device-tree size, thus ensuring that our
# entry positions remain the same.
for image in images.values():
if options.update_fdt:
image.AddMissingProperties()
image.ProcessFdt(dtb)
dtb.Pack()
@@ -159,6 +161,8 @@ def Binman(options, args):
image.PackEntries()
image.CheckSize()
image.CheckEntries()
if options.update_fdt:
image.SetCalculatedProperties()
image.ProcessEntryContents()
image.WriteSymbols()
image.BuildImage()