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 @@
1#!/bin/sh
2#
3
4XSERVER=Xipaq
5if [ -f /usr/bin/Xfbdev ]; then
6 XSERVER=Xfbdev
7fi
8if [ -f /usr/bin/Xepson ]; then
9 XSERVER=Xepson
10fi
11if [ -f /usr/bin/Xorg ]; then
12 XSERVER=Xorg
13fi
14if [ -f /usr/bin/Xomap ]; then
15 XSERVER=Xomap
16fi
17
18. /etc/profile
19
20module_id() {
21 ## used to read from assets, but sometimes assets is corrupted
22 # grep "Module ID" /proc/hal/assets | sed "s/.*://"
23 ## used to read from /proc/hal/model, but that is removed in 2.6
24 # echo ' iPAQ' `cat /proc/hal/model`
25 awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
26}
27
28export USER=root
29
30ARGS=" -br -pn"
31
32# use ucb 1x00 touchscreen if present
33if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/touchscreen/ucb1x00 ]; then
34 ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00"
35fi
36
37# use usb mouse if present
38# Xorg doesn't support "-mouse" option, and uses /dev/input/mice automatically
39if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ] && [ "$XSERVER" != "Xorg" ]; then
40 ARGS="$ARGS -mouse /dev/input/mice"
41fi
42
43# start off server in conventional location.
44case `module_id` in
45 "HP iPAQ H3100" | "HP iPAQ H3800")
46 ARGS="$ARGS -dpi 100 -screen 320x240@90 -rgba vrgb" ;;
47 "HP iPAQ H3600" | "HP iPAQ H3700" | "HP iPAQ H3900")
48 ARGS="$ARGS -dpi 100 -screen 320x240@270 -rgba vbgr" ;;
49 "HP iPAQ H5400" | "HP iPAQ H2200")
50 ARGS="$ARGS -dpi 100 -rgba rgb" ;;
51 "Ramses")
52 # What is this "vt2" in aid of?
53 ARGS="$ARGS -dpi 100 -screen 320x240@90 -rgba vrgb vt2" ;;
54 # both 'Sharp-Collie' and just 'Collie' have been reported
55 *Poodle)
56 ARGS="$ARGS -screen 320x240@270 -rgba vrgb" ;;
57 *Collie)
58 ARGS="$ARGS -dpi 100 -screen 320x240@270 -rgba vrgb"
59 # Horrible hack required to enable resuming after suspend
60 rm -f /dev/apm_bios
61 killall -9 apmd
62 ;;
63 "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
64 ARGS="$ARGS -dpi 150 -rgba rgb" ;;
65 "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi")
66 ARGS="$ARGS -dpi 150 -rgba rgb -screen 480x640@270" ;;
67 "Simpad")
68 ARGS="$ARGS -rgba rgb" ;;
69 "Generic OMAP1510/1610/1710")
70 ARGS="$ARGS -mouse /dev/input/event0" ;;
71 "ARM-IntegratorCP")
72 ARGS="$ARGS -rgba vrgb"
73esac
74
75exec $XSERVER $ARGS $*