[PATCH] Open Firmware device tree virtual filesystem

Segher Boessenkool segher at kernel.crashing.org
Sun Dec 31 22:40:00 EST 2006


>> +A regular file in ofwfs contains the exact byte sequence that
>> +comprises the OFW property value.  Properties are not reformatted
>> +into text form, so numeric property values appear as binary
>> +integers.  While this is inconvenient for viewing, it is generally
>> +easier for programs that read property values, and it means that
>> +Open Firmware documentation about property values applies
>> +directly, without having to separately document an ASCII
>> +transformation (which would have to separately specified for
>> +different kinds of properties).
>
> I appreciate the ASCII formatting that openpromfs currently does.

The text representation (in openpromfs) is *useless*, since it cannot
be transformed back into the binary representation.

Most tools have an easier time using the raw binary version too.
If a user wants to see text, they can use an "lsdevtree" program.

> Perhaps, should OFWFS be used, it could offer both?

Such transformations don't belong in the kernel but in userland.

>> +The recommended mount point for ofwfs is /ofw.  (TBD: Should it be
>> +mounted somewhere under /sys instead?)
>
> Somewhere in /sys/firmware perhaps.

While I hate deep paths, /sys/firmware/device-tree does sound good.


Segher




More information about the Devel mailing list