aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-07-06 10:27:41 -0600
committerSimon Glass <sjg@chromium.org>2018-07-09 09:11:00 -0600
commit078ab1a2f5a9901f5f9983163d4f98b8d94bfda0 (patch)
tree469e20126f5566717b8a0cd35395b1c029e42139 /tools/binman/control.py
parentecab89737a4eb58c043388b1ca1c0f1dfdaa3346 (diff)
downloadu-boot-078ab1a2f5a9901f5f9983163d4f98b8d94bfda0.zip
u-boot-078ab1a2f5a9901f5f9983163d4f98b8d94bfda0.tar.gz
u-boot-078ab1a2f5a9901f5f9983163d4f98b8d94bfda0.tar.bz2
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>
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 5325a6a..eafabf0 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -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()