dtoc: Allow syncing of the device tree back to a file
[oweals/u-boot.git] / tools / binman / control.py
index 8c48008fc7535327446c6977148ad7717c1b1cec..ded1b71109bb3337d37604a7fb4cd7dccf0e83d4 100644 (file)
@@ -183,6 +183,7 @@ def Binman(options, args):
                     image.AddMissingProperties()
                 image.ProcessFdt(dtb)
 
+            dtb.Sync(auto_resize=True)
             dtb.Pack()
             dtb.Flush()
 
@@ -199,6 +200,7 @@ def Binman(options, args):
                 image.SetImagePos()
                 if options.update_fdt:
                     image.SetCalculatedProperties()
+                    dtb.Sync()
                 image.ProcessEntryContents()
                 image.WriteSymbols()
                 image.BuildImage()