Jetson-io dtc.py bug

Would it be possible to fix a minor bug in jetson-io please that affects custom boards? The patch required is as follows:

Edit the opt/nvidia/jetson-io/Utils/dtc.py file and change the lines:

def find_compatible_dtbo_files(compat, path):
    dtbos = []
    for dtbo in glob.glob(os.path.join(path, '*.dtbo')):
        c = get_compatible(dtbo).split()
        if c is None:
            continue
        for c_str in c:
            if c_str in compat:
                dtbos.append(dtbo)
                break
    return dtbos

to:

def find_compatible_dtbo_files(compat, path):
    dtbos = []
    for dtbo in glob.glob(os.path.join(path, '*.dtbo')):
        c = get_compatible(dtbo)
        if c is None:
            continue
        for c_str in c.split():
            if c_str in compat:
                dtbos.append(dtbo)
                break
    return dtbos

Notice how the location of the split() call is moved. Without the patch, the python script throws an error when get_compatible(dtbo) returns None.

Thanks.

1 Like

hello dan.madill,

thanks for sharing, I’ll arrange resources to review this patch.

Thank you!

hello dan.madill,

FYI,
we’ve complete code-review to approve this change, please expect it’ll include into the next public release.
thanks

Hello JerryChang,

That’s great! Thank you!

Dan