System Software Meeting Minutes, 2006-12-26

Mitch Bradley wmb at firmworks.com
Thu Dec 28 13:45:54 EST 2006


I like the idea of a new virtual filesystem.

The proc code is quite simple and straightforward, whereas i quickly 
fell into a snakepit of interrelated structs when I tried to grok 
sysfs.  And the text representation requirement is a problem because OFW 
device tree properties have specific serialization rules that include 
binary data in many cases.

The API for /proc is just fine.  I wonder if we could essentially clone 
it (or even reuse most of the functions verbatim), but mount it on /ofw .


Jonathan Corbet wrote:
> Mitch Bradley <wmb at firmworks.com> wrote:
>
>   
>> /proc/device-tree is working.  It requires a kernel patch and a
>> (fairly low risk) firmware change.  Andres suggests that we try it out
>> as-it, without first converting it to sysfs, and publicize it on LKML
>> to get feedback.  When Corbet reappears, we will ask him for help with
>> the sysfs conversion if that turns out to be necessary.  Andres will
>> help Mitch package the patches.
>>     
>
> I've reappeared - sort of.  Current weather forecasts suggest that some
> skiing time before school restarts may be mandatory.
>
> If I understand this patch, it's a means for exporting the firmware's
> view of the hardware to user space.  I can pretty well guarantee that
> any implementation based on /proc is not going to get into the mainline
> kernel.  I, personally, would not even post it.
>
> Sysfs is more possible.  Some thoughts on that:
>
>  - Sysfs already implements a representation of the device tree.  It's
>    worth pondering whether that representation can be extended to
>    contain the desired information.
>
>  - There are some firm rules about sysfs files; among other things, each
>    must contain exactly one value in a textual representation.  So some
>    of the /proc/device-tree files would have to be reworked to meet
>    those expectations.
>
> An alternative which may be worth considering is simply creating a new
> virtual filesystem.  We could create olpcfs, put anything we want into
> it, and there should be few complaints.  It could be mounted on /olpc or
> wherever.  And it would all be pretty easy to do.
>
> Just a thought.
>
> jon
>
>   



More information about the Devel mailing list