summaryrefslogtreecommitdiffstats
path: root/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver')
-rw-r--r--meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver75
1 files changed, 75 insertions, 0 deletions
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver
new file mode 100644
index 0000000000..88b8abbb23
--- /dev/null
+++ b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+
+XSERVER=Xipaq
+if [ -f /usr/bin/Xfbdev ]; then
+ XSERVER=Xfbdev
+fi
+if [ -f /usr/bin/Xepson ]; then
+ XSERVER=Xepson
+fi
+if [ -f /usr/bin/Xorg ]; then
+ XSERVER=Xorg
+fi
+if [ -f /usr/bin/Xomap ]; then
+ XSERVER=Xomap
+fi
+
+. /etc/profile
+
+module_id() {
+ ## used to read from assets, but sometimes assets is corrupted
+ # grep "Module ID" /proc/hal/assets | sed "s/.*://"
+ ## used to read from /proc/hal/model, but that is removed in 2.6
+ # echo ' iPAQ' `cat /proc/hal/model`
+ awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
+}
+
+export USER=root
+
+ARGS=" -br -pn"
+
+# use ucb 1x00 touchscreen if present
+if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/touchscreen/ucb1x00 ]; then
+ ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00"
+fi
+
+# use usb mouse if present
+# Xorg doesn't support "-mouse" option, and uses /dev/input/mice automatically
+if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ] && [ "$XSERVER" != "Xorg" ]; then
+ ARGS="$ARGS -mouse /dev/input/mice"
+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")
+ ARGS="$ARGS -rgba vrgb"
+esac
+
+exec $XSERVER $ARGS $*