示例#1
0
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]
示例#2
0
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
示例#3
0
def get_child_props(dtb, node):
    __files_exist(dtb)
    return syscall.call_out('fdtget -p "%s" "%s"' % (dtb, node))