"""
self.fdt = fdt_select.FdtScan(self._dtb_fname)
+ def ScanNode(self, root):
+ for node in root.subnodes:
+ if 'compatible' in node.props:
+ status = node.props.get('status')
+ if (not options.include_disabled and not status or
+ status.value != 'disabled'):
+ self._valid_nodes.append(node)
+ phandle_prop = node.props.get('phandle')
+ if phandle_prop:
+ phandle = phandle_prop.GetPhandle()
+ self._phandle_node[phandle] = node
+
+ # recurse to handle any subnodes
+ self.ScanNode(node);
+
def ScanTree(self):
"""Scan the device tree for useful information
_valid_nodes: A list of nodes we wish to consider include in the
platform data
"""
- node_list = []
self._phandle_node = {}
+ self._valid_nodes = []
+ return self.ScanNode(self.fdt.GetRoot());
+
for node in self.fdt.GetRoot().subnodes:
if 'compatible' in node.props:
status = node.props.get('status')