diff --git a/src/libdt.c b/src/libdt.c index 50f0da8..7319260 100644 --- a/src/libdt.c +++ b/src/libdt.c @@ -1930,8 +1930,15 @@ struct device_node *of_read_proc_devicetree(void) { struct device_node *root; + void *fdt; int ret; + fdt = read_file("/sys/firmware/fdt", NULL); + if (fdt) { + root = of_unflatten_dtb(fdt); + return root; + } + root = of_new_node(NULL, NULL); ret = scan_proc_dir(root, "/sys/firmware/devicetree/base");