summaryrefslogtreecommitdiffstats
path: root/meta/packages/x11-common/x11-common/etc/X11/Xserver
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/x11-common/x11-common/etc/X11/Xserver')
-rw-r--r--meta/packages/x11-common/x11-common/etc/X11/Xserver83
1 files changed, 83 insertions, 0 deletions
diff --git a/meta/packages/x11-common/x11-common/etc/X11/Xserver b/meta/packages/x11-common/x11-common/etc/X11/Xserver
new file mode 100644
index 0000000000..689d522d09
--- /dev/null
+++ b/meta/packages/x11-common/x11-common/etc/X11/Xserver
@@ -0,0 +1,83 @@
1#!/bin/sh
2#
3
4. /etc/formfactor/config
5
6# note xinit needs full server path
7XSERVER=/usr/bin/Xipaq
8if [ -f /usr/bin/Xfbdev ]; then
9 XSERVER=/usr/bin/Xfbdev
10fi
11if [ -f /usr/bin/Xepson ]; then
12 XSERVER=/usr/bin/Xepson
13fi
14if [ -f /usr/bin/Xorg ]; then
15 XSERVER=/usr/bin/Xorg
16fi
17if [ -f /usr/bin/Xomap ]; then
18 XSERVER=/usr/bin/Xomap
19fi
20
21. /etc/profile
22
23module_id() {
24 ## used to read from assets, but sometimes assets is corrupted
25 # grep "Module ID" /proc/hal/assets | sed "s/.*://"
26 ## used to read from /proc/hal/model, but that is removed in 2.6
27 # echo ' iPAQ' `cat /proc/hal/model`
28 awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
29}
30
31export USER=root
32
33ARGS=" -br -pn"
34
35if [ "$XSERVER" != "/usr/bin/Xorg" ]; then
36
37 # use ucb 1x00 touchscreen if present
38 if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/touchscreen/ucb1x00 ]; then
39 ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00"
40 fi
41
42 # use usb mouse if present
43 if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ]; then
44 ARGS="$ARGS -mouse /dev/input/mice"
45 fi
46
47 # kdrive 1.4 onwards needs -mouse args
48 if [ -n "$TSLIB_TSDEVICE" ]; then
49 ARGS="$ARGS -mouse tslib"
50 fi
51
52 # start off server in conventional location.
53 case `module_id` in
54 "Generic OMAP1510/1610/1710")
55 ARGS="$ARGS -mouse /dev/input/event0" ;;
56 "Compulab CM-x270")
57 #modprobe mbxfb
58 #ARGS="$ARGS -fb /dev/fb1"
59 ;;
60 "Nokia N800")
61 ARGS="$ARGS -mouse tslib" ;;
62 "Nokia 770")
63 ARGS="$ARGS -mouse tslib" ;;
64 *)
65 ;;
66 esac
67
68 ARGS="$ARGS -screen ${DISPLAY_WIDTH_PIXELS}x${DISPLAY_HEIGHT_PIXELS}@${DISPLAY_ORIENTATION}x${DISPLAY_BPP}"
69
70 if [ ! -z "$DISPLAY_DPI" ]; then
71 ARGS="$ARGS -dpi $DISPLAY_DPI"
72 fi
73
74 if [ ! -z "$DISPLAY_SUBPIXEL_ORDER" ]; then
75 ARGS="$ARGS -rgba $DISPLAY_SUBPIXEL_ORDER"
76 fi
77
78fi
79
80DISPLAY=':0'
81
82exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
83