aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-09-14 04:57:13 -0600
committerSimon Glass <sjg@chromium.org>2018-09-28 11:09:01 -0600
commitfa80c25c09a6c59be4df9c42b4a02538d8a07382 (patch)
tree63d4ca476dd70999fbbe25d749d2e5165ff4b919 /tools/binman/control.py
parent0bfa7b09ba16f4ffaf0cfc9315336aaa708dcd26 (diff)
downloadu-boot-fa80c25c09a6c59be4df9c42b4a02538d8a07382.zip
u-boot-fa80c25c09a6c59be4df9c42b4a02538d8a07382.tar.gz
u-boot-fa80c25c09a6c59be4df9c42b4a02538d8a07382.tar.bz2
dtoc: Allow syncing of the device tree back to a file
At present we require the caller to manually update the device tree using individual calls to libfdt functions. This is not ideal. It would be better if we could make changes using the Python structure and then call a Sync() function to write them back. Add this feature to the Fdt class. Update binman and the tests to match. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 8c48008..ded1b71 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -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()