dgibson / dtc

Device Tree Compiler
226 stars 133 forks source link

Add limited read-only support for older (V2 and V3) device tree to libfdt. #12

Closed nwhitehorn closed 6 years ago

nwhitehorn commented 6 years ago

This can be useful in particular in the kernel when booting on systems with FDT-emitting firmware that is out of date. Releases of kexec-tools on ppc64 prior to the end of 2014 are notable examples of such.

The limitation to the read-only support is that the fdt_get_property() API is intrinsically incompatible with older versions of the device tree as a result of the 8-byte alignment of properties, so will return BADVERSION. The fdt_getprop() variant is, however, supported on the older structures.

nwhitehorn commented 6 years ago

Merged.