dtoc: Allow the device tree to be compiled from source

If a source device tree is provide to the Fdt() constructors, compile it
automatically. This will be used in tests, where we want to build a
particular test .dts file and check that it works correctly in binman.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2016-07-25 18:59:10 -06:00
parent 0faf6144fd
commit 355c67c35a
3 changed files with 48 additions and 2 deletions

View File

@@ -80,6 +80,8 @@ class FdtFallback(Fdt):
def __init__(self, fname):
Fdt.__init__(self, fname)
if self._fname:
self._fname = fdt_util.EnsureCompiled(self._fname)
def GetSubNodes(self, node):
"""Returns a list of sub-nodes of a given node