aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-09-14 04:57:24 -0600
committerSimon Glass <sjg@chromium.org>2018-09-28 11:09:01 -0600
commit6ed45ba0a831393ab6c5d3355384238d2b4f47da (patch)
treebed509d46fc12e537b381c813b4020030a68450c /tools/binman/control.py
parent93d174135ac44cbbe81c87ea564488309949e6d4 (diff)
downloadu-boot-6ed45ba0a831393ab6c5d3355384238d2b4f47da.zip
u-boot-6ed45ba0a831393ab6c5d3355384238d2b4f47da.tar.gz
u-boot-6ed45ba0a831393ab6c5d3355384238d2b4f47da.tar.bz2
binman: Support updating all device tree files
Binman currently supports updating the main device tree with things like the position of each entry. Extend this support to SPL and TPL as well, since they may need (a subset of) this information. Also adjust DTB output files to have a .out extension since this seems clearer than having a .dtb extension with 'out' in the name somwhere. Also add a few missing comments and update the DT setup code to use ReadFile and WriteFile(). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 34ec74b..e326456 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -116,10 +116,8 @@ def Binman(options, args):
# output into a file in our output directly. Then scan it for use
# in binman.
dtb_fname = fdt_util.EnsureCompiled(dtb_fname)
- fname = tools.GetOutputFilename('u-boot-out.dtb')
- with open(dtb_fname) as infd:
- with open(fname, 'wb') as outfd:
- outfd.write(infd.read())
+ fname = tools.GetOutputFilename('u-boot.dtb.out')
+ tools.WriteFile(fname, tools.ReadFile(dtb_fname))
dtb = fdt.FdtScan(fname)
node = _FindBinmanNode(dtb)