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