Skip to contentSkip to conversation

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

DISCUSSION Laurent Pinchart 2 participants 3 messages Oct 2, 2007

lore
Share & tools
lore
#0 lore raw

Hi everybody,

it seems linuxppc-embedded is going away. I should have posted this here in= =20
the first place, so sorry for the cross-post.

I need to export some read-only board-specific information (serial number,= =20
boot mode jumper configuration, ...) that are collected from various locati= ons=20
(CPLD, flash, U-Boot, ...) to userspace applications.

Could anyone advice me on the preferred way to do that ? I can easily add a= =20
quick&dirty sysfs/procfs based implementation, but I was wondering if there= =20
was some kind of clean and generic way.

Best regards,

=2D-=20
Laurent Pinchart
CSE Semaphore Belgium

Chauss=E9e de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
=46 +32 (2) 387 42 75

#1 lore raw
Quoted 5 lines · Laurent Pinchart

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.

Quoted 7 lines

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 ? :-)

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 ..

Ben.

#2 lore raw

Hi Ben,

Quoted 11 lines · Benjamin Herrenschmidt
Quoted 10 lines · Laurent Pinchart

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 a=

dd

Quoted 4 lines
Quoted 2 lines

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=3Dppc. I know I shouldn't :-) The MPC8272 isn't=
well=20
supported in ARCH=3Dpowerpc. Scott Wood submitted some patches I need befor= e=20
switching.

Quoted 3 lines

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,

=2D-=20
Laurent Pinchart
CSE Semaphore Belgium

Chauss=C3=A9e de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
=46 +32 (2) 387 42 75