What's the preferred way to export board information to userspace ?

Laurent Pinchart laurentp at cse-semaphore.com
Tue Oct 2 19:02:34 EST 2007


Hi Ben,

On Tuesday 02 October 2007 10:39, Benjamin Herrenschmidt wrote:
> On Tue, 2007-10-02 at 10:10 +0200, Laurent Pinchart wrote:
> > Hi everybody,
> >
> > it seems linuxppc-embedded is going away. I should have posted this here
> > in the first place, so sorry for the cross-post.
> >
> > I need to export some read-only board-specific information (serial
> > number, boot mode jumper configuration, ...) that are collected from
> > various locations (CPLD, flash, U-Boot, ...) to userspace applications.
> >
> > Could anyone advice me on the preferred way to do that ? I can easily add
> > a quick&dirty sysfs/procfs based implementation, but I was wondering if
> > there was some kind of clean and generic way.
>
> Userspace can read /proc/device-tree no ? :-)

Except I'm still using ARCH=ppc. I know I shouldn't :-) The MPC8272 isn't well 
supported in ARCH=powerpc. Scott Wood submitted some patches I need before 
switching.

> Appart from that, it's common to stick that sort of thing
> in /proc/cpuinfo... /sys/firmware may be an option if you have shitloads
> of stuff ..

It's not really CPU information, but I guess I can stick that in there.

Best regards,

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75



More information about the Linuxppc-dev mailing list