]> code.ossystems Code Review - openembedded-core.git/commitdiff
xserver-kdrive-common: Switch to use formfactor
authorRichard Purdie <richard@openedhand.com>
Wed, 23 May 2007 17:02:58 +0000 (17:02 +0000)
committerRichard Purdie <richard@openedhand.com>
Wed, 23 May 2007 17:02:58 +0000 (17:02 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1774 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver
meta/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb

index 244ea6dd9180e53b5941704fd49118ba6ab8300e..efca502f7ec009df535d7a941db9b992f25ca552 100644 (file)
@@ -1,6 +1,8 @@
 #!/bin/sh
 #
 
+. /etc/formfactor/config
+
 # note xinit needs full server path
 XSERVER=/usr/bin/Xipaq
 if [ -f /usr/bin/Xfbdev ]; then
@@ -18,14 +20,6 @@ fi
 
 . /etc/profile
 
-fallback_screen_arg() {
-    geom=`fbset | grep geometry`
-    w=`echo $geom | awk '{ print $2 }'`
-    h=`echo $geom | awk '{ print $3 }'`
-    b=`echo $geom | awk '{ print $6 }'`
-    echo -n "${w}x${h}x${b}"
-} 
-
 module_id() {
     ## used to read from assets, but sometimes assets is corrupted
     # grep "Module ID" /proc/hal/assets | sed "s/.*://"
@@ -51,49 +45,28 @@ fi
 
 # start off server in conventional location.
 case `module_id` in
-       "HP iPAQ H3100" | "HP iPAQ H3800")
-               ARGS="$ARGS -dpi 100 -screen 320x240@90 -rgba vrgb" ;;
-       "HP iPAQ H3600" | "HP iPAQ H3700" | "HP iPAQ H3900")
-               ARGS="$ARGS -dpi 100 -screen 320x240@270 -rgba vbgr" ;;
-       "HP iPAQ H5400" | "HP iPAQ H2200")
-               ARGS="$ARGS -dpi 100 -rgba rgb" ;;
-       "Ramses")
-               # What is this "vt2" in aid of?
-               ARGS="$ARGS -dpi 100 -screen 320x240@90 -rgba vrgb vt2" ;;
-       # both 'Sharp-Collie' and just 'Collie' have been reported
-       *Poodle)
-               ARGS="$ARGS -screen 320x240@270 -rgba vrgb" ;;
-       *Collie)
-               ARGS="$ARGS -dpi 100 -screen 320x240@270 -rgba vrgb"
-               # Horrible hack required to enable resuming after suspend
-               rm -f /dev/apm_bios
-               killall -9 apmd
-               ;;
-       "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
-               ARGS="$ARGS -dpi 150 -rgba rgb" ;;
-       "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi")
-               ARGS="$ARGS -dpi 150 -rgba rgb -screen 480x640@270" ;;
-       "Simpad")
-               ARGS="$ARGS -rgba rgb" ;;
        "Generic OMAP1510/1610/1710")
                ARGS="$ARGS -mouse /dev/input/event0" ;;
-       "ARM-IntegratorCP" | "ARM-Versatile PB")
-               ARGS="$ARGS -rgba vrgb" ;;
        "Compulab CM-x270")
                 modprobe mbxfb
                ARGS="$ARGS -fb /dev/fb1"
                 ;;
        "Nokia N800")
-               ARGS="$ARGS -dpi 150 -screen 800x480x16 -mouse tslib" ;;
+               ARGS="$ARGS -mouse tslib" ;;
         *)
-               # Its a device we dont know about - in which case force
-                # kdrive to use the current framebuffer geometry otherwise
-               # it will defualt to trying to achieve 1024x768 
-               S=`fallback_screen_arg`
-               ARGS="$ARGS -screen $S"
                ;;
 esac
 
+ARGS="$ARGS -screen ${DISPLAY_WIDTH_PIXELS}x${DISPLAY_HEIGHT_PIXELS}x${DISPLAY_BPP}@${DISPLAY_ORIENTATION}"
+
+if [ ! -z "$DISPLAY_DPI" ]; then
+       ARGS="$ARGS -dpi $DISPLAY_DPI"
+fi
+
+if [ ! -z "$DISPLAY_SUBPIXEL_ORDER" ]; then
+       ARGS="$ARGS -rgba $DISPLAY_SUBPIXEL_ORDER"
+fi
+
 DISPLAY=':0'
 
 exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
index 59ca94ebd9f1ce062ed291a3aef9cbff6f8ef8bb..c64a3b6246e15b1bf93976346e3ad87e15835116 100644 (file)
@@ -1,8 +1,8 @@
 DESCRIPTION = "Common X11 scripts"
 LICENSE = "GPL"
 SECTION = "x11"
-RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit"
-PR = "r12"
+RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit formfactor"
+PR = "r16"
 
 SRC_URI = "file://etc"
 S = ${WORKDIR}