
Hi,
On 17 July 2018 at 13:25, Simon Glass sjg@chromium.org wrote:
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@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:
finally:outfd.write(dtb.GetContents()) finally: tools.FinaliseOutputDir()
-- 2.18.0.203.gfac676dfb9-goog
Actually I think this patch is a bad idea since it can cause race conditions. U-Boot's Makefile builds the .dtb, someone changes the source, then binman updates the .dtb, causing the Makefile to think that it does not need updating next time. I'll drop this patch.
Regards, Simon