mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
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>
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user