diff options
author | Koen Kooi <koen@openembedded.org> | 2007-10-20 17:27:57 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2007-10-20 17:27:57 +0000 |
commit | 6386c3845560481281ce1f8f4b3b86b3fa1520a9 (patch) | |
tree | 9af3a007f0c33746a46baa70371b0110f8d67fe8 | |
parent | 300854b3027b2a203d479b8eaa760b4e6e3e22e1 (diff) |
xserver-kdrive-common: adapt script to take framebuffer size into account when running on devices that can do both vga and qvga
-rw-r--r-- | packages/xserver-kdrive-common/xserver-kdrive-common/Xserver | 45 | ||||
-rw-r--r-- | packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb | 2 |
2 files changed, 33 insertions, 14 deletions
diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common/Xserver b/packages/xserver-kdrive-common/xserver-kdrive-common/Xserver index 85ca58439a..c5c0fd6cac 100644 --- a/packages/xserver-kdrive-common/xserver-kdrive-common/Xserver +++ b/packages/xserver-kdrive-common/xserver-kdrive-common/Xserver @@ -26,6 +26,13 @@ fallback_screen_arg() { echo -n "${w}x${h}x${b}" } +screen_width() { + geom=`fbset | grep geometry` + w=`echo $geom | awk '{ print $2 }'` + echo -n "${w}" +} + + module_id() { ## used to read from assets, but sometimes assets is corrupted # grep "Module ID" /proc/hal/assets | sed "s/.*://" @@ -36,6 +43,8 @@ module_id() { export USER=root +SCREEN_SIZE=`fallback_screen_arg` + ARGS=" -br -pn" # use ucb 1x00 touchscreen if present @@ -52,9 +61,9 @@ fi # start off server in conventional location. case `module_id` in "HP iPAQ H3100" | "HP iPAQ H3800") - ARGS="$ARGS -dpi 100 -rgba vrgb -screen 320x240@90" ;; + ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${SCREEN_SIZE}@90" ;; "HP iPAQ H3600" | "HP iPAQ H3700" | "HP iPAQ H3900") - ARGS="$ARGS -dpi 100 -rgba vbgr -screen 320x240@270" ;; + ARGS="$ARGS -dpi 100 -rgba vbgr -screen ${SCREEN_SIZE}@270" ;; "HP iPAQ H5400" | "HP iPAQ H2200") ARGS="$ARGS -dpi 100 -rgba rgb" ;; "HP iPAQ HX4700") @@ -63,44 +72,54 @@ case `module_id` in ;; "Ramses") # What is this "vt2" in aid of? - ARGS="$ARGS -dpi 100 -rgba vrgb -screen 320x240@90 vt2" ;; + ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${SCREEN_SIZE}@90 vt2" ;; # both 'Sharp-Collie' and just 'Collie' have been reported *Poodle) - ARGS="$ARGS -dpi 100 -rgba vrgb -screen 320x240@270" ;; + ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${SCREEN_SIZE}@270" ;; *Collie) - ARGS="$ARGS -dpi 100 -rgba vrgb -screen 320x240@270" ;; + ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${SCREEN_SIZE}@270" ;; "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi") - ARGS="$ARGS -dpi 200 -rgba rgb" + if [ `screen_width` -gt 330 ] ; then + DPI=200 + else + DPI=100 + fi + ARGS="$ARGS -dpi ${DPI} -rgba rgb" IMAGEON="w100" ;; "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi") - ARGS="$ARGS -dpi 200 -rgba rgb -screen 480x640@270" ;; + ARGS="$ARGS -dpi 200 -rgba rgb -screen ${SCREEN_SIZE}@270" ;; "Simpad") ARGS="$ARGS -dpi 100 -rgba rgb" ;; "Generic OMAP1510/1610/1710") ARGS="$ARGS -dpi 220 -mouse /dev/input/event0" ;; "Cellon C8000 Board") - ARGS="$ARGS -dpi 100 -screen 240x320,10,1" ;; + ARGS="$ARGS -dpi 100 -screen ${SCREEN_SIZE},10,1" ;; "HTC Magician") ARGS="$ARGS -dpi 142" ;; "HTC Universal") - ARGS="$ARGS -dpi 225 -screen 480x640@270" ;; + ARGS="$ARGS -dpi 225 -screen ${SCREEN_SIZE}@270" ;; "ARM-IntegratorCP" | "ARM-Versatile PB") ARGS="$ARGS -rgba vrgb" ;; "Compulab CM-x270") modprobe mbxfb ARGS="$ARGS -fb /dev/fb1" ;; "GTA01" | "GTA02") - ARGS="$ARGS -dpi 285 -screen 480x640" ;; + if [ `screen_width` -gt 330 ] ; then + DPI=285 + else + DPI=140 + fi + ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE}" ;; "Nokia N800") - ARGS="$ARGS -dpi 225 -screen 800x480x16 -mouse tslib" ;; + ARGS="$ARGS -dpi 225 -screen ${SCREEN_SIZE} -mouse tslib" ;; "Motorola Ezx Platform") - ARGS="$ARGS -dpi 170 -screen 240x320" ;; + ARGS="$ARGS -dpi 170 -screen ${SCREEN_SIZE}" ;; *) # It is a device we do not know about, in which case we force # kdrive to use the current framebuffer geometry -- otherwise # it will default to trying to achieve 1024x768 - S=`fallback_screen_arg` + S=${SCREEN_SIZE} ARGS="$ARGS -screen $S" ;; esac diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb index e85e4f0ce9..93b9d9e83d 100644 --- a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb +++ b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb @@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts" LICENSE = "GPL" SECTION = "x11" RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit" -PR = "r20" +PR = "r21" SRC_URI = "\ file://Xdefaults \ |