summaryrefslogtreecommitdiff
path: root/tools/dtoc/fdt_normal.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dtoc/fdt_normal.py')
-rw-r--r--tools/dtoc/fdt_normal.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/dtoc/fdt_normal.py b/tools/dtoc/fdt_normal.py
index 861f60c7d0..d9ba4aca80 100644
--- a/tools/dtoc/fdt_normal.py
+++ b/tools/dtoc/fdt_normal.py
@@ -83,8 +83,11 @@ class FdtNormal(Fdt):
"""
def __init__(self, fname):
Fdt.__init__(self, fname)
- with open(self._fname) as fd:
- self._fdt = fd.read()
+ if self._fname:
+ self._fname = fdt_util.EnsureCompiled(self._fname)
+
+ with open(self._fname) as fd:
+ self._fdt = fd.read()
def GetFdt(self):
"""Get the contents of the FDT