[U-Boot] [PATCH 06/29] binman: Update the device-tree file on exit

Simon Glass sjg at chromium.org
Tue Jul 17 19:25:29 UTC 2018


Binman can make additions to the device tree which are useful to U-Boot
when it runs (e.g. the position of each entry in the image). Write the
changes back so that they are easily accessible.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/binman/control.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/binman/control.py b/tools/binman/control.py
index 17c6d7a2d2..97652334e0 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -168,8 +168,12 @@ def Binman(options, args):
                 image.BuildImage()
                 if options.map:
                     image.WriteMap()
+            # Write the updated FDT to our output file, and also back to the
+            # input file, so it is visible after binman exits.
             with open(fname, 'wb') as outfd:
                 outfd.write(dtb.GetContents())
+            with open(dtb_fname, 'wb') as outfd:
+                outfd.write(dtb.GetContents())
         finally:
             tools.FinaliseOutputDir()
     finally:
-- 
2.18.0.203.gfac676dfb9-goog



More information about the U-Boot mailing list