[oe] [RFC] Adding screen dimensions to machine configs

Richard Purdie rpurdie at rpsys.net
Sun Jul 8 09:26:34 UTC 2007


On Sun, 2007-07-08 at 08:16 +0100, Koen Kooi wrote:
> Paul Sokolovsky schreef:
> >   We already discussed issue of providing more exact device screen
> > properties info than currently available screen classes "smallscreen"
> > and "bigscreen". I for one was proponent of staying with those classes
> > instead of hasting with introducing too many screen parameters without
> > proper way of handling them in OE. However, it's just the matter of
> > fact that at least the most basic of them, like screen dimensions are
> > already in use by more than one package (I can point to opie and
> > fbreader out of top of mind), and so far in adhoc manner, so
> > standardizing them would be beneficial.
> > 
> >   When discussing this on IRC, Marcin Juszkiewicz pointed me to Poky's
> > formfactor package, designed to query various device properties at
> > runtime (including current screen resolution).
> > http://svn.o-hand.com/view/poky/trunk/meta/packages/formfactor/
> 
> Formfactor is a hack that does nothing what our Xserver scripts and HAL+OHM can't do. And
> we were explicitly asked *not* to merge it into OE by someone from o-hand.

The ideas in formfactor are directly lifted from zaurusd. I still wish
zaurusd could become a more generic kind of glue program like the fabled
devmand should have been but I can't be the person to do that.

> >   I think that it is great tool, and we should merge and leverage it
> > in OE by all means. But it handles only runtime configuration,
> 
> And we already have sufficient tools inplace to handle that, formfactor just muddies the
> waters. And if you take a closer look at formfactor, you'll notice it's internally
> inconsistent (e.g. dpi = resolution/size, but you need to specify all 3 in formfactor)

That was mainly because you get some weird DPI values out and often want
control of the rounding.

Formfactor does solve some problems that currently exist. Its a pain
having to patch xtscal for every machine with a rotated screen for
example (duplicating the code in the Xserver script). In the end I've
extended the Xcalibrate extension in Poky to solve that problem properly
though (xtscal no longer needs a rotate option). formfactor also gives
information about the relationship of the keyboard with the screen which
you can't get from anywhere else.

> >    Now with formfactor around, I guess it would be nice to use
> > consistent variable names for the same info. Marcin still suggested to
> > use MACHINE_ prefix for build-time (i.e. machine config) variables.
> > So, the exact topic of this RFC is adding
> > 
> > MACHINE_DISPLAY_WIDTH_PIXELS=
> > MACHINE_DISPLAY_HEIGHT_PIXELS=
> > 
> > to machine configs.
> 
> We can add those without adding formfactor.

I'd be in favour of moving the variables defined in formfactor to the
machine.conf file. Poky could then autogenerate the machine specific
formfactor config file and its also becomes available at build time.

Cheers,

Richard






More information about the Openembedded-devel mailing list