summaryrefslogtreecommitdiff
path: root/tools/dtoc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-26 00:59:13 (GMT)
committerSimon Glass <sjg@chromium.org>2016-09-19 03:04:39 (GMT)
commit0170804f60b19a2033ac39964fcd192a0c7eda42 (patch)
treeb37fd3dca5b08d6683bd740952054199a2987342 /tools/dtoc
parent346179f0d3383e88f7df117b13820df70f68c74a (diff)
downloadu-boot-fsl-qoriq-0170804f60b19a2033ac39964fcd192a0c7eda42.tar.xz
dtoc: Move to using bytearray
Since we want to be able to change the in-memory device tree using libfdt, use a bytearray instead of a string. This makes interfacing from Python easier. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc')
-rw-r--r--tools/dtoc/fdt_normal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dtoc/fdt_normal.py b/tools/dtoc/fdt_normal.py
index 4a667a1..eb45742 100644
--- a/tools/dtoc/fdt_normal.py
+++ b/tools/dtoc/fdt_normal.py
@@ -110,7 +110,7 @@ class FdtNormal(Fdt):
self._fname = fdt_util.EnsureCompiled(self._fname)
with open(self._fname) as fd:
- self._fdt = fd.read()
+ self._fdt = bytearray(fd.read())
def GetFdt(self):
"""Get the contents of the FDT