From: Simon Glass Date: Tue, 17 Jul 2018 13:25:29 -0600 Subject: [U-Boot] [PATCH 06/29] binman: Update the device-tree file on exit In-Reply-To: <20180717192552.198496-1-sjg@chromium.org> References: <20180717192552.198496-1-sjg@chromium.org> Message-ID: <20180717192552.198496-7-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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