From 078ab1a2f5a9901f5f9983163d4f98b8d94bfda0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 6 Jul 2018 10:27:41 -0600 Subject: 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 --- tools/binman/control.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/binman/control.py') diff --git a/tools/binman/control.py b/tools/binman/control.py index 5325a6a0066..eafabf05c7c 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() -- cgit v1.2.3