diff options
author | Simon Glass <sjg@chromium.org> | 2018-09-14 04:57:13 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-09-28 11:09:01 -0600 |
commit | fa80c25c09a6c59be4df9c42b4a02538d8a07382 (patch) | |
tree | 63d4ca476dd70999fbbe25d749d2e5165ff4b919 /tools/binman | |
parent | 0bfa7b09ba16f4ffaf0cfc9315336aaa708dcd26 (diff) | |
download | u-boot-fa80c25c09a6c59be4df9c42b4a02538d8a07382.tar.gz |
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')
-rw-r--r-- | tools/binman/control.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py index 8c48008fc7..ded1b71109 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() |