def testGetPhandleList(self): dtb = fdt.FdtScan(find_dtb_file('dtoc_test_phandle.dts')) node = dtb.GetNode('/phandle-source2') self.assertEqual([1], fdt_util.GetPhandleList(node, 'clocks')) node = dtb.GetNode('/phandle-source') self.assertEqual([1, 2, 11, 3, 12, 13, 1], fdt_util.GetPhandleList(node, 'clocks')) self.assertEqual(None, fdt_util.GetPhandleList(node, 'missing'))
def __init__(self, section, etype, node): super().__init__(section, etype, node) self.content = fdt_util.GetPhandleList(self._node, 'content') if not self.content: self.Raise("Vblock must have a 'content' property") (self.keydir, self.keyblock, self.signprivate, self.version, self.kernelkey, self.preamble_flags) = self.GetEntryArgsOrProps([ EntryArg('keydir', str), EntryArg('keyblock', str), EntryArg('signprivate', str), EntryArg('version', int), EntryArg('kernelkey', str), EntryArg('preamble-flags', int)])
def __init__(self, section, etype, node): super().__init__(section, etype, node) self.content = fdt_util.GetPhandleList(self._node, 'content') if not self.content: self.Raise("Collection must have a 'content' property")