def get_prop_value(dtb, node, prop, index): __files_exist(dtb) if __prop_exists(dtb, node, prop): return None values = syscall.call_out('fdtget "%s" "%s" "%s"' % (dtb, node, prop)) if index >= len(values): return None return values[index]
def _board_partition_is_mounted(partlabel): if not syscall.call_out('findfs PARTLABEL="%s"' % partlabel): raise RuntimeError("No %s partition found!" % partlabel) return syscall.call('findmnt -n -S PARTLABEL="%s"' % partlabel) == 0
def get_child_props(dtb, node): __files_exist(dtb) return syscall.call_out('fdtget -p "%s" "%s"' % (dtb, node))