summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch19
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch20
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch12
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch148
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch83
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch61
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch18
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch308
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch515
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch54
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch25
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch12
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch58
14 files changed, 1346 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch
new file mode 100644
index 0000000000..2341e40bca
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch
@@ -0,0 +1,19 @@
1Index: xorg-server-1.7.99.2/configure.ac
2===================================================================
3--- xorg-server-1.7.99.2.orig/configure.ac 2010-01-29 16:38:49.000000000 +0000
4+++ xorg-server-1.7.99.2/configure.ac 2010-01-29 16:42:39.000000000 +0000
5@@ -503,14 +503,10 @@
6
7 dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
8 dnl otherwise uses standard subdirectories of FONTROOTDIR
9-AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
10- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
11- [
12 DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
13 case $host_os in
14 darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
15 esac
16- ])
17 AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
18 [ FONTPATH="$withval" ],
19 [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch
new file mode 100644
index 0000000000..bd8842721b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch
@@ -0,0 +1,20 @@
1--- xserver/hw/kdrive/linux/linux.c.orig 2005-04-23 15:56:13.988849232 +0000
2+++ xserver/hw/kdrive/linux/linux.c 2005-04-23 15:57:05.001094192 +0000
3@@ -342,7 +342,7 @@
4 /*
5 * Open the APM driver
6 */
7- LinuxApmFd = open ("/dev/apm_bios", 2);
8+ /*LinuxApmFd = open ("/dev/apm_bios", 2);
9 if (LinuxApmFd < 0 && errno == ENOENT)
10 LinuxApmFd = open ("/dev/misc/apm_bios", 2);
11 if (LinuxApmFd >= 0)
12@@ -352,7 +352,7 @@
13 RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
14 AddEnabledDevice (LinuxApmFd);
15 }
16-
17+ */
18 /*
19 * now get the VT
20 */
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch
new file mode 100644
index 0000000000..13a6c2c954
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch
@@ -0,0 +1,12 @@
1--- xorg-server-X11R7.1-1.1.0/dix/dixfonts.c.orig 2006-06-08 14:49:12.158684250 +0200
2+++ xorg-server-X11R7.1-1.1.0/dix/dixfonts.c 2006-06-08 14:49:52.493205000 +0200
3@@ -52,8 +52,8 @@
4 /* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */
5
6 #define NEED_REPLIES
7 #ifdef HAVE_DIX_CONFIG_H
8-#include <dix-config.h>
9+#include <kdrive-config.h>
10 #endif
11
12 #include <X11/X.h>
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch
new file mode 100644
index 0000000000..9794e98cb0
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch
@@ -0,0 +1,148 @@
1---
2 Xext/Makefile.am | 6 ++++++
3 configure.ac | 11 +++++++++--
4 include/kdrive-config.h.in | 3 +++
5 mi/miinitext.c | 6 ++++++
6 4 files changed, 24 insertions(+), 2 deletions(-)
7
8Index: xorg-server-1.7.99.2/mi/miinitext.c
9===================================================================
10--- xorg-server-1.7.99.2.orig/mi/miinitext.c 2010-02-10 18:54:11.959086237 +0000
11+++ xorg-server-1.7.99.2/mi/miinitext.c 2010-02-10 18:54:12.429078513 +0000
12@@ -264,6 +264,9 @@
13 #ifdef DMXEXT
14 extern void DMXExtensionInit(INITARGS);
15 #endif
16+#ifdef XCALIBRATE
17+extern void XCalibrateExtensionInit(INITARGS);
18+#endif
19 #ifdef XFIXES
20 extern void XFixesExtensionInit(INITARGS);
21 #endif
22@@ -493,6 +496,9 @@
23 GlxPushProvider(&__glXDRISWRastProvider);
24 if (!noGlxExtension) GlxExtensionInit();
25 #endif
26+#ifdef XCALIBRATE
27+ XCalibrateExtensionInit ();
28+#endif
29 }
30
31 #else /* XFree86LOADER */
32Index: xorg-server-1.7.99.2/configure.ac
33===================================================================
34--- xorg-server-1.7.99.2.orig/configure.ac 2010-02-10 18:54:11.959086237 +0000
35+++ xorg-server-1.7.99.2/configure.ac 2010-02-11 11:49:50.710736962 +0000
36@@ -1985,7 +1985,7 @@
37 fi
38
39
40- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
41+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
42 if test "x$HAVE_TSLIB" = xno; then
43 AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"])
44 fi
45@@ -2039,7 +2039,7 @@
46 KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
47 KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
48 KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
49- KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
50+ KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $TSLIB_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
51
52 AC_SUBST([XEPHYR_LIBS])
53 AC_SUBST([XEPHYR_INCS])
54Index: xorg-server-1.7.99.2/include/kdrive-config.h.in
55===================================================================
56--- xorg-server-1.7.99.2.orig/include/kdrive-config.h.in 2010-02-10 18:54:11.959086237 +0000
57+++ xorg-server-1.7.99.2/include/kdrive-config.h.in 2010-02-10 18:54:12.429078513 +0000
58@@ -28,4 +28,7 @@
59 /* Have execinfo.h for backtrace(). */
60 #undef HAVE_EXECINFO_H
61
62+/* Enable XCalibrate extension */
63+#undef XCALIBRATE
64+
65 #endif /* _KDRIVE_CONFIG_H_ */
66Index: xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c
67===================================================================
68--- xorg-server-1.7.99.2.orig/hw/kdrive/linux/tslib.c 2010-02-10 18:58:12.669078495 +0000
69+++ xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c 2010-02-10 19:04:56.927828767 +0000
70@@ -50,12 +50,15 @@
71 int fd;
72 int lastx, lasty;
73 struct tsdev *tsDev;
74- void (*raw_event_hook)(int x, int y, int pressure, void *closure);
75- void *raw_event_closure;
76 int phys_screen;
77 };
78
79
80+/* For XCalibrate extension */
81+void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
82+void *tslib_raw_event_closure;
83+
84+
85 static void
86 TsRead (int fd, void *closure)
87 {
88@@ -65,10 +68,10 @@
89 long x = 0, y = 0;
90 unsigned long flags;
91
92- if (private->raw_event_hook) {
93+ if (tslib_raw_event_hook) {
94 while (ts_read_raw(private->tsDev, &event, 1) == 1)
95- private->raw_event_hook (event.x, event.y, event.pressure,
96- private->raw_event_closure);
97+ tslib_raw_event_hook (event.x, event.y, event.pressure,
98+ tslib_raw_event_closure);
99 return;
100 }
101
102@@ -111,8 +114,8 @@
103 {
104 struct TslibPrivate *private = pi->driverPrivate;
105
106- private->raw_event_hook = NULL;
107- private->raw_event_closure = NULL;
108+ tslib_raw_event_hook = NULL;
109+ tslib_raw_event_closure = NULL;
110 if (!pi->path) {
111 pi->path = strdup("/dev/input/touchscreen0");
112 ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
113Index: xorg-server-1.7.99.2/Xext/xcalibrate.c
114===================================================================
115--- xorg-server-1.7.99.2.orig/Xext/xcalibrate.c 2010-02-10 18:59:24.097829840 +0000
116+++ xorg-server-1.7.99.2/Xext/xcalibrate.c 2010-02-11 11:51:00.930735731 +0000
117@@ -115,6 +115,7 @@
118
119 memset (&rep, 0, sizeof (rep));
120 rep.type = X_Reply;
121+ rep.length = 0;
122 rep.sequenceNumber = client->sequence;
123
124 if (stuff->on)
125@@ -158,6 +159,7 @@
126
127 swaps (&rep.sequenceNumber, n);
128 swaps (&rep.status, n);
129+ swapl (&rep.length, n);
130 }
131 WriteToClient(client, sizeof (rep), (char *) &rep);
132 return (client->noClientException);
133@@ -186,6 +188,7 @@
134
135 memset (&rep, 0, sizeof (rep));
136 rep.type = X_Reply;
137+ rep.length = 0;
138 rep.sequenceNumber = client->sequence;
139 rep.x = stuff->x;
140 rep.y = stuff->y;
141@@ -198,6 +201,7 @@
142
143 swaps (&rep.x, n);
144 swaps (&rep.y, n);
145+ swapl (&rep.length, n);
146 }
147 WriteToClient(client, sizeof (rep), (char *) &rep);
148 return (client->noClientException);
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch
new file mode 100644
index 0000000000..14cf99055b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch
@@ -0,0 +1,83 @@
1Add some extra video modes and change the default to VGA.
2
3---
4 hw/kdrive/src/kmode.c | 41 +++++++++++++++++++++++++++++++++++++++--
5 1 file changed, 39 insertions(+), 2 deletions(-)
6
7Index: xorg-server-1.3.0.0/hw/kdrive/src/kmode.c
8===================================================================
9--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kmode.c 2008-01-11 14:20:47.000000000 +0000
10+++ xorg-server-1.3.0.0/hw/kdrive/src/kmode.c 2008-01-11 14:21:18.000000000 +0000
11@@ -32,6 +32,31 @@ const KdMonitorTiming kdMonitorTimings[
12 /* H V Hz KHz */
13 /* FP BP BLANK POLARITY */
14
15+ /* Treo 650 */
16+
17+ { 320, 320, 64, 16256,
18+ 17, 12, 32, KdSyncNegative,
19+ 1, 11, 14, KdSyncNegative,
20+ },
21+
22+ { 320, 320, 64, 0,
23+ 0, 0, 0, KdSyncNegative,
24+ 0, 0, 0, KdSyncNegative,
25+ },
26+
27+ /* LifeDrive/T3/TX modes */
28+
29+ { 320, 480, 64, 16256,
30+ 17, 12, 32, KdSyncNegative,
31+ 1, 11, 14, KdSyncNegative,
32+ },
33+
34+ { 480, 320, 64, 0,
35+ 0, 0, 0, KdSyncNegative,
36+ 0, 0, 0, KdSyncNegative,
37+ },
38+
39+
40 /* IPAQ modeline:
41 *
42 * Modeline "320x240" 5.7222 320 337 340 352 240 241 244 254"
43@@ -41,6 +66,11 @@ const KdMonitorTiming kdMonitorTimings[
44 1, 11, 14, KdSyncNegative,
45 },
46
47+ { 240, 320, 64, 0,
48+ 0, 0, 0, KdSyncNegative,
49+ 0, 0, 0, KdSyncNegative,
50+ },
51+
52 /* Other VESA modes */
53 { 640, 350, 85, 31500, /* VESA */
54 32, 96, 192, KdSyncPositive, /* 26.413 */
55@@ -76,10 +106,19 @@ const KdMonitorTiming kdMonitorTimings[
56 16, 120, 176, KdSyncNegative, /* 37.861 */
57 1, 20, 24, KdSyncNegative, /* 72.809 */
58 },
59+ /* DEFAULT */
60+#define MONITOR_TIMING_DEFAULT 13
61 { 640, 480, 60, 25175, /* VESA */
62 16, 48, 160, KdSyncNegative, /* 31.469 */
63 10, 33, 45, KdSyncNegative, /* 59.940 */
64 },
65+
66+
67+ { 480, 640, 60, 0, /* VESA */
68+ 0, 0, 0, KdSyncNegative, /* 31.469 */
69+ 0, 0, 0, KdSyncNegative, /* 59.940 */
70+ },
71+
72
73 /* 800x600 modes */
74 { 800, 600, 85, 56250, /* VESA */
75@@ -90,8 +129,6 @@ const KdMonitorTiming kdMonitorTimings[
76 16, 160, 256, KdSyncPositive, /* 46.875 */
77 1, 21, 25, KdSyncPositive, /* 75.000 */
78 },
79- /* DEFAULT */
80-#define MONITOR_TIMING_DEFAULT 9
81 { 800, 600, 72, 50000, /* VESA */
82 56, 64, 240, KdSyncPositive, /* 48.077 */
83 37, 23, 66, KdSyncPositive, /* 72.188 */
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch
new file mode 100644
index 0000000000..a5c22a5efc
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch
@@ -0,0 +1,61 @@
1Index: xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c
2===================================================================
3--- xorg-server-1.3.0.0.orig/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:12.000000000 +0100
4+++ xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:46.000000000 +0100
5@@ -498,6 +498,7 @@
6 KdScreenInfo *screen = pScreenPriv->screen;
7 FbdevScrPriv *scrpriv = screen->driver;
8 Bool wasEnabled = pScreenPriv->enabled;
9+ FbdevPriv *priv = screen->card->driver;
10 FbdevScrPriv oldscr;
11 int oldwidth;
12 int oldheight;
13@@ -525,11 +526,46 @@
14 oldheight = screen->height;
15 oldmmwidth = pScreen->mmWidth;
16 oldmmheight = pScreen->mmHeight;
17-
18+
19 /*
20 * Set new configuration
21 */
22-
23+
24+ if (newwidth != oldwidth || newheight != oldheight)
25+ {
26+ struct fb_var_screeninfo var;
27+ int k;
28+
29+ k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
30+
31+ if (k < 0)
32+ {
33+ ErrorF("Error with framebuffer ioctl FBIOGET_VSCREENINFO: %s", strerror (errno));
34+ return FALSE;
35+ }
36+
37+ var.xres = newwidth;
38+ var.yres = newheight;
39+ var.activate = FB_ACTIVATE_NOW;
40+
41+ k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
42+
43+ if (k >= 0)
44+ {
45+ if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0)
46+ {
47+ perror("Error with framebuffer ioctl FIOGET_FSCREENINFO");
48+ close (priv->fd);
49+ return FALSE;
50+ }
51+ if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) {
52+ perror("Error framebuffer ioctl FIOGET_VSCREENINFO");
53+ close (priv->fd);
54+ return FALSE;
55+ }
56+ }
57+ }
58+
59 scrpriv->randr = KdAddRotation (screen->randr, randr);
60
61 KdOffscreenSwapOut (screen->pScreen);
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch
new file mode 100644
index 0000000000..eb98fb82c7
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch
@@ -0,0 +1,18 @@
1---
2 render/glyphstr.h | 1 +
3 1 file changed, 1 insertion(+)
4
5--- xorg-server-1.3.0.0.orig/render/glyphstr.h
6+++ xorg-server-1.3.0.0/render/glyphstr.h
7@@ -23,10 +23,11 @@
8 */
9
10 #ifndef _GLYPHSTR_H_
11 #define _GLYPHSTR_H_
12
13+#include <X11/X.h>
14 #include <X11/extensions/renderproto.h>
15 #include "picture.h"
16 #include "screenint.h"
17 #include "regionstr.h"
18 #include "miscstruct.h"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch
new file mode 100644
index 0000000000..73f30ee716
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch
@@ -0,0 +1,308 @@
1Index: xorg-server-1.7.99.2/dix/window.c
2===================================================================
3--- xorg-server-1.7.99.2.orig/dix/window.c 2009-11-04 16:25:50.000000000 +0000
4+++ xorg-server-1.7.99.2/dix/window.c 2010-02-10 17:42:22.719078216 +0000
5@@ -179,6 +179,8 @@
6
7 #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
8
9+char* RootPPM = NULL;
10+
11 #ifdef DEBUG
12 /******
13 * PrintWindowTree
14@@ -304,6 +306,115 @@
15 #endif
16 }
17
18+static int
19+get_int(FILE *fp)
20+{
21+ int c = 0;
22+
23+ while ((c = getc(fp)) != EOF)
24+ {
25+ if (isspace(c))
26+ continue;
27+
28+ if (c == '#')
29+ while (c = getc(fp))
30+ if (c == EOF)
31+ return 0;
32+ else if (c == '\n')
33+ break;
34+
35+ if (isdigit(c))
36+ {
37+ int val = c - '0';
38+ while ((c = getc(fp)) && isdigit(c))
39+ val = (val * 10) + (c - '0');
40+ return val;
41+ }
42+ }
43+
44+ return 0;
45+}
46+
47+static unsigned char*
48+ppm_load (const char* path, int depth, int *width, int *height)
49+{
50+ FILE *fp;
51+ int max, n = 0, w, h, i, j, bytes_per_line;
52+ unsigned char *data, *res, h1, h2;
53+
54+ if (depth < 16 || depth > 32)
55+ return NULL;
56+
57+ if (depth > 16)
58+ depth = 32;
59+
60+ fp = fopen (path, "r");
61+ if (fp == NULL)
62+ return FALSE;
63+
64+ h1 = getc(fp);
65+ h2 = getc(fp);
66+
67+ /* magic is 'P6' for raw ppm */
68+ if (h1 != 'P' && h2 != '6')
69+ goto fail;
70+
71+ w = get_int(fp);
72+ h = get_int(fp);
73+
74+ if (w == 0 || h == 0)
75+ goto fail;
76+
77+ max = get_int(fp);
78+
79+ if (max != 255)
80+ goto fail;
81+
82+ bytes_per_line = ((w * depth + 31) >> 5) << 2;
83+
84+ res = data = malloc(bytes_per_line * h);
85+
86+ for (i=0; i<h; i++)
87+ {
88+ for (j=0; j<w; j++)
89+ {
90+ unsigned char buf[3];
91+ fread(buf, 1, 3, fp);
92+
93+ switch (depth)
94+ {
95+ case 24:
96+ case 32:
97+ *data = buf[2];
98+ *(data+1) = buf[1];
99+ *(data+2) = buf[0];
100+ data += 4;
101+ break;
102+ case 16:
103+ default:
104+ *(unsigned short*)data
105+ = ((buf[0] >> 3) << 11) | ((buf[1] >> 2) << 5) | (buf[2] >> 3);
106+ data += 2;
107+ break;
108+ }
109+ }
110+ data += (bytes_per_line - (w*(depth>>3)));
111+ }
112+
113+ data = res;
114+
115+ *width = w;
116+ *height = h;
117+
118+ fclose(fp);
119+
120+ return res;
121+
122+ fail:
123+ fclose(fp);
124+ return NULL;
125+}
126+
127 static void
128 MakeRootTile(WindowPtr pWin)
129 {
130@@ -314,6 +425,36 @@
131 unsigned char *from, *to;
132 int i, j;
133
134+ if (RootPPM != NULL)
135+ {
136+ int w, h;
137+ unsigned char *data;
138+
139+ if ((data = ppm_load (RootPPM, pScreen->rootDepth, &w, &h)) != NULL)
140+ {
141+ pWin->background.pixmap
142+ = (*pScreen->CreatePixmap)(pScreen, w, h, pScreen->rootDepth, 0);
143+
144+ pWin->backgroundState = BackgroundPixmap;
145+ pGC = GetScratchGC(pScreen->rootDepth, pScreen);
146+ if (!pWin->background.pixmap || !pGC)
147+ FatalError("could not create root tile");
148+
149+ ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
150+
151+ (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap,
152+ pGC,
153+ pScreen->rootDepth,
154+ 0, 0, w, h, 0, ZPixmap, (char *)data);
155+ FreeScratchGC(pGC);
156+
157+ free(data);
158+ return;
159+ }
160+ else
161+ ErrorF("Unable to load root window image.");
162+ }
163+
164 pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
165 pScreen->rootDepth, 0);
166
167@@ -530,6 +671,7 @@
168 }
169
170
171+
172 WindowPtr
173 RealChildHead(WindowPtr pWin)
174 {
175Index: xorg-server-1.7.99.2/hw/kdrive/src/kdrive.c
176===================================================================
177--- xorg-server-1.7.99.2.orig/hw/kdrive/src/kdrive.c 2010-02-10 17:36:36.000000000 +0000
178+++ xorg-server-1.7.99.2/hw/kdrive/src/kdrive.c 2010-02-10 17:43:07.797828099 +0000
179@@ -60,6 +60,9 @@
180 { 32, 32 }
181 };
182
183+int
184+ProcXFixesHideCursor (ClientPtr client) ;
185+
186 #define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0]))
187
188 #define KD_DEFAULT_BUTTONS 5
189@@ -92,6 +95,9 @@
190
191 KdOsFuncs *kdOsFuncs;
192
193+extern Bool CursorInitiallyHidden; /* See Xfixes cursor.c */
194+extern char* RootPPM; /* dix/window.c */
195+
196 void
197 KdSetRootClip (ScreenPtr pScreen, BOOL enable)
198 {
199@@ -275,6 +281,7 @@
200 KdSetRootClip (pScreen, TRUE);
201 if (pScreenPriv->card->cfuncs->dpms)
202 (*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
203+
204 return TRUE;
205 }
206
207@@ -553,6 +560,8 @@
208 ErrorF("-switchCmd Command to execute on vt switch\n");
209 ErrorF("-zap Terminate server on Ctrl+Alt+Backspace\n");
210 ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
211+ ErrorF("-hide-cursor Start with cursor hidden\n");
212+ ErrorF("-root-ppm [path] Specify ppm file to use as root window background.\n");
213 }
214
215 int
216@@ -616,6 +625,19 @@
217 kdSoftCursor = TRUE;
218 return 1;
219 }
220+ if (!strcmp (argv[i], "-hide-cursor"))
221+ {
222+ CursorInitiallyHidden = TRUE;
223+ return 1;
224+ }
225+ if (!strcmp (argv[i], "-root-ppm"))
226+ {
227+ if ((i+1) < argc)
228+ RootPPM = argv[i+1];
229+ else
230+ UseMsg ();
231+ return 2;
232+ }
233 if (!strcmp (argv[i], "-videoTest"))
234 {
235 kdVideoTest = TRUE;
236Index: xorg-server-1.7.99.2/xfixes/cursor.c
237===================================================================
238--- xorg-server-1.7.99.2.orig/xfixes/cursor.c 2009-12-19 01:43:53.000000000 +0000
239+++ xorg-server-1.7.99.2/xfixes/cursor.c 2010-02-10 17:45:02.089079491 +0000
240@@ -57,6 +57,7 @@
241 static RESTYPE CursorClientType;
242 static RESTYPE CursorHideCountType;
243 static RESTYPE CursorWindowType;
244+static Bool CursorGloballyHidden;
245 static CursorPtr CursorCurrent[MAXDEVICES];
246 static CursorPtr pInvisibleCursor = NULL;
247
248@@ -65,6 +66,8 @@
249
250 static void deleteCursorHideCountsForScreen (ScreenPtr pScreen);
251
252+Bool CursorInitiallyHidden = FALSE;
253+
254 #define VERIFY_CURSOR(pCursor, cursor, client, access) \
255 do { \
256 int err; \
257@@ -150,7 +153,7 @@
258 if (ConnectionInfo)
259 CursorVisible = EnableCursor;
260
261- if (cs->pCursorHideCounts != NULL || !CursorVisible) {
262+ if (cs->pCursorHideCounts != NULL || !CursorVisible || CursorGloballyHidden) {
263 ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) &&
264 (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor));
265 } else {
266@@ -887,6 +890,12 @@
267 return (ret == BadValue) ? BadWindow : ret;
268 }
269
270+ /* Is cursor set to be initially hidden ?, if so reset this
271+ * flag as now visibility assumed under control of client.
272+ */
273+ if (CursorGloballyHidden)
274+ CursorGloballyHidden = FALSE;
275+
276 /*
277 * Has client hidden the cursor before on this screen?
278 * If so, just increment the count.
279@@ -950,9 +959,19 @@
280 return (rc == BadValue) ? BadWindow : rc;
281 }
282
283+ /* X was started with cursor hidden, therefore just reset our flag
284+ * (returning to normal client control) and cause cursor to now be
285+ * shown.
286+ */
287+ if (CursorGloballyHidden == TRUE)
288+ {
289+ CursorGloballyHidden = FALSE;
290+ return (client->noClientException);
291+ }
292+
293 /*
294 * Has client hidden the cursor on this screen?
295- * If not, generate an error.
296+ * If so, generate an error.
297 */
298 pChc = findCursorHideCount(client, pWin->drawable.pScreen);
299 if (pChc == NULL) {
300@@ -1068,6 +1087,8 @@
301 {
302 int i;
303
304+ CursorGloballyHidden = CursorInitiallyHidden;
305+
306 if (party_like_its_1989)
307 CursorVisible = EnableCursor;
308
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch
new file mode 100644
index 0000000000..2dc22bf50e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch
@@ -0,0 +1,515 @@
1# Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at
2# http://lists.freedesktop.org/archives/xorg/2005-December/011635.html
3diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/linux/evdev.c xserver/hw/kdrive/linux/evdev.c
4--- xserver.original/hw/kdrive/linux/evdev.c 2005-12-16 10:36:05.000000000 -0200
5+++ xserver/hw/kdrive/linux/evdev.c 2005-12-16 10:40:51.077410192 -0200
6@@ -31,9 +31,11 @@
7 #include <X11/X.h>
8 #include <X11/Xproto.h>
9 #include <X11/Xpoll.h>
10+#include <X11/keysym.h>
11 #include "inputstr.h"
12 #include "scrnintstr.h"
13 #include "kdrive.h"
14+#include "kkeymap.h"
15
16 #define NUM_EVENTS 128
17 #define ABS_UNSET -65535
18@@ -105,9 +107,10 @@
19 {
20 KdMouseInfo *mi = closure;
21 Kevdev *ke = mi->driver;
22- int i;
23+ int i, j;
24 struct input_event events[NUM_EVENTS];
25 int n;
26+ int flags;
27
28 n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
29 if (n <= 0)
30@@ -115,22 +118,64 @@
31 n /= sizeof (struct input_event);
32 for (i = 0; i < n; i++)
33 {
34+ flags = KD_MOUSE_DELTA | kdMouseInfo->buttonState;
35 switch (events[i].type) {
36 case EV_SYN:
37 break;
38 case EV_KEY:
39- EvdevMotion (mi);
40- ASSIGNBIT(ke->key,events[i].code, events[i].value);
41- if (events[i].code < 0x100)
42- ErrorF ("key %d %d\n", events[i].code, events[i].value);
43- else
44- ErrorF ("key 0x%x %d\n", events[i].code, events[i].value);
45+ if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) {
46+ switch (events[i].code) {
47+ case BTN_LEFT:
48+ if (events[i].value == 1)
49+ flags |= KD_BUTTON_1;
50+ else
51+ flags &= ~KD_BUTTON_1;
52+ break;
53+ case BTN_MIDDLE:
54+ if (events[i].value == 1)
55+ flags |= KD_BUTTON_2;
56+ else
57+ flags &= ~KD_BUTTON_2;
58+ break;
59+ case BTN_RIGHT:
60+ if (events[i].value == 1)
61+ flags |= KD_BUTTON_3;
62+ else
63+ flags &= ~KD_BUTTON_3;
64+ break;
65+ default:
66+ /* Unknow button */
67+ break;
68+ }
69+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
70+ }
71 break;
72 case EV_REL:
73- ke->rel[events[i].code] += events[i].value;
74+ if (events[i].code == REL_X) {
75+ KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0);
76+ }
77+ else if (events[i].code == REL_Y) {
78+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value);
79+ }
80+ else if (events[i].code == REL_WHEEL) {
81+ for (j = 0; j < abs (events[i].value); j++) {
82+ if (events[i].value > 0)
83+ flags |= KD_BUTTON_4;
84+ else
85+ flags |= KD_BUTTON_5;
86+
87+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
88+
89+ if (events[i].value > 0)
90+ flags &= ~KD_BUTTON_4;
91+ else
92+ flags &= ~KD_BUTTON_5;
93+
94+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
95+ } /* events[i].code == REL_WHEEL */
96+ }
97 break;
98 case EV_ABS:
99- ke->abs[events[i].code] = events[i].value;
100 break;
101 }
102 }
103@@ -173,6 +218,12 @@
104 fd = open (kdefaultEvdev[i], 2);
105 if (fd >= 0)
106 {
107+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
108+ {
109+ close (fd);
110+ continue;
111+ }
112+
113 mi->name = KdSaveString (kdefaultEvdev[i]);
114 break;
115 }
116@@ -287,7 +338,319 @@
117 EvdevFini,
118 };
119
120-#if 0
121+/* Keyboard */
122+
123+int kbd_fd = -1;
124+int EvdevInputType = 0;
125+
126+KeySym evdevKeymap[(194 - 1 + 1) * 2] = {
127+/* These are directly mapped from DOS scanset 0 */
128+/* 1 8 */ XK_Escape, NoSymbol,
129+/* 2 9 */ XK_1, XK_exclam,
130+/* 3 10 */ XK_2, XK_at,
131+/* 4 11 */ XK_3, XK_numbersign,
132+/* 5 12 */ XK_4, XK_dollar,
133+/* 6 13 */ XK_5, XK_percent,
134+/* 7 14 */ XK_6, XK_asciicircum,
135+/* 8 15 */ XK_7, XK_ampersand,
136+/* 9 16 */ XK_8, XK_asterisk,
137+/* 10 17 */ XK_9, XK_parenleft,
138+/* 11 18 */ XK_0, XK_parenright,
139+/* 12 19 */ XK_minus, XK_underscore,
140+/* 13 20 */ XK_equal, XK_plus,
141+/* 14 21 */ XK_BackSpace, NoSymbol,
142+/* 15 22 */ XK_Tab, NoSymbol,
143+/* 16 23 */ XK_Q, NoSymbol,
144+/* 17 24 */ XK_W, NoSymbol,
145+/* 18 25 */ XK_E, NoSymbol,
146+/* 19 26 */ XK_R, NoSymbol,
147+/* 20 27 */ XK_T, NoSymbol,
148+/* 21 28 */ XK_Y, NoSymbol,
149+/* 22 29 */ XK_U, NoSymbol,
150+/* 23 30 */ XK_I, NoSymbol,
151+/* 24 31 */ XK_O, NoSymbol,
152+/* 25 32 */ XK_P, NoSymbol,
153+/* 26 33 */ XK_bracketleft, XK_braceleft,
154+/* 27 34 */ XK_bracketright, XK_braceright,
155+/* 28 35 */ XK_Return, NoSymbol,
156+/* 29 36 */ XK_Control_L, NoSymbol,
157+/* 30 37 */ XK_A, NoSymbol,
158+/* 31 38 */ XK_S, NoSymbol,
159+/* 32 39 */ XK_D, NoSymbol,
160+/* 33 40 */ XK_F, NoSymbol,
161+/* 34 41 */ XK_G, NoSymbol,
162+/* 35 42 */ XK_H, NoSymbol,
163+/* 36 43 */ XK_J, NoSymbol,
164+/* 37 44 */ XK_K, NoSymbol,
165+/* 38 45 */ XK_L, NoSymbol,
166+/* 39 46 */ XK_semicolon, XK_colon,
167+/* 40 47 */ XK_apostrophe, XK_quotedbl,
168+/* 41 48 */ XK_grave, XK_asciitilde,
169+/* 42 49 */ XK_Shift_L, NoSymbol,
170+/* 43 50 */ XK_backslash, XK_bar,
171+/* 44 51 */ XK_Z, NoSymbol,
172+/* 45 52 */ XK_X, NoSymbol,
173+/* 46 53 */ XK_C, NoSymbol,
174+/* 47 54 */ XK_V, NoSymbol,
175+/* 48 55 */ XK_B, NoSymbol,
176+/* 49 56 */ XK_N, NoSymbol,
177+/* 50 57 */ XK_M, NoSymbol,
178+/* 51 58 */ XK_comma, XK_less,
179+/* 52 59 */ XK_period, XK_greater,
180+/* 53 60 */ XK_slash, XK_question,
181+/* 54 61 */ XK_Shift_R, NoSymbol,
182+/* 55 62 */ XK_KP_Multiply, NoSymbol,
183+/* 56 63 */ XK_Alt_L, XK_Meta_L,
184+/* 57 64 */ XK_space, NoSymbol,
185+/* 58 65 */ XK_Caps_Lock, NoSymbol,
186+/* 59 66 */ XK_F1, NoSymbol,
187+/* 60 67 */ XK_F2, NoSymbol,
188+/* 61 68 */ XK_F3, NoSymbol,
189+/* 62 69 */ XK_F4, NoSymbol,
190+/* 63 70 */ XK_F5, NoSymbol,
191+/* 64 71 */ XK_F6, NoSymbol,
192+/* 65 72 */ XK_F7, NoSymbol,
193+/* 66 73 */ XK_F8, NoSymbol,
194+/* 67 74 */ XK_F9, NoSymbol,
195+/* 68 75 */ XK_F10, NoSymbol,
196+/* 69 76 */ XK_Break, XK_Pause,
197+/* 70 77 */ XK_Scroll_Lock, NoSymbol,
198+/* 71 78 */ XK_KP_Home, XK_KP_7,
199+/* 72 79 */ XK_KP_Up, XK_KP_8,
200+/* 73 80 */ XK_KP_Page_Up, XK_KP_9,
201+/* 74 81 */ XK_KP_Subtract, NoSymbol,
202+/* 75 82 */ XK_KP_Left, XK_KP_4,
203+/* 76 83 */ XK_KP_5, NoSymbol,
204+/* 77 84 */ XK_KP_Right, XK_KP_6,
205+/* 78 85 */ XK_KP_Add, NoSymbol,
206+/* 79 86 */ XK_KP_End, XK_KP_1,
207+/* 80 87 */ XK_KP_Down, XK_KP_2,
208+/* 81 88 */ XK_KP_Page_Down, XK_KP_3,
209+/* 82 89 */ XK_KP_Insert, XK_KP_0,
210+/* 83 90 */ XK_KP_Delete, XK_KP_Decimal,
211+/* 84 91 */ NoSymbol, NoSymbol,
212+/* 85 92 */ NoSymbol, NoSymbol,
213+/* 86 93 */ NoSymbol, NoSymbol,
214+/* 87 94 */ XK_F11, NoSymbol,
215+/* 88 95 */ XK_F12, NoSymbol,
216+
217+/* These are remapped from the extended set (using ExtendMap) */
218+
219+/* 89 96 */ XK_Control_R, NoSymbol,
220+/* 90 97 */ XK_KP_Enter, NoSymbol,
221+/* 91 98 */ XK_KP_Divide, NoSymbol,
222+/* 92 99 */ XK_Sys_Req, XK_Print,
223+/* 93 100 */ XK_Alt_R, XK_Meta_R,
224+/* 94 101 */ XK_Num_Lock, NoSymbol,
225+/* 95 102 */ XK_Home, NoSymbol,
226+/* 96 103 */ XK_Up, NoSymbol,
227+/* 97 104 */ XK_Page_Up, NoSymbol,
228+/* 98 105 */ XK_Left, NoSymbol,
229+/* 99 106 */ XK_Right, NoSymbol,
230+/* 100 107 */ XK_End, NoSymbol,
231+/* 101 108 */ XK_Down, NoSymbol,
232+/* 102 109 */ XK_Page_Down, NoSymbol,
233+/* 103 110 */ XK_Insert, NoSymbol,
234+/* 104 111 */ XK_Delete, NoSymbol,
235+/* 105 112 */ XK_Super_L, NoSymbol,
236+/* 106 113 */ XK_Super_R, NoSymbol,
237+/* 107 114 */ XK_Menu, NoSymbol,
238+/* 108 115 */ NoSymbol, NoSymbol,
239+/* 109 116 */ NoSymbol, NoSymbol,
240+/* 110 117 */ NoSymbol, NoSymbol,
241+/* 111 118 */ NoSymbol, NoSymbol,
242+/* 112 119 */ NoSymbol, NoSymbol,
243+
244+/* 113 120 */ NoSymbol, NoSymbol,
245+/* 114 121 */ NoSymbol, NoSymbol,
246+/* 115 122 */ NoSymbol, NoSymbol,
247+/* 116 123 */ NoSymbol, NoSymbol,
248+/* 117 124 */ NoSymbol, NoSymbol,
249+/* 118 125 */ NoSymbol, NoSymbol,
250+/* 119 126 */ NoSymbol, NoSymbol,
251+/* 120 127 */ NoSymbol, NoSymbol,
252+/* 121 128 */ NoSymbol, NoSymbol,
253+/* 122 129 */ NoSymbol, NoSymbol,
254+/* 123 130 */ NoSymbol, NoSymbol,
255+/* 124 131 */ NoSymbol, NoSymbol,
256+/* 125 132 */ NoSymbol, NoSymbol,
257+/* 126 133 */ NoSymbol, NoSymbol,
258+/* 127 134 */ NoSymbol, NoSymbol,
259+/* 128 135 */ NoSymbol, NoSymbol,
260+/* 129 136 */ NoSymbol, NoSymbol,
261+/* 130 137 */ NoSymbol, NoSymbol,
262+/* 131 138 */ NoSymbol, NoSymbol,
263+/* 132 139 */ NoSymbol, NoSymbol,
264+/* 133 140 */ NoSymbol, NoSymbol,
265+/* 134 141 */ NoSymbol, NoSymbol,
266+/* 135 142 */ NoSymbol, NoSymbol,
267+/* 136 143 */ NoSymbol, NoSymbol,
268+/* 137 144 */ NoSymbol, NoSymbol,
269+/* 138 145 */ NoSymbol, NoSymbol,
270+/* 139 146 */ NoSymbol, NoSymbol,
271+/* 140 147 */ NoSymbol, NoSymbol,
272+/* 141 148 */ NoSymbol, NoSymbol,
273+/* 142 149 */ NoSymbol, NoSymbol,
274+/* 143 150 */ NoSymbol, NoSymbol,
275+/* 144 151 */ NoSymbol, NoSymbol,
276+/* 145 152 */ NoSymbol, NoSymbol,
277+/* 146 153 */ NoSymbol, NoSymbol,
278+/* 147 154 */ NoSymbol, NoSymbol,
279+/* 148 155 */ NoSymbol, NoSymbol,
280+/* 149 156 */ NoSymbol, NoSymbol,
281+/* 150 157 */ NoSymbol, NoSymbol,
282+/* 151 158 */ NoSymbol, NoSymbol,
283+/* 152 159 */ NoSymbol, NoSymbol,
284+/* 153 160 */ NoSymbol, NoSymbol,
285+/* 154 161 */ NoSymbol, NoSymbol,
286+/* 155 162 */ NoSymbol, NoSymbol,
287+/* 156 163 */ NoSymbol, NoSymbol,
288+/* 157 164 */ NoSymbol, NoSymbol,
289+/* 158 165 */ NoSymbol, NoSymbol,
290+/* 159 166 */ NoSymbol, NoSymbol,
291+/* 160 167 */ NoSymbol, NoSymbol,
292+/* 161 168 */ NoSymbol, NoSymbol,
293+/* 162 169 */ NoSymbol, NoSymbol,
294+/* 163 170 */ NoSymbol, NoSymbol,
295+/* 164 171 */ NoSymbol, NoSymbol,
296+/* 165 172 */ NoSymbol, NoSymbol,
297+/* 166 173 */ NoSymbol, NoSymbol,
298+/* 167 174 */ NoSymbol, NoSymbol,
299+/* 168 175 */ NoSymbol, NoSymbol,
300+/* 169 176 */ NoSymbol, NoSymbol,
301+/* 170 177 */ NoSymbol, NoSymbol,
302+/* 171 178 */ NoSymbol, NoSymbol,
303+/* 172 179 */ NoSymbol, NoSymbol,
304+/* 173 180 */ NoSymbol, NoSymbol,
305+/* 174 181 */ NoSymbol, NoSymbol,
306+/* 175 182 */ NoSymbol, NoSymbol,
307+/* 176 183 */ NoSymbol, NoSymbol,
308+/* 177 184 */ NoSymbol, NoSymbol,
309+/* 178 185 */ NoSymbol, NoSymbol,
310+/* 179 186 */ NoSymbol, NoSymbol,
311+/* 180 187 */ NoSymbol, NoSymbol,
312+/* 181 188 */ NoSymbol, NoSymbol,
313+/* 182 189 */ NoSymbol, NoSymbol,
314+/* 183 190 */ NoSymbol, NoSymbol,
315+/* 184 191 */ NoSymbol, NoSymbol,
316+/* 185 192 */ NoSymbol, NoSymbol,
317+/* 186 193 */ NoSymbol, NoSymbol,
318+/* 187 194 */ NoSymbol, NoSymbol,
319+/* 188 195 */ NoSymbol, NoSymbol,
320+/* 189 196 */ NoSymbol, NoSymbol,
321+/* 190 197 */ NoSymbol, NoSymbol,
322+/* 191 198 */ NoSymbol, NoSymbol,
323+/* 192 199 */ NoSymbol, NoSymbol,
324+/* 193 200 */ NoSymbol, NoSymbol,
325+/* 194 201 */ NoSymbol, NoSymbol,
326+};
327+
328+static void
329+EvdevKbdRead (int fd, void *closure)
330+{
331+ int i, n;
332+ struct input_event events[NUM_EVENTS];
333+
334+ n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event));
335+ if (n <= 0)
336+ return;
337+
338+ n /= sizeof (struct input_event);
339+
340+ for (i = 0; i < n; i++)
341+ {
342+ if (events[i].type == EV_KEY)
343+ KdEnqueueKeyboardEvent (events[i].code, !events[i].value);
344+ }
345+}
346+
347+static void
348+EvdevKbdLoad (void)
349+{
350+ kdMinScanCode = 0;
351+ kdMaxScanCode = 193;
352+ kdKeymapWidth = 2;
353+ memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap));
354+}
355+
356+static int
357+EvdevKbdInit (void)
358+{
359+ int fd, i;
360+
361+ if (!EvdevInputType)
362+ EvdevInputType = KdAllocInputType ();
363+
364+ if (!kdKeyboard)
365+ {
366+ for (i = 0; i < NUM_DEFAULT_EVDEV; i++)
367+ {
368+ fd = open (kdefaultEvdev[i], 2);
369+ if (fd >= 0)
370+ {
371+ kdKeyboard = KdSaveString (kdefaultEvdev[i]);
372+ break;
373+ }
374+ }
375+ }
376+ else
377+ {
378+ fd = open (kdKeyboard, O_RDWR);
379+ if (fd < 0)
380+ return FALSE;
381+ }
382+
383+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
384+ {
385+ close (fd);
386+ return FALSE;
387+ }
388+
389+ if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL))
390+ return FALSE;
391+
392+ kbd_fd = fd;
393+ return TRUE;
394+}
395+
396+static void
397+EvdevKbdFini (void)
398+{
399+}
400+
401+static void
402+EvdevKbdLeds (int leds)
403+{
404+ struct input_event event;
405+
406+ memset(&event, 0, sizeof(event));
407+
408+ event.type = EV_LED;
409+ event.code = LED_CAPSL;
410+ event.value = leds & (1 << 0) ? 1 : 0;
411+ write(kbd_fd, (char *) &event, sizeof(event));
412+
413+ event.type = EV_LED;
414+ event.code = LED_NUML;
415+ event.value = leds & (1 << 1) ? 1 : 0;
416+ write(kbd_fd, (char *) &event, sizeof(event));
417+
418+ event.type = EV_LED;
419+ event.code = LED_SCROLLL;
420+ event.value = leds & (1 << 2) ? 1 : 0;
421+ write(kbd_fd, (char *) &event, sizeof(event));
422+
423+ event.type = EV_LED;
424+ event.code = LED_COMPOSE;
425+ event.value = leds & (1 << 3) ? 1 : 0;
426+ write(kbd_fd, (char *) &event, sizeof(event));
427+}
428+
429+static void
430+EvdevKbdBell (int volume, int frequency, int duration)
431+{
432+}
433+
434 KdKeyboardFuncs LinuxEvdevKeyboardFuncs = {
435 EvdevKbdLoad,
436 EvdevKbdInit,
437@@ -296,4 +659,4 @@
438 EvdevKbdFini,
439 0,
440 };
441-#endif
442+
443diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.c xserver/hw/kdrive/src/kdrive.c
444--- xserver.original/hw/kdrive/src/kdrive.c 2005-12-16 10:36:07.000000000 -0200
445+++ xserver/hw/kdrive/src/kdrive.c 2005-12-16 10:37:09.000000000 -0200
446@@ -73,6 +73,7 @@
447 Bool kdEnabled;
448 int kdSubpixelOrder;
449 int kdVirtualTerminal = -1;
450+char *kdKeyboard = 0;
451 Bool kdSwitchPending;
452 char *kdSwitchCmd;
453 DDXPointRec kdOrigin;
454@@ -795,6 +796,14 @@
455 UseMsg ();
456 return 2;
457 }
458+ if (!strcmp (argv[i], "-keyboard"))
459+ {
460+ if ((i+1) < argc)
461+ kdKeyboard = argv[i+1];
462+ else
463+ UseMsg ();
464+ return 2;
465+ }
466 if (!strcmp (argv[i], "-rgba"))
467 {
468 if ((i+1) < argc)
469diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.h xserver/hw/kdrive/src/kdrive.h
470--- xserver.original/hw/kdrive/src/kdrive.h 2005-12-16 10:36:07.000000000 -0200
471+++ xserver/hw/kdrive/src/kdrive.h 2005-12-16 10:37:09.000000000 -0200
472@@ -416,6 +416,7 @@
473 extern Bool kdDisableZaphod;
474 extern Bool kdDontZap;
475 extern int kdVirtualTerminal;
476+extern char *kdKeyboard;
477 extern char *kdSwitchCmd;
478 extern KdOsFuncs *kdOsFuncs;
479
480@@ -769,7 +770,7 @@
481 ProcessInputEvents (void);
482
483 extern KdMouseFuncs LinuxMouseFuncs;
484-extern KdMouseFuncs LinuxEvdevFuncs;
485+extern KdMouseFuncs LinuxEvdevMouseFuncs;
486 extern KdMouseFuncs Ps2MouseFuncs;
487 extern KdMouseFuncs BusMouseFuncs;
488 extern KdMouseFuncs MsMouseFuncs;
489@@ -777,6 +778,7 @@
490 extern KdMouseFuncs TsFuncs;
491 #endif
492 extern KdKeyboardFuncs LinuxKeyboardFuncs;
493+extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
494 extern KdOsFuncs LinuxFuncs;
495
496 extern KdMouseFuncs VxWorksMouseFuncs;
497diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kinput.c xserver/hw/kdrive/src/kinput.c
498--- xserver.original/hw/kdrive/src/kinput.c 2005-12-16 10:36:07.000000000 -0200
499+++ xserver/hw/kdrive/src/kinput.c 2005-12-16 10:37:09.000000000 -0200
500@@ -1300,6 +1300,7 @@
501 xE.u.u.type = KeyPress;
502 xE.u.u.detail = key_code;
503
504+#ifndef XKB
505 switch (KEYCOL1(key_code))
506 {
507 case XK_Num_Lock:
508@@ -1313,6 +1314,7 @@
509 else
510 xE.u.u.type = KeyPress;
511 }
512+#endif
513
514 /*
515 * Check pressed keys which are already down
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch
new file mode 100644
index 0000000000..28d7325601
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch
@@ -0,0 +1,54 @@
1--- xserver/hw/kdrive/fbdev/fbinit.c~ 2006-01-31 17:09:33.000000000 +0100
2+++ xserver/hw/kdrive/fbdev/fbinit.c 2006-01-31 17:11:55.000000000 +0100
3@@ -28,6 +28,8 @@
4 #endif
5 #include <fbdev.h>
6
7+extern int use_evdev;
8+
9 void
10 InitCard (char *name)
11 {
12@@ -45,7 +47,10 @@
13 void
14 InitInput (int argc, char **argv)
15 {
16- KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
17+ if (use_evdev)
18+ KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
19+ else
20+ KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
21 #ifdef TOUCHSCREEN
22 KdAddMouseDriver (&TsFuncs);
23 #endif
24--- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100
25+++ xserver/hw/kdrive/src/kdrive.c 2006-01-31 17:15:28.000000000 +0100
26@@ -44,6 +44,8 @@
27 #include "dpmsproc.h"
28 #endif
29
30+int use_evdev = 0;
31+
32 typedef struct _kdDepths {
33 CARD8 depth;
34 CARD8 bpp;
35@@ -687,6 +689,7 @@
36 ErrorF("-videoTest Start the server, pause momentarily and exit\n");
37 ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n");
38 ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
39+ ErrorF("-use-evdev Use Linux evdev input\n");
40 ErrorF("-switchCmd Command to execute on vt switch\n");
41 ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
42 ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
43@@ -796,6 +799,11 @@
44 UseMsg ();
45 return 2;
46 }
47+ if (!strcmp (argv[i], "-use-evdev"))
48+ {
49+ use_evdev = 1;
50+ return 1;
51+ }
52 if (!strcmp (argv[i], "-keyboard"))
53 {
54 if ((i+1) < argc)
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch
new file mode 100644
index 0000000000..d614b547a8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch
@@ -0,0 +1,25 @@
1Index: xorg-server-1.4/hw/kdrive/linux/keyboard.c
2===================================================================
3--- xorg-server-1.4.orig/hw/kdrive/linux/keyboard.c 2007-09-29 18:31:15.000000000 +0200
4+++ xorg-server-1.4/hw/kdrive/linux/keyboard.c 2007-09-29 18:33:02.000000000 +0200
5@@ -486,6 +486,8 @@
6 ki->minScanCode = minKeyCode;
7 ki->maxScanCode = maxKeyCode;
8 #endif
9+ ki->minScanCode = 0;
10+ ki->maxScanCode = NR_KEYS;
11 }
12
13 /*
14@@ -743,11 +743,6 @@
15 cfsetispeed(&nTty, 9600);
16 cfsetospeed(&nTty, 9600);
17 tcsetattr(fd, TCSANOW, &nTty);
18- /*
19- * Flush any pending keystrokes
20- */
21- while ((n = read (fd, buf, sizeof (buf))) > 0)
22- ;
23 KdRegisterFd (fd, LinuxKeyboardRead, ki);
24 return Success;
25 }
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch
new file mode 100644
index 0000000000..35ccadaa8d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch
@@ -0,0 +1,13 @@
1--- xserver/hw/kdrive/linux/mouse.c.orig 2004-05-13 14:25:51.000000000 -0700
2+++ xserver/hw/kdrive/linux/mouse.c 2005-09-22 12:20:47.000000000 -0700
3@@ -927,8 +927,10 @@ char *kdefaultMouse[] = {
4 "/dev/psaux",
5 "/dev/input/mice",
6 "/dev/adbmouse",
7+#ifdef BREAK_MY_SERIAL_CONSOLE
8 "/dev/ttyS0",
9 "/dev/ttyS1",
10+#endif
11 };
12
13 #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0]))
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch
new file mode 100644
index 0000000000..6b34032a39
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch
@@ -0,0 +1,12 @@
1Index: git/configure.ac
2===================================================================
3--- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
4+++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
5@@ -62,7 +62,6 @@
6 AC_LIBTOOL_WIN32_DLL
7 AC_DISABLE_STATIC
8 AC_PROG_LIBTOOL
9-DOLT
10 AC_PROG_MAKE_SET
11 PKG_PROG_PKG_CONFIG
12 AC_PROG_LEX
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch
new file mode 100644
index 0000000000..a580b500b7
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch
@@ -0,0 +1,58 @@
1Index: xorg-server-1.2.0/Makefile.am
2===================================================================
3--- xorg-server-1.2.0.orig/Makefile.am 2007-01-23 06:39:15.000000000 +0100
4+++ xorg-server-1.2.0/Makefile.am 2007-03-28 20:26:19.000000000 +0200
5@@ -30,6 +30,10 @@
6 XINPUT_DIR=Xi
7 endif
8
9+if XKB
10+XKB_DIR=xkb
11+endif
12+
13 if DBE
14 DBE_DIR=dbe
15 endif
16@@ -46,7 +50,7 @@
17 randr \
18 render \
19 $(XINPUT_DIR) \
20- xkb \
21+ $(XKB_DIR) \
22 $(DBE_DIR) \
23 $(MFB_DIR) \
24 $(AFB_DIR) \
25Index: xorg-server-1.2.0/configure.ac
26===================================================================
27--- xorg-server-1.2.0.orig/configure.ac 2007-01-23 06:39:15.000000000 +0100
28+++ xorg-server-1.2.0/configure.ac 2007-03-28 20:27:13.000000000 +0200
29@@ -428,6 +428,7 @@
30 AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
31 AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
32 AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
33+AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Build XKB (default: enabled)]), [XKB=$enableval], [XKB=yes])
34
35 dnl DDXes.
36 AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
37@@ -754,12 +755,15 @@
38
39 AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
40
41-AC_DEFINE(XKB, 1, [Build XKB])
42-AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
43-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
44-REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
45-XKB_LIB='$(top_builddir)/xkb/libxkb.la'
46-XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
47+AM_CONDITIONAL(XKB, [test "x$XKB" = xyes])
48+if test "x$XKB" = xyes; then
49+ AC_DEFINE(XKB, 1, [Build XKB])
50+ AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
51+ AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
52+ REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
53+ XKB_LIB='$(top_builddir)/xkb/libxkb.la'
54+ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
55+fi
56
57 AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
58 [Do not have `strcasecmp'.]))