identifying a 1.75
pgf at laptop.org
Tue Aug 9 19:31:39 EDT 2011
stephen john smoogen wrote:
> On Tue, Aug 9, 2011 at 16:31, Paul Fox <pgf at laptop.org> wrote:
> > on XO-1 and XO-1.5, we were able to discover the model of the laptop
> > from the information under /sys/class/dmi/id. the DMI schema comes
> > from the PC world, and we can't expect it to exist on ARM.
> > there was also information to be found in /ofw on those machines, like
> > serial number, and uuid. the hex model designator found there was
> > used as a fallback if the dmi tree wasn't there (on older XO-1
> > firmware).
> > on 1.75, there's no dmi tree, and /ofw has moved to /proc/device-tree,
> > so we need to modify a lot of places that try and dig up platform
> > info. (see #11116)
> > so i'm floating the attached script, tentatively named olpc-hwinfo,
> > as a strawman. i think it gives access to the most often needed info,
> > and can obviously be expanded if needed. it would go in olpc-utils,
> > which would put it in /usr/sbin (since some clients live in /usr/sbin).
> > thoughts/comments? better approaches? obvious additions?
> Check the CPU? Shouldn't /proc/cpuinfo tell you what you have since
> the major change is cpu?
yeah, i thought of that. it's likely the next OLPC product will use
the same processor, so we'll need something else in the future anyway.
it happens that /proc/cpuinfo even says:
Hardware : OLPC XO-1.75
(since ARM kernels provide slightly different info than x86 kernels),
which makes it very tempting to use that.
but if we're lucky, the next product might share the same kernel (so
that string may change). in any case, i think i'd prefer using info
that sourced from the hardware or firmware rather than a compiled in
(but maybe i'm missing something here, and that line in /proc/cpuinfo
is exactly what we should be using. anyone?)
paul fox, pgf at laptop.org
More information about the Devel