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>
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 @@
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