[PATCH] Open Firmware device tree virtual filesystem

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Jan 1 23:05:59 EST 2007


> The filesystem bit is for groveling around and getting information
> from the shell prompt, or shell scripts.  Text processing.
> 
> If you want the binary bits, export it with something like
> /dev/openprom.  We don't generally export binary representation
> files out of /proc or /sys, in fact this rule I believe is layed
> our precisely somewhere at least in the sysfs case.

Well, on powerpc, we've always had it binary. We expose the files with
the exact binary content of the properties. We then use paulus' "lsprop"
tool which is installed by default on pretty much all ppc distros, which
duplicates OF's heuristics to display property contents (as strings, hex
values or mix of both depending on that they contain).

It has proved a good idea in general as I can easily get an exact
device-tree dump from users by asking for a tarball of /proc/device-tree
and in some case, the data in there -is- binary (For example, the EDID
properties for monitors left by video drivers, or things like that).

Ben.





More information about the Devel mailing list