summaryrefslogtreecommitdiff
path: root/tools/dtoc/fdt.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-27 07:38:22 -0600
committerSimon Glass <sjg@chromium.org>2017-06-02 10:16:48 -0600
commitb4360206a4bc67404125b0478132aeaeea41683f (patch)
tree2c972001e3388a272993cff51869f856bdb3cf0b /tools/dtoc/fdt.py
parent4a28b007031404f5cf0a18e0b79d1e6f7ec982b0 (diff)
fdt: Support use of the new python libfdt library
Use the new library if available, while retaining backwards compatibility with the old library for now. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/fdt.py')
-rw-r--r--tools/dtoc/fdt.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index 816fdbe525..c40b9b6bab 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -96,6 +96,7 @@ class PropBase:
TYPE_INT: a byte-swapped integer stored as a 4-byte string
TYPE_BYTE: a byte stored as a single-byte string
"""
+ bytes = str(bytes)
size = len(bytes)
strings = bytes.split('\0')
is_string = True