summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch137
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch20
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch37
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch12
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch23
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch14
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch446
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch503
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch53
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch43
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch13
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch54
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch73
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch82
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb48
15 files changed, 1558 insertions, 0 deletions
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
new file mode 100644
index 000000000..df5bbe2ab
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
@@ -0,0 +1,137 @@
+---
+ configure |38107 -----------------------------------------------------------
+ configure.ac | 2 -
+ hw/kdrive/linux/tslib.c | 68 ++++++++++++++++++++++++++----------------------
+ 2 files changed, 39 insertions(+), 31 deletions(-)
+
+
+Index: xorg-server-1.1.99.3/configure.ac
+===================================================================
+--- xorg-server-1.1.99.3.orig/configure.ac 2007-01-30 00:22:41.000000000 +0000
++++ xorg-server-1.1.99.3/configure.ac 2007-01-30 00:22:41.000000000 +0000
+@@ -717,7 +717,7 @@ fi
+
+ if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then
+ AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
+- REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
++ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateext"
+ else
+ XCALIBRATE=no
+ fi
+Index: xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/tslib.c 2007-01-30 00:44:13.000000000 +0000
++++ xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c 2007-01-30 21:55:52.000000000 +0000
+@@ -47,6 +47,10 @@
+
+ #define TSLIB_QUEUE_SIZE 3
+
++/* For XCalibrate extension */
++void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
++void *tslib_raw_event_closure;
++
+ struct TslibPrivate {
+ int fd;
+ int lastx, lasty;
+@@ -76,6 +80,19 @@ TsRead (int fd, void *closure)
+ unsigned long flags = 0;
+ int discard = 0;
+
++ if (tslib_raw_event_hook)
++ {
++ /* XCalibrate Ext */
++ if (ts_read_raw(private->tsDev, &event, 1) == 1)
++ {
++ tslib_raw_event_hook (event.x,
++ event.y,
++ event.pressure,
++ tslib_raw_event_closure);
++ }
++ return;
++ }
++
+ if (!private->tsDev) {
+ DebugF("[tslib] EXTREME BADNESS: TsRead called while tsDev is null!\n");
+ return;
+@@ -322,14 +339,14 @@ TsRead (int fd, void *closure)
+ }
+ }
+
+-/* must always be NULL-terminated. */
+-char *valid_ts_names[] = {
+- "ADS784x Touchscreen",
+- "omap-ts",
+- "TSC2301 touchscreen",
+- NULL
++static char *TsNames[] = {
++ NULL, /* set via TSLIB_TSDEVICE */
++ "/dev/ts",
++ "/dev/touchscreen/0",
+ };
+
++#define NUM_TS_NAMES (sizeof (TsNames) / sizeof (TsNames[0]))
++
+ #define TS_NAME_SIZE 32
+
+ static Status
+@@ -383,11 +400,10 @@ TslibDisable (KdPointerInfo *pi)
+ private->tsDev = NULL;
+ }
+
+-
+ static Status
+ TslibInit (KdPointerInfo *pi)
+ {
+- int fd = 0, i = 0;
++ int fd = 0, i = 0, j = 0;
+ char devpath[PATH_MAX], devname[TS_NAME_SIZE];
+ DIR *inputdir = NULL;
+ struct dirent *inputent = NULL;
+@@ -397,33 +413,25 @@ TslibInit (KdPointerInfo *pi)
+ return !Success;
+
+ if (!pi->path || strcmp(pi->path, "auto") == 0) {
+- if (!(inputdir = opendir("/dev/input"))) {
+- ErrorF("[tslib/TslibInit]: couldn't open /dev/input!\n");
+- return BadMatch;
+- }
+
+- while ((inputent = readdir(inputdir))) {
+- if (strncmp(inputent->d_name, "event", 5) != 0)
+- continue;
++ if ((TsNames[0] = getenv("TSLIB_TSDEVICE")) == NULL)
++ j++;
++
++ for (i = j; i < NUM_TS_NAMES; i++)
++ {
++ struct tsdev *tsDev;
+
+- snprintf(devpath, PATH_MAX, "/dev/input/%s", inputent->d_name);
+- fd = open(devpath, O_RDWR);
++ if(!(tsDev = ts_open(TsNames[i], 0)))
++ continue;
+
+- if (!ioctl(fd, EVIOCGNAME(sizeof(devname)), devname)) {
+- close(fd);
++ if (ts_config(tsDev))
+ continue;
+- }
+- close(fd);
+
+- for (i = 0; valid_ts_names[i]; i++) {
+- if (strcmp(devname, valid_ts_names[i]) == 0) {
+- pi->path = KdSaveString(devpath);
+- break;
+- }
+- }
+- }
+-
+- closedir(inputdir);
++ ts_close(tsDev);
++
++ pi->path = KdSaveString(TsNames[i]);
++ break;
++ }
+ }
+
+ if (!pi->path || strcmp(pi->path, "auto") == 0) {
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch
new file mode 100644
index 000000000..bd8842721
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch
@@ -0,0 +1,20 @@
+--- xserver/hw/kdrive/linux/linux.c.orig 2005-04-23 15:56:13.988849232 +0000
++++ xserver/hw/kdrive/linux/linux.c 2005-04-23 15:57:05.001094192 +0000
+@@ -342,7 +342,7 @@
+ /*
+ * Open the APM driver
+ */
+- LinuxApmFd = open ("/dev/apm_bios", 2);
++ /*LinuxApmFd = open ("/dev/apm_bios", 2);
+ if (LinuxApmFd < 0 && errno == ENOENT)
+ LinuxApmFd = open ("/dev/misc/apm_bios", 2);
+ if (LinuxApmFd >= 0)
+@@ -352,7 +352,7 @@
+ RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
+ AddEnabledDevice (LinuxApmFd);
+ }
+-
++ */
+ /*
+ * now get the VT
+ */
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch
new file mode 100644
index 000000000..9c43e52ea
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch
@@ -0,0 +1,37 @@
+--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
++++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
+@@ -505,7 +505,11 @@
+ XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
+
+ dnl Core modules for most extensions, et al.
++if test "$KDRIVE" = yes; then
++REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto"
++else
+ REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto"
++fi
+ REQUIRED_LIBS="xfont xau fontenc"
+
+ AM_CONDITIONAL(XV, [test "x$XV" = xyes])
+@@ -1514,7 +1526,9 @@
+ AC_SUBST(XKB_COMPILED_DIR)
+
+ dnl and the rest of these are generic, so they're in config.h
++if test ! x"$KDRIVE" = xyes; then
+ AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
++fi
+ AC_DEFINE(XResExtension, 1, [Build XRes extension])
+
+ dnl CYGWIN does not define fd_set if _POSIX_SOURCE is defined
+@@ -1534,10 +1548,12 @@
+
+ AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
+
++if test ! "x$KDRIVE" = xyes ; then
+ dnl xorgconfig CLI configuration utility
+ PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11])
+ AC_SUBST(XORGCONFIG_DEP_CFLAGS)
+ AC_SUBST(XORGCONFIG_DEP_LIBS)
++fi
+
+ dnl xorgcfg GUI configuration utility
+ AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch
new file mode 100644
index 000000000..13a6c2c95
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch
@@ -0,0 +1,12 @@
+--- xorg-server-X11R7.1-1.1.0/dix/dixfonts.c.orig 2006-06-08 14:49:12.158684250 +0200
++++ xorg-server-X11R7.1-1.1.0/dix/dixfonts.c 2006-06-08 14:49:52.493205000 +0200
+@@ -52,8 +52,8 @@
+ /* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */
+
+ #define NEED_REPLIES
+ #ifdef HAVE_DIX_CONFIG_H
+-#include <dix-config.h>
++#include <kdrive-config.h>
+ #endif
+
+ #include <X11/X.h>
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch
new file mode 100644
index 000000000..e488657b7
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch
@@ -0,0 +1,23 @@
+--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
++++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
+@@ -1438,6 +1446,10 @@
+ fi
+
+- # tslib...
++ AC_CHECK_HEADERS([tslib.h])
++ if test "$ac_cv_header_tslib_h" = yes; then
++ AC_DEFINE(TSLIB, 1, [Build kdrive with tslib support])
++ AC_DEFINE(TOUCHSCREEN, 1, [Build kdrive with touchscreen support])
++ fi
+
+ # damage shadow extension glx (NOTYET) fb mi
+ KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
+@@ -1467,7 +1479,7 @@
+ AC_SUBST(KDRIVE_CFLAGS)
+ AC_SUBST(KDRIVE_PURE_LIBS)
+ AC_SUBST(KDRIVE_LIBS)
+-AM_CONDITIONAL(TSLIB, false)
++AM_CONDITIONAL(TSLIB, [test x"$ac_cv_header_tslib_h" = xyes])
+ AM_CONDITIONAL(H3600_TS, false)
+ AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
+ AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch
new file mode 100644
index 000000000..f87e7cc2c
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch
@@ -0,0 +1,14 @@
+--- xserver/hw/kdrive/fbdev/fbdev.c~ 2004-09-15 00:08:10.000000000 +0100
++++ xserver/hw/kdrive/fbdev/fbdev.c 2004-11-13 17:47:02.000000000 +0000
+@@ -198,6 +198,11 @@
+ return FALSE;
+ }
+
++ /* Re-get the "fixed" parameters since they might have changed */
++ k = ioctl (priv->fd, FBIOGET_FSCREENINFO, &priv->fix);
++ if (k < 0)
++ perror ("FBIOGET_FSCREENINFO");
++
+ /* Now get the new screeninfo */
+ ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var);
+ depth = priv->var.bits_per_pixel;
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch
new file mode 100644
index 000000000..09c9e8909
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch
@@ -0,0 +1,446 @@
+---
+ Xi/chgdctl.c | 55 +++++++++++++++++++------
+ Xi/getdctl.c | 87 +++++++++++++++++++++++++++++++----------
+ Xi/getdctl.h | 11 +++--
+ Xi/stubs.c | 2
+ configure.ac | 2
+ dix/devices.c | 31 +++++++++-----
+ hw/kdrive/linux/tslib.c | 8 +--
+ hw/kdrive/src/kinput.c | 6 +-
+ hw/xfree86/common/xf86Xinput.c | 3 -
+ include/input.h | 2
+ include/inputstr.h | 18 +++++++-
+ 11 files changed, 162 insertions(+), 63 deletions(-)
+
+Index: xorg-server-1.1.99.3/Xi/chgdctl.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/Xi/chgdctl.c 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/Xi/chgdctl.c 2007-01-29 22:59:27.000000000 +0000
+@@ -104,8 +104,10 @@ ProcXChangeDeviceControl(ClientPtr clien
+ xChangeDeviceControlReply rep;
+ AxisInfoPtr a;
+ CARD32 *resolution;
+- xDeviceTSCtl *ts;
++ xDeviceAbsCalibCtl *calib;
++ xDeviceAbsAreaCtl *area;
+ xDeviceCoreCtl *c;
++ xDeviceEnableCtl *e;
+
+ REQUEST(xChangeDeviceControlReq);
+ REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
+@@ -170,25 +172,28 @@ ProcXChangeDeviceControl(ClientPtr clien
+ return Success;
+ }
+ break;
+- case DEVICE_TOUCHSCREEN:
+- ts = (xDeviceTSCtl *)&stuff[1];
+-
+- if (ts->button_threshold < 0 || ts->button_threshold > 255) {
++ case DEVICE_ABS_CALIB:
++ calib = (xDeviceAbsCalibCtl *)&stuff[1];
++
++ if (calib->button_threshold < 0 || calib->button_threshold > 255) {
+ SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0,
+ BadValue);
+ return Success;
+ }
+
+- status = ChangeDeviceControl(client, dev, (xDeviceCtl *) ts);
++ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) calib);
+
+ if (status == Success) {
+- dev->touchscreen->min_x = ts->min_x;
+- dev->touchscreen->max_x = ts->max_x;
+- dev->touchscreen->min_y = ts->min_y;
+- dev->touchscreen->max_y = ts->max_y;
+- dev->touchscreen->button_threshold = ts->button_threshold;
+- } else if (status == DeviceBusy) {
+- rep.status = DeviceBusy;
++ dev->absolute->min_x = calib->min_x;
++ dev->absolute->max_x = calib->max_x;
++ dev->absolute->min_y = calib->min_y;
++ dev->absolute->max_y = calib->max_y;
++ dev->absolute->flip_x = calib->flip_x;
++ dev->absolute->flip_y = calib->flip_y;
++ dev->absolute->rotation = calib->rotation;
++ dev->absolute->button_threshold = calib->button_threshold;
++ } else if (status == DeviceBusy || status == BadValue) {
++ rep.status = status;
+ WriteReplyToClient(client, sizeof(xChangeDeviceControlReply),
+ &rep);
+ return Success;
+@@ -199,6 +204,30 @@ ProcXChangeDeviceControl(ClientPtr clien
+ }
+
+ break;
++ case DEVICE_ABS_AREA:
++ area = (xDeviceAbsAreaCtl *)&stuff[1];
++
++ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) area);
++
++ if (status == Success) {
++ dev->absolute->offset_x = area->offset_x;
++ dev->absolute->offset_y = area->offset_y;
++ dev->absolute->width = area->width;
++ dev->absolute->height = area->height;
++ dev->absolute->screen = area->screen;
++ dev->absolute->following = area->following;
++ } else if (status == DeviceBusy || status == BadValue) {
++ rep.status = status;
++ WriteReplyToClient(client, sizeof(xChangeDeviceControlReply),
++ &rep);
++ return Success;
++ } else {
++ SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0,
++ BadMatch);
++ return Success;
++ }
++
++ break;
+ case DEVICE_CORE:
+ c = (xDeviceCoreCtl *)&stuff[1];
+
+Index: xorg-server-1.1.99.3/Xi/getdctl.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/Xi/getdctl.c 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/Xi/getdctl.c 2007-01-29 22:59:27.000000000 +0000
+@@ -124,14 +124,23 @@ ProcXGetDeviceControl(ClientPtr client)
+ total_length = sizeof(xDeviceResolutionState) +
+ (3 * sizeof(int) * dev->valuator->numAxes);
+ break;
+- case DEVICE_TOUCHSCREEN:
+- if (!dev->touchscreen) {
++ case DEVICE_ABS_CALIB:
++ if (!dev->absolute) {
+ SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
+ BadMatch);
+ return Success;
+ }
+
+- total_length = sizeof(xDeviceTSCtl);
++ total_length = sizeof(xDeviceAbsCalibCtl);
++ break;
++ case DEVICE_ABS_AREA:
++ if (!dev->absolute) {
++ SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
++ BadMatch);
++ return Success;
++ }
++
++ total_length = sizeof(xDeviceAbsAreaCtl);
+ break;
+ case DEVICE_CORE:
+ total_length = sizeof(xDeviceCoreCtl);
+@@ -152,8 +161,11 @@ ProcXGetDeviceControl(ClientPtr client)
+ case DEVICE_RESOLUTION:
+ CopySwapDeviceResolution(client, dev->valuator, buf, total_length);
+ break;
+- case DEVICE_TOUCHSCREEN:
+- CopySwapDeviceTouchscreen(client, dev->touchscreen, buf);
++ case DEVICE_ABS_CALIB:
++ CopySwapDeviceAbsCalib(client, dev->absolute, buf);
++ break;
++ case DEVICE_ABS_AREA:
++ CopySwapDeviceAbsArea(client, dev->absolute, buf);
+ break;
+ case DEVICE_CORE:
+ CopySwapDeviceCore(client, dev, buf);
+@@ -206,28 +218,61 @@ CopySwapDeviceResolution(ClientPtr clien
+ }
+ }
+
+-void CopySwapDeviceTouchscreen (ClientPtr client, TouchscreenClassPtr dts,
++void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts,
+ char *buf)
+ {
+ register char n;
+- xDeviceTSState *ts = (xDeviceTSState *) buf;
++ xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf;
+
+- ts->control = DEVICE_TOUCHSCREEN;
+- ts->length = sizeof(ts);
+- ts->min_x = dts->min_x;
+- ts->max_x = dts->max_x;
+- ts->min_y = dts->min_y;
+- ts->max_y = dts->max_y;
+- ts->button_threshold = dts->button_threshold;
++ calib->control = DEVICE_ABS_CALIB;
++ calib->length = sizeof(calib);
++ calib->min_x = dts->min_x;
++ calib->max_x = dts->max_x;
++ calib->min_y = dts->min_y;
++ calib->max_y = dts->max_y;
++ calib->flip_x = dts->flip_x;
++ calib->flip_y = dts->flip_y;
++ calib->rotation = dts->rotation;
++ calib->button_threshold = dts->button_threshold;
+
+ if (client->swapped) {
+- swaps(&ts->control, n);
+- swaps(&ts->length, n);
+- swapl(&ts->min_x, n);
+- swapl(&ts->max_x, n);
+- swapl(&ts->min_y, n);
+- swapl(&ts->max_y, n);
+- swapl(&ts->button_threshold, n);
++ swaps(&calib->control, n);
++ swaps(&calib->length, n);
++ swapl(&calib->min_x, n);
++ swapl(&calib->max_x, n);
++ swapl(&calib->min_y, n);
++ swapl(&calib->max_y, n);
++ swapl(&calib->flip_x, n);
++ swapl(&calib->flip_y, n);
++ swapl(&calib->rotation, n);
++ swapl(&calib->button_threshold, n);
++ }
++}
++
++void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts,
++ char *buf)
++{
++ register char n;
++ xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf;
++
++ area->control = DEVICE_ABS_AREA;
++ area->length = sizeof(area);
++ area->offset_x = dts->offset_x;
++ area->offset_y = dts->offset_y;
++ area->width = dts->width;
++ area->height = dts->height;
++ area->screen = dts->screen;
++ area->following = dts->following;
++
++ if (client->swapped) {
++ swaps(&area->control, n);
++ swaps(&area->length, n);
++ swapl(&area->offset_x, n);
++ swapl(&area->offset_y, n);
++ swapl(&area->width, n);
++ swapl(&area->height, n);
++ swapl(&area->screen, n);
++ swapl(&area->following, n);
+ }
+ }
+
+Index: xorg-server-1.1.99.3/Xi/getdctl.h
+===================================================================
+--- xorg-server-1.1.99.3.orig/Xi/getdctl.h 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/Xi/getdctl.h 2007-01-29 22:59:27.000000000 +0000
+@@ -42,10 +42,13 @@ void CopySwapDeviceResolution(ClientPtr
+ int /* length */
+ );
+
+-void CopySwapDeviceTouchscreen(ClientPtr /* client */ ,
+- TouchscreenClassPtr /* ts */ ,
+- char * /* buf */
+- );
++void CopySwapDeviceAbsCalib (ClientPtr client,
++ AbsoluteClassPtr dts,
++ char *buf);
++
++void CopySwapDeviceAbsArea (ClientPtr client,
++ AbsoluteClassPtr dts,
++ char *buf);
+
+ void CopySwapDeviceCore(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+Index: xorg-server-1.1.99.3/Xi/stubs.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/Xi/stubs.c 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/Xi/stubs.c 2007-01-29 22:59:27.000000000 +0000
+@@ -287,7 +287,7 @@ ChangeDeviceControl(register ClientPtr c
+ switch (control->control) {
+ case DEVICE_RESOLUTION:
+ return (BadMatch);
+- case DEVICE_TOUCHSCREEN:
++ case DEVICE_ABS_CALIB:
+ return (BadMatch);
+ case DEVICE_CORE:
+ return (BadMatch);
+Index: xorg-server-1.1.99.3/dix/devices.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/dix/devices.c 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/dix/devices.c 2007-01-29 22:59:27.000000000 +0000
+@@ -117,7 +117,7 @@ AddInputDevice(DeviceProc deviceProc, Bo
+ dev->button = (ButtonClassPtr)NULL;
+ dev->focus = (FocusClassPtr)NULL;
+ dev->proximity = (ProximityClassPtr)NULL;
+- dev->touchscreen = (TouchscreenClassPtr)NULL;
++ dev->absolute = (AbsoluteClassPtr)NULL;
+ dev->kbdfeed = (KbdFeedbackPtr)NULL;
+ dev->ptrfeed = (PtrFeedbackPtr)NULL;
+ dev->intfeed = (IntegerFeedbackPtr)NULL;
+@@ -821,22 +821,31 @@ InitValuatorClassDeviceStruct(DeviceIntP
+ }
+
+ _X_EXPORT Bool
+-InitTouchscreenClassDeviceStruct(DeviceIntPtr dev)
++InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
+ {
+- register TouchscreenClassPtr tsc;
++ register AbsoluteClassPtr abs;
+
+- tsc = (TouchscreenClassPtr)xalloc(sizeof(TouchscreenClassRec));
+- if (!tsc)
++ abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec));
++ if (!abs)
+ return FALSE;
+
+ /* we don't do anything sensible with these, but should */
+- tsc->min_x = -1;
+- tsc->min_y = -1;
+- tsc->max_x = -1;
+- tsc->max_y = -1;
++ abs->min_x = -1;
++ abs->min_y = -1;
++ abs->max_x = -1;
++ abs->max_y = -1;
++ abs->flip_x = 0;
++ abs->flip_y = 0;
++ abs->rotation = 0;
++ abs->button_threshold = 0;
+
+- tsc->button_threshold = 0;
+- dev->touchscreen = tsc;
++ abs->offset_x = 0;
++ abs->offset_y = 0;
++ abs->width = -1;
++ abs->height = -1;
++ abs->following = 0;
++
++ dev->absolute = abs;
+
+ return TRUE;
+ }
+Index: xorg-server-1.1.99.3/hw/xfree86/common/xf86Xinput.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/xfree86/common/xf86Xinput.c 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/hw/xfree86/common/xf86Xinput.c 2007-01-29 22:59:27.000000000 +0000
+@@ -538,7 +538,8 @@ ChangeDeviceControl (ClientPtr client, D
+ switch (control->control) {
+ case DEVICE_CORE:
+ case DEVICE_RESOLUTION:
+- case DEVICE_TOUCHSCREEN:
++ case DEVICE_ABS_CALIB:
++ case DEVICE_ABS_AREA:
+ return Success;
+ default:
+ return BadMatch;
+Index: xorg-server-1.1.99.3/include/input.h
+===================================================================
+--- xorg-server-1.1.99.3.orig/include/input.h 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/include/input.h 2007-01-29 22:59:27.000000000 +0000
+@@ -238,7 +238,7 @@ extern Bool InitValuatorClassDeviceStruc
+ int /*numMotionEvents*/,
+ int /*mode*/);
+
+-extern Bool InitTouchscreenClassDeviceStruct(
++extern Bool InitAbsoluteClassDeviceStruct(
+ DeviceIntPtr /*device*/);
+
+ extern Bool InitFocusClassDeviceStruct(
+Index: xorg-server-1.1.99.3/include/inputstr.h
+===================================================================
+--- xorg-server-1.1.99.3.orig/include/inputstr.h 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/include/inputstr.h 2007-01-29 22:59:27.000000000 +0000
+@@ -185,13 +185,25 @@ typedef struct _ProximityClassRec {
+ char pad;
+ } ProximityClassRec, *ProximityClassPtr;
+
+-typedef struct _TouchscreenClassRec {
++typedef struct _AbsoluteClassRec {
++ /* Calibration. */
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
++ int flip_x;
++ int flip_y;
++ int rotation;
+ int button_threshold;
+-} TouchscreenClassRec, *TouchscreenClassPtr;
++
++ /* Area. */
++ int offset_x;
++ int offset_y;
++ int width;
++ int height;
++ int screen;
++ XID following;
++} AbsoluteClassRec, *AbsoluteClassPtr;
+
+ typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
+ typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
+@@ -293,7 +305,7 @@ typedef struct _DeviceIntRec {
+ ButtonClassPtr button;
+ FocusClassPtr focus;
+ ProximityClassPtr proximity;
+- TouchscreenClassPtr touchscreen;
++ AbsoluteClassPtr absolute;
+ KbdFeedbackPtr kbdfeed;
+ PtrFeedbackPtr ptrfeed;
+ IntegerFeedbackPtr intfeed;
+Index: xorg-server-1.1.99.3/configure.ac
+===================================================================
+--- xorg-server-1.1.99.3.orig/configure.ac 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/configure.ac 2007-01-29 22:59:27.000000000 +0000
+@@ -1586,7 +1586,7 @@ if test "$KDRIVE" = yes; then
+ #KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \
+ # $MIEXT_SHADOW_LIB $XPSTUBS_LIB"
+ KDRIVE_XKB_DDX_LIB='$(top_builddir)/hw/kdrive/src/libkdrivexkb.a'
+- KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $KDRIVE_XKB_DDX_LIB $XKB_LIB $KDRIVE_XKB_DDX_LIB$COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB $CONFIG_LIB"
++ KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $KDRIVE_XKB_DDX_LIB $XKB_LIB $KDRIVE_XKB_DDX_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB $CONFIG_LIB"
+ KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
+ KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
+ KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
+Index: xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/tslib.c 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c 2007-01-29 22:59:27.000000000 +0000
+@@ -94,7 +94,7 @@ TsRead (int fd, void *closure)
+ event.pressure);
+ discard = 0;
+ if (event.pressure) {
+- if (event.pressure > pi->dixdev->touchscreen->button_threshold)
++ if (event.pressure > pi->dixdev->absolute->button_threshold)
+ flags = KD_BUTTON_8;
+ else
+ flags = KD_BUTTON_1;
+@@ -356,9 +356,9 @@ TslibEnable (KdPointerInfo *pi)
+ close(private->fd);
+ return BadAlloc;
+ }
+- if (pi->dixdev && pi->dixdev->touchscreen &&
+- pi->dixdev->touchscreen->button_threshold == 0)
+- pi->dixdev->touchscreen->button_threshold = 115;
++ if (pi->dixdev && pi->dixdev->absolute &&
++ pi->dixdev->absolute->button_threshold == 0)
++ pi->dixdev->absolute->button_threshold = 115;
+
+ DebugF("[tslib/TslibEnable] successfully enabled %s\n", pi->path);
+ KdRegisterFd(private->fd, TsRead, pi);
+Index: xorg-server-1.1.99.3/hw/kdrive/src/kinput.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kinput.c 2007-01-29 22:58:18.000000000 +0000
++++ xorg-server-1.1.99.3/hw/kdrive/src/kinput.c 2007-01-29 22:59:27.000000000 +0000
+@@ -444,7 +444,7 @@ KdPointerProc(DeviceIntPtr pDevice, int
+
+ #ifdef XINPUT
+ if (pi->inputClass == KD_TOUCHSCREEN) {
+- InitTouchscreenClassDeviceStruct(pDevice);
++ InitAbsoluteClassDeviceStruct(pDevice);
+ xiclass = AtomFromName(XI_TOUCHSCREEN);
+ }
+ else {
+@@ -2323,8 +2323,8 @@ ChangeDeviceControl(register ClientPtr c
+ /* FIXME do something more intelligent here */
+ return BadMatch;
+
+- case DEVICE_TOUCHSCREEN:
+- if (!pDev->touchscreen)
++ case DEVICE_ABS_CALIB:
++ if (!pDev->absolute)
+ return BadDevice;
+ else
+ return Success;
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch
new file mode 100644
index 000000000..06eab817b
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch
@@ -0,0 +1,503 @@
+# Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at
+# http://lists.freedesktop.org/archives/xorg/2005-December/011635.html
+---
+# hw/kdrive/linux/evdev.c | 385 ++++++++++++++++++++++++++++++++++++++++++++++--
+# hw/kdrive/src/kdrive.c | 9 +
+# hw/kdrive/src/kdrive.h | 4
+# 3 files changed, 386 insertions(+), 12 deletions(-)
+#
+Index: xorg-server-1.1.99.3/hw/kdrive/linux/evdev.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/evdev.c 2006-11-03 14:49:05.000000000 +0000
++++ xorg-server-1.1.99.3/hw/kdrive/linux/evdev.c 2007-01-25 22:05:48.000000000 +0000
+@@ -31,9 +31,11 @@
+ #include <X11/X.h>
+ #include <X11/Xproto.h>
+ #include <X11/Xpoll.h>
++#include <X11/keysym.h>
+ #include "inputstr.h"
+ #include "scrnintstr.h"
+ #include "kdrive.h"
++#include "kkeymap.h"
+
+ #define NUM_EVENTS 128
+ #define ABS_UNSET -65535
+@@ -107,9 +109,10 @@ EvdevRead (int evdevPort, void *closure)
+ {
+ KdPointerInfo *pi = closure;
+ Kevdev *ke = pi->driverPrivate;
+- int i;
++ int i, j;
+ struct input_event events[NUM_EVENTS];
+ int n;
++ int flags;
+
+ n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
+ if (n <= 0)
+@@ -117,22 +120,64 @@ EvdevRead (int evdevPort, void *closure)
+ n /= sizeof (struct input_event);
+ for (i = 0; i < n; i++)
+ {
++ flags = KD_MOUSE_DELTA | kdPointerInfo->buttonState;
+ switch (events[i].type) {
+ case EV_SYN:
+ break;
+ case EV_KEY:
+- EvdevMotion (pi);
+- ASSIGNBIT(ke->key,events[i].code, events[i].value);
+- if (events[i].code < 0x100)
+- ErrorF ("key %d %d\n", events[i].code, events[i].value);
+- else
+- ErrorF ("key 0x%x %d\n", events[i].code, events[i].value);
++ if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) {
++ switch (events[i].code) {
++ case BTN_LEFT:
++ if (events[i].value == 1)
++ flags |= KD_BUTTON_1;
++ else
++ flags &= ~KD_BUTTON_1;
++ break;
++ case BTN_MIDDLE:
++ if (events[i].value == 1)
++ flags |= KD_BUTTON_2;
++ else
++ flags &= ~KD_BUTTON_2;
++ break;
++ case BTN_RIGHT:
++ if (events[i].value == 1)
++ flags |= KD_BUTTON_3;
++ else
++ flags &= ~KD_BUTTON_3;
++ break;
++ default:
++ /* Unknow button */
++ break;
++ }
++ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
++ }
+ break;
+ case EV_REL:
+- ke->rel[events[i].code] += events[i].value;
++ if (events[i].code == REL_X) {
++ KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0);
++ }
++ else if (events[i].code == REL_Y) {
++ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value);
++ }
++ else if (events[i].code == REL_WHEEL) {
++ for (j = 0; j < abs (events[i].value); j++) {
++ if (events[i].value > 0)
++ flags |= KD_BUTTON_4;
++ else
++ flags |= KD_BUTTON_5;
++
++ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
++
++ if (events[i].value > 0)
++ flags &= ~KD_BUTTON_4;
++ else
++ flags &= ~KD_BUTTON_5;
++
++ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
++ } /* events[i].code == REL_WHEEL */
++ }
+ break;
+ case EV_ABS:
+- ke->abs[events[i].code] = events[i].value;
+ break;
+ }
+ }
+@@ -162,6 +207,12 @@ EvdevInit (KdPointerInfo *pi)
+ for (i = 0; i < NUM_DEFAULT_EVDEV; i++) {
+ fd = open (kdefaultEvdev[i], 2);
+ if (fd >= 0) {
++ if (ioctl (fd, EVIOCGRAB, 1) < 0)
++ {
++ close (fd);
++ continue;
++ }
++
+ pi->path = KdSaveString (kdefaultEvdev[i]);
+ break;
+ }
+@@ -300,7 +351,319 @@ KdPointerDriver LinuxEvdevMouseDriver =
+ NULL,
+ };
+
+-#if 0
++/* Keyboard */
++
++int kbd_fd = -1;
++int EvdevInputType = 0;
++
++KeySym evdevKeymap[(194 - 1 + 1) * 2] = {
++/* These are directly mapped from DOS scanset 0 */
++/* 1 8 */ XK_Escape, NoSymbol,
++/* 2 9 */ XK_1, XK_exclam,
++/* 3 10 */ XK_2, XK_at,
++/* 4 11 */ XK_3, XK_numbersign,
++/* 5 12 */ XK_4, XK_dollar,
++/* 6 13 */ XK_5, XK_percent,
++/* 7 14 */ XK_6, XK_asciicircum,
++/* 8 15 */ XK_7, XK_ampersand,
++/* 9 16 */ XK_8, XK_asterisk,
++/* 10 17 */ XK_9, XK_parenleft,
++/* 11 18 */ XK_0, XK_parenright,
++/* 12 19 */ XK_minus, XK_underscore,
++/* 13 20 */ XK_equal, XK_plus,
++/* 14 21 */ XK_BackSpace, NoSymbol,
++/* 15 22 */ XK_Tab, NoSymbol,
++/* 16 23 */ XK_Q, NoSymbol,
++/* 17 24 */ XK_W, NoSymbol,
++/* 18 25 */ XK_E, NoSymbol,
++/* 19 26 */ XK_R, NoSymbol,
++/* 20 27 */ XK_T, NoSymbol,
++/* 21 28 */ XK_Y, NoSymbol,
++/* 22 29 */ XK_U, NoSymbol,
++/* 23 30 */ XK_I, NoSymbol,
++/* 24 31 */ XK_O, NoSymbol,
++/* 25 32 */ XK_P, NoSymbol,
++/* 26 33 */ XK_bracketleft, XK_braceleft,
++/* 27 34 */ XK_bracketright, XK_braceright,
++/* 28 35 */ XK_Return, NoSymbol,
++/* 29 36 */ XK_Control_L, NoSymbol,
++/* 30 37 */ XK_A, NoSymbol,
++/* 31 38 */ XK_S, NoSymbol,
++/* 32 39 */ XK_D, NoSymbol,
++/* 33 40 */ XK_F, NoSymbol,
++/* 34 41 */ XK_G, NoSymbol,
++/* 35 42 */ XK_H, NoSymbol,
++/* 36 43 */ XK_J, NoSymbol,
++/* 37 44 */ XK_K, NoSymbol,
++/* 38 45 */ XK_L, NoSymbol,
++/* 39 46 */ XK_semicolon, XK_colon,
++/* 40 47 */ XK_apostrophe, XK_quotedbl,
++/* 41 48 */ XK_grave, XK_asciitilde,
++/* 42 49 */ XK_Shift_L, NoSymbol,
++/* 43 50 */ XK_backslash, XK_bar,
++/* 44 51 */ XK_Z, NoSymbol,
++/* 45 52 */ XK_X, NoSymbol,
++/* 46 53 */ XK_C, NoSymbol,
++/* 47 54 */ XK_V, NoSymbol,
++/* 48 55 */ XK_B, NoSymbol,
++/* 49 56 */ XK_N, NoSymbol,
++/* 50 57 */ XK_M, NoSymbol,
++/* 51 58 */ XK_comma, XK_less,
++/* 52 59 */ XK_period, XK_greater,
++/* 53 60 */ XK_slash, XK_question,
++/* 54 61 */ XK_Shift_R, NoSymbol,
++/* 55 62 */ XK_KP_Multiply, NoSymbol,
++/* 56 63 */ XK_Alt_L, XK_Meta_L,
++/* 57 64 */ XK_space, NoSymbol,
++/* 58 65 */ XK_Caps_Lock, NoSymbol,
++/* 59 66 */ XK_F1, NoSymbol,
++/* 60 67 */ XK_F2, NoSymbol,
++/* 61 68 */ XK_F3, NoSymbol,
++/* 62 69 */ XK_F4, NoSymbol,
++/* 63 70 */ XK_F5, NoSymbol,
++/* 64 71 */ XK_F6, NoSymbol,
++/* 65 72 */ XK_F7, NoSymbol,
++/* 66 73 */ XK_F8, NoSymbol,
++/* 67 74 */ XK_F9, NoSymbol,
++/* 68 75 */ XK_F10, NoSymbol,
++/* 69 76 */ XK_Break, XK_Pause,
++/* 70 77 */ XK_Scroll_Lock, NoSymbol,
++/* 71 78 */ XK_KP_Home, XK_KP_7,
++/* 72 79 */ XK_KP_Up, XK_KP_8,
++/* 73 80 */ XK_KP_Page_Up, XK_KP_9,
++/* 74 81 */ XK_KP_Subtract, NoSymbol,
++/* 75 82 */ XK_KP_Left, XK_KP_4,
++/* 76 83 */ XK_KP_5, NoSymbol,
++/* 77 84 */ XK_KP_Right, XK_KP_6,
++/* 78 85 */ XK_KP_Add, NoSymbol,
++/* 79 86 */ XK_KP_End, XK_KP_1,
++/* 80 87 */ XK_KP_Down, XK_KP_2,
++/* 81 88 */ XK_KP_Page_Down, XK_KP_3,
++/* 82 89 */ XK_KP_Insert, XK_KP_0,
++/* 83 90 */ XK_KP_Delete, XK_KP_Decimal,
++/* 84 91 */ NoSymbol, NoSymbol,
++/* 85 92 */ NoSymbol, NoSymbol,
++/* 86 93 */ NoSymbol, NoSymbol,
++/* 87 94 */ XK_F11, NoSymbol,
++/* 88 95 */ XK_F12, NoSymbol,
++
++/* These are remapped from the extended set (using ExtendMap) */
++
++/* 89 96 */ XK_Control_R, NoSymbol,
++/* 90 97 */ XK_KP_Enter, NoSymbol,
++/* 91 98 */ XK_KP_Divide, NoSymbol,
++/* 92 99 */ XK_Sys_Req, XK_Print,
++/* 93 100 */ XK_Alt_R, XK_Meta_R,
++/* 94 101 */ XK_Num_Lock, NoSymbol,
++/* 95 102 */ XK_Home, NoSymbol,
++/* 96 103 */ XK_Up, NoSymbol,
++/* 97 104 */ XK_Page_Up, NoSymbol,
++/* 98 105 */ XK_Left, NoSymbol,
++/* 99 106 */ XK_Right, NoSymbol,
++/* 100 107 */ XK_End, NoSymbol,
++/* 101 108 */ XK_Down, NoSymbol,
++/* 102 109 */ XK_Page_Down, NoSymbol,
++/* 103 110 */ XK_Insert, NoSymbol,
++/* 104 111 */ XK_Delete, NoSymbol,
++/* 105 112 */ XK_Super_L, NoSymbol,
++/* 106 113 */ XK_Super_R, NoSymbol,
++/* 107 114 */ XK_Menu, NoSymbol,
++/* 108 115 */ NoSymbol, NoSymbol,
++/* 109 116 */ NoSymbol, NoSymbol,
++/* 110 117 */ NoSymbol, NoSymbol,
++/* 111 118 */ NoSymbol, NoSymbol,
++/* 112 119 */ NoSymbol, NoSymbol,
++
++/* 113 120 */ NoSymbol, NoSymbol,
++/* 114 121 */ NoSymbol, NoSymbol,
++/* 115 122 */ NoSymbol, NoSymbol,
++/* 116 123 */ NoSymbol, NoSymbol,
++/* 117 124 */ NoSymbol, NoSymbol,
++/* 118 125 */ NoSymbol, NoSymbol,
++/* 119 126 */ NoSymbol, NoSymbol,
++/* 120 127 */ NoSymbol, NoSymbol,
++/* 121 128 */ NoSymbol, NoSymbol,
++/* 122 129 */ NoSymbol, NoSymbol,
++/* 123 130 */ NoSymbol, NoSymbol,
++/* 124 131 */ NoSymbol, NoSymbol,
++/* 125 132 */ NoSymbol, NoSymbol,
++/* 126 133 */ NoSymbol, NoSymbol,
++/* 127 134 */ NoSymbol, NoSymbol,
++/* 128 135 */ NoSymbol, NoSymbol,
++/* 129 136 */ NoSymbol, NoSymbol,
++/* 130 137 */ NoSymbol, NoSymbol,
++/* 131 138 */ NoSymbol, NoSymbol,
++/* 132 139 */ NoSymbol, NoSymbol,
++/* 133 140 */ NoSymbol, NoSymbol,
++/* 134 141 */ NoSymbol, NoSymbol,
++/* 135 142 */ NoSymbol, NoSymbol,
++/* 136 143 */ NoSymbol, NoSymbol,
++/* 137 144 */ NoSymbol, NoSymbol,
++/* 138 145 */ NoSymbol, NoSymbol,
++/* 139 146 */ NoSymbol, NoSymbol,
++/* 140 147 */ NoSymbol, NoSymbol,
++/* 141 148 */ NoSymbol, NoSymbol,
++/* 142 149 */ NoSymbol, NoSymbol,
++/* 143 150 */ NoSymbol, NoSymbol,
++/* 144 151 */ NoSymbol, NoSymbol,
++/* 145 152 */ NoSymbol, NoSymbol,
++/* 146 153 */ NoSymbol, NoSymbol,
++/* 147 154 */ NoSymbol, NoSymbol,
++/* 148 155 */ NoSymbol, NoSymbol,
++/* 149 156 */ NoSymbol, NoSymbol,
++/* 150 157 */ NoSymbol, NoSymbol,
++/* 151 158 */ NoSymbol, NoSymbol,
++/* 152 159 */ NoSymbol, NoSymbol,
++/* 153 160 */ NoSymbol, NoSymbol,
++/* 154 161 */ NoSymbol, NoSymbol,
++/* 155 162 */ NoSymbol, NoSymbol,
++/* 156 163 */ NoSymbol, NoSymbol,
++/* 157 164 */ NoSymbol, NoSymbol,
++/* 158 165 */ NoSymbol, NoSymbol,
++/* 159 166 */ NoSymbol, NoSymbol,
++/* 160 167 */ NoSymbol, NoSymbol,
++/* 161 168 */ NoSymbol, NoSymbol,
++/* 162 169 */ NoSymbol, NoSymbol,
++/* 163 170 */ NoSymbol, NoSymbol,
++/* 164 171 */ NoSymbol, NoSymbol,
++/* 165 172 */ NoSymbol, NoSymbol,
++/* 166 173 */ NoSymbol, NoSymbol,
++/* 167 174 */ NoSymbol, NoSymbol,
++/* 168 175 */ NoSymbol, NoSymbol,
++/* 169 176 */ NoSymbol, NoSymbol,
++/* 170 177 */ NoSymbol, NoSymbol,
++/* 171 178 */ NoSymbol, NoSymbol,
++/* 172 179 */ NoSymbol, NoSymbol,
++/* 173 180 */ NoSymbol, NoSymbol,
++/* 174 181 */ NoSymbol, NoSymbol,
++/* 175 182 */ NoSymbol, NoSymbol,
++/* 176 183 */ NoSymbol, NoSymbol,
++/* 177 184 */ NoSymbol, NoSymbol,
++/* 178 185 */ NoSymbol, NoSymbol,
++/* 179 186 */ NoSymbol, NoSymbol,
++/* 180 187 */ NoSymbol, NoSymbol,
++/* 181 188 */ NoSymbol, NoSymbol,
++/* 182 189 */ NoSymbol, NoSymbol,
++/* 183 190 */ NoSymbol, NoSymbol,
++/* 184 191 */ NoSymbol, NoSymbol,
++/* 185 192 */ NoSymbol, NoSymbol,
++/* 186 193 */ NoSymbol, NoSymbol,
++/* 187 194 */ NoSymbol, NoSymbol,
++/* 188 195 */ NoSymbol, NoSymbol,
++/* 189 196 */ NoSymbol, NoSymbol,
++/* 190 197 */ NoSymbol, NoSymbol,
++/* 191 198 */ NoSymbol, NoSymbol,
++/* 192 199 */ NoSymbol, NoSymbol,
++/* 193 200 */ NoSymbol, NoSymbol,
++/* 194 201 */ NoSymbol, NoSymbol,
++};
++
++static void
++EvdevKbdRead (int fd, void *closure)
++{
++ int i, n;
++ struct input_event events[NUM_EVENTS];
++
++ n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event));
++ if (n <= 0)
++ return;
++
++ n /= sizeof (struct input_event);
++
++ for (i = 0; i < n; i++)
++ {
++ if (events[i].type == EV_KEY)
++ KdEnqueueKeyboardEvent (events[i].code, !events[i].value);
++ }
++}
++
++static void
++EvdevKbdLoad (void)
++{
++ kdMinScanCode = 0;
++ kdMaxScanCode = 193;
++ kdKeymapWidth = 2;
++ memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap));
++}
++
++static int
++EvdevKbdInit (void)
++{
++ int fd, i;
++
++ if (!EvdevInputType)
++ EvdevInputType = KdAllocInputType ();
++
++ if (!kdKeyboard)
++ {
++ for (i = 0; i < NUM_DEFAULT_EVDEV; i++)
++ {
++ fd = open (kdefaultEvdev[i], 2);
++ if (fd >= 0)
++ {
++ kdKeyboard = KdSaveString (kdefaultEvdev[i]);
++ break;
++ }
++ }
++ }
++ else
++ {
++ fd = open (kdKeyboard, O_RDWR);
++ if (fd < 0)
++ return FALSE;
++ }
++
++ if (ioctl (fd, EVIOCGRAB, 1) < 0)
++ {
++ close (fd);
++ return FALSE;
++ }
++
++ if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL))
++ return FALSE;
++
++ kbd_fd = fd;
++ return TRUE;
++}
++
++static void
++EvdevKbdFini (void)
++{
++}
++
++static void
++EvdevKbdLeds (int leds)
++{
++ struct input_event event;
++
++ memset(&event, 0, sizeof(event));
++
++ event.type = EV_LED;
++ event.code = LED_CAPSL;
++ event.value = leds & (1 << 0) ? 1 : 0;
++ write(kbd_fd, (char *) &event, sizeof(event));
++
++ event.type = EV_LED;
++ event.code = LED_NUML;
++ event.value = leds & (1 << 1) ? 1 : 0;
++ write(kbd_fd, (char *) &event, sizeof(event));
++
++ event.type = EV_LED;
++ event.code = LED_SCROLLL;
++ event.value = leds & (1 << 2) ? 1 : 0;
++ write(kbd_fd, (char *) &event, sizeof(event));
++
++ event.type = EV_LED;
++ event.code = LED_COMPOSE;
++ event.value = leds & (1 << 3) ? 1 : 0;
++ write(kbd_fd, (char *) &event, sizeof(event));
++}
++
++static void
++EvdevKbdBell (int volume, int frequency, int duration)
++{
++}
++
+ KdKeyboardFuncs LinuxEvdevKeyboardFuncs = {
+ EvdevKbdLoad,
+ EvdevKbdInit,
+@@ -309,4 +672,4 @@ KdKeyboardFuncs LinuxEvdevKeyboardFuncs
+ EvdevKbdFini,
+ 0,
+ };
+-#endif
++
+Index: xorg-server-1.1.99.3/hw/kdrive/src/kdrive.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kdrive.c 2006-11-03 14:49:05.000000000 +0000
++++ xorg-server-1.1.99.3/hw/kdrive/src/kdrive.c 2007-01-25 21:56:32.000000000 +0000
+@@ -80,6 +80,7 @@ Bool kdDontZap;
+ Bool kdEnabled;
+ int kdSubpixelOrder;
+ int kdVirtualTerminal = -1;
++char *kdKeyboard = 0;
+ Bool kdSwitchPending;
+ char *kdSwitchCmd;
+ DDXPointRec kdOrigin;
+@@ -707,6 +708,14 @@ KdProcessArgument (int argc, char **argv
+ UseMsg ();
+ return 2;
+ }
++ if (!strcmp (argv[i], "-keyboard"))
++ {
++ if ((i+1) < argc)
++ kdKeyboard = argv[i+1];
++ else
++ UseMsg ();
++ return 2;
++ }
+ if (!strcmp (argv[i], "-rgba"))
+ {
+ if ((i+1) < argc)
+Index: xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kdrive.h 2006-11-03 14:49:05.000000000 +0000
++++ xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h 2007-01-25 21:58:26.000000000 +0000
+@@ -512,6 +512,7 @@ extern Bool kdEmulateMiddleButton;
+ extern Bool kdDisableZaphod;
+ extern Bool kdDontZap;
+ extern int kdVirtualTerminal;
++extern char *kdKeyboard;
+ extern char *kdSwitchCmd;
+ extern KdOsFuncs *kdOsFuncs;
+
+@@ -875,12 +876,13 @@ void
+ ProcessInputEvents (void);
+
+ extern KdPointerDriver LinuxMouseDriver;
+-extern KdPointerDriver LinuxEvdevDriver;
++extern KdPointerDriver LinuxEvdevMouseFuncs;
+ extern KdPointerDriver Ps2MouseDriver;
+ extern KdPointerDriver BusMouseDriver;
+ extern KdPointerDriver MsMouseDriver;
+ extern KdPointerDriver TsDriver;
+ extern KdKeyboardDriver LinuxKeyboardDriver;
++extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
+ extern KdOsFuncs LinuxFuncs;
+
+ extern KdPointerDriver VxWorksMouseDriver;
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch
new file mode 100644
index 000000000..d4f885ee2
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch
@@ -0,0 +1,53 @@
+--- xserver/hw/kdrive/fbdev/fbinit.c~ 2006-01-31 17:09:33.000000000 +0100
++++ xserver/hw/kdrive/fbdev/fbinit.c 2006-01-31 17:11:55.000000000 +0100
+@@ -28,6 +28,8 @@
+ #endif
+ #include <fbdev.h>
+
++extern int use_evdev;
++
+ void
+ InitCard (char *name)
+ {
+@@ -45,7 +47,10 @@
+ void
+ InitInput (int argc, char **argv)
+ {
+- KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
++ if (use_evdev)
++ KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
++ else
++ KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
+ #ifdef TOUCHSCREEN
+ KdAddMouseDriver (&TsFuncs);
+ #endif
+--- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100
++++ xserver/hw/kdrive/src/kdrive.c 2006-01-31 17:15:28.000000000 +0100
+@@ -44,6 +44,8 @@
+ #include "dpmsproc.h"
+ #endif
+
++int use_evdev = 0;
++
+ typedef struct _kdDepths {
+ CARD8 depth;
+ CARD8 bpp;
+@@ -687,6 +689,7 @@
+ ErrorF("-videoTest Start the server, pause momentarily and exit\n");
+ ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n");
+ ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
++ ErrorF("-use-evdev Use Linux evdev input\n");
+ ErrorF("-switchCmd Command to execute on vt switch\n");
+ ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
+ ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
+@@ -796,6 +799,10 @@
+ UseMsg ();
+ return 2;
+ }
++ if (!strcmp (argv[i], "-use-evdev"))
++ {
++ use_evdev = 1;
++ }
+ if (!strcmp (argv[i], "-keyboard"))
+ {
+ if ((i+1) < argc)
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch
new file mode 100644
index 000000000..23a0f7eae
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch
@@ -0,0 +1,43 @@
+---
+ hw/kdrive/src/kmode.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+Index: xorg-server-1.1.99.3/hw/kdrive/src/kmode.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kmode.c 2007-01-25 23:53:59.000000000 +0000
++++ xorg-server-1.1.99.3/hw/kdrive/src/kmode.c 2007-01-27 17:17:09.000000000 +0000
+@@ -41,6 +41,11 @@ const KdMonitorTiming kdMonitorTimings[
+ 1, 11, 14, KdSyncNegative,
+ },
+
++ { 240, 320, 64, 0,
++ 0, 0, 0, KdSyncNegative,
++ 0, 0, 0, KdSyncNegative,
++ },
++
+ /* Other VESA modes */
+ { 640, 350, 85, 31500, /* VESA */
+ 32, 96, 192, KdSyncPositive, /* 26.413 */
+@@ -80,6 +85,22 @@ const KdMonitorTiming kdMonitorTimings[
+ 16, 48, 160, KdSyncNegative, /* 31.469 */
+ 10, 33, 45, KdSyncNegative, /* 59.940 */
+ },
++
++
++ { 480, 640, 60, 0,
++ 0, 0, 0, KdSyncNegative,
++ 0, 0, 0, KdSyncNegative,
++ },
++
++ { 800, 480, 51, 0,
++ 0, 0, 0, KdSyncNegative,
++ 0, 0, 0, KdSyncNegative,
++ },
++
++ { 480, 800, 51, 0,
++ 0, 0, 0, KdSyncNegative,
++ 0, 0, 0, KdSyncNegative,
++ },
+
+ /* 800x600 modes */
+ { 800, 600, 85, 56250, /* VESA */
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch
new file mode 100644
index 000000000..35ccadaa8
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch
@@ -0,0 +1,13 @@
+--- xserver/hw/kdrive/linux/mouse.c.orig 2004-05-13 14:25:51.000000000 -0700
++++ xserver/hw/kdrive/linux/mouse.c 2005-09-22 12:20:47.000000000 -0700
+@@ -927,8 +927,10 @@ char *kdefaultMouse[] = {
+ "/dev/psaux",
+ "/dev/input/mice",
+ "/dev/adbmouse",
++#ifdef BREAK_MY_SERIAL_CONSOLE
+ "/dev/ttyS0",
+ "/dev/ttyS1",
++#endif
+ };
+
+ #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0]))
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch
new file mode 100644
index 000000000..d9ef51c5b
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch
@@ -0,0 +1,54 @@
+--- git/Makefile.am.orig 2006-06-09 16:01:51.000000000 +0200
++++ git/Makefile.am 2006-06-09 16:02:59.000000000 +0200
+@@ -35,6 +35,10 @@
+ XINPUT_DIR=Xi
+ endif
+
++if XKB
++XKB_DIR=xkb
++endif
++
+ if DBE
+ DBE_DIR=dbe
+ endif
+@@ -51,7 +55,7 @@
+ randr \
+ render \
+ $(XINPUT_DIR) \
+- xkb \
++ $(XKB_DIR) \
+ $(DBE_DIR) \
+ $(MFB_DIR) \
+ $(AFB_DIR) \
+--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
++++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
+@@ -418,6 +418,7 @@
+ AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
+ AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMS=$enableval], [DPMSExtension=yes])
+ AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
++AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Build XKB (default: enabled)]), [XKB=$enableval], [XKB=yes])
+
+ dnl DDXes.
+ AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
+@@ -739,12 +740,15 @@
+
+ AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
+
+-AC_DEFINE(XKB, 1, [Build XKB])
+-AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
+-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
+-REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
+-XKB_LIB='$(top_builddir)/xkb/libxkb.la'
+-XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
++AM_CONDITIONAL(XKB, [test "x$XKB" = xyes])
++if test "x$XKB" = xyes; then
++ AC_DEFINE(XKB, 1, [Build XKB])
++ AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
++ AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
++ REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
++ XKB_LIB='$(top_builddir)/xkb/libxkb.la'
++ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
++fi
+
+ AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
+ [Do not have `strcasecmp'.]))
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch
new file mode 100644
index 000000000..2a10f13d4
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch
@@ -0,0 +1,73 @@
+---
+ Xext/Makefile.am | 5
+ Xext/xcalibrate.c | 262 +++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac | 8 +
+ include/kdrive-config.h.in | 3
+ mi/miinitext.c | 6 +
+ 5 files changed, 283 insertions(+), 1 deletion(-)
+
+Index: xorg-server-1.1.99.3/mi/miinitext.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/mi/miinitext.c 2006-11-03 14:49:06.000000000 +0000
++++ xorg-server-1.1.99.3/mi/miinitext.c 2007-01-27 17:59:40.000000000 +0000
+@@ -368,6 +368,9 @@ extern void ResExtensionInit(INITARGS);
+ #ifdef DMXEXT
+ extern void DMXExtensionInit(INITARGS);
+ #endif
++#ifdef XCALIBRATE
++extern void XCalibrateExtensionInit(INITARGS);
++#endif
+ #ifdef XEVIE
+ extern void XevieExtensionInit(INITARGS);
+ #endif
+@@ -662,6 +665,9 @@ InitExtensions(argc, argv)
+ #ifdef XSP
+ if (!noXspExtension) XSPExtensionInit();
+ #endif
++#ifdef XCALIBRATE
++ XCalibrateExtensionInit ();
++#endif
+ }
+
+ void
+Index: xorg-server-1.1.99.3/configure.ac
+===================================================================
+--- xorg-server-1.1.99.3.orig/configure.ac 2006-11-03 14:49:05.000000000 +0000
++++ xorg-server-1.1.99.3/configure.ac 2007-01-29 22:58:18.000000000 +0000
+@@ -1584,7 +1590,7 @@ if test "$KDRIVE" = yes; then
+ KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
+ KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
+ KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
+- KDRIVE_LIBS="$XSERVERLIBS_LIBS $DIX_LIB $XSP_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
++ KDRIVE_LIBS="$XSERVERLIBS_LIBS $DIX_LIB $XSP_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB"
+
+ # check if we can build Xephyr
+ PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
+Index: xorg-server-1.1.99.3/include/kdrive-config.h.in
+===================================================================
+--- xorg-server-1.1.99.3.orig/include/kdrive-config.h.in 2006-11-03 14:49:06.000000000 +0000
++++ xorg-server-1.1.99.3/include/kdrive-config.h.in 2007-01-27 17:59:40.000000000 +0000
+@@ -28,4 +28,7 @@
+ /* Have the backtrace() functiln. */
+ #undef HAVE_BACKTRACE
+
++/* Enable XCalibrate extension */
++#undef XCALIBRATE
++
+ #endif /* _KDRIVE_CONFIG_H_ */
+Index: xorg-server-1.1.99.3/Xext/Makefile.am
+===================================================================
+--- xorg-server-1.1.99.3.orig/Xext/Makefile.am 2006-11-03 14:49:05.000000000 +0000
++++ xorg-server-1.1.99.3/Xext/Makefile.am 2007-01-29 22:58:33.000000000 +0000
+@@ -81,6 +81,11 @@ BUILTIN_SRCS += $(XCALIBRATE_SRCS)
+ # XCalibrare needs tslib
+ endif
+
++XCALIBRATE_SRCS = xcalibrate.c
++if XCALIBRATE
++BUILTIN_SRCS += $(XCALIBRATE_SRCS)
++endif
++
+ # X EVent Interception Extension: allows accessibility helpers & composite
+ # managers to intercept events from input devices and transform as needed
+ # before the clients see them.
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch
new file mode 100644
index 000000000..a8f002ea2
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch
@@ -0,0 +1,82 @@
+---
+ hw/kdrive/fbdev/fbdev.c | 17 ++++++++++++-----
+ hw/kdrive/fbdev/fbdev.h | 1 +
+ hw/kdrive/fbdev/fbinit.c | 20 ++++++++++++++++----
+ 3 files changed, 29 insertions(+), 9 deletions(-)
+
+--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.c
++++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.c
+@@ -33,16 +33,23 @@
+
+ extern int KdTsPhyScreen;
+
++char *fbdevDevicePath = NULL;
+ Bool
+ fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
+ {
+ int k;
+ unsigned long off;
+- if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \
+- (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) {
+- perror("Error opening /dev/fb0");
+- return FALSE;
+- }
++
++ if (fbdevDevicePath == NULL)
++ fbdevDevicePath = "/dev/fb0";
++
++ if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0)
++ {
++ ErrorF("Error opening framebuffer %s: %s\n",
++ fbdevDevicePath, strerror(errno));
++ return FALSE;
++ }
++
+ /* quiet valgrind */
+ memset (&priv->fix, '\0', sizeof (priv->fix));
+ if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) {
+--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.h
++++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.h
+@@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv {
+ } FbdevScrPriv;
+
+ extern KdCardFuncs fbdevFuncs;
++extern char* fbdevDevicePath;
+
+ Bool
+ fbdevInitialize (KdCardInfo *card, FbdevPriv *priv);
+--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbinit.c
++++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbinit.c
+@@ -59,16 +59,28 @@ InitInput (int argc, char **argv)
+ void
+ ddxUseMsg (void)
+ {
+- KdUseMsg();
++ KdUseMsg();
++ ErrorF("\nXfbdev Device Usage:\n");
++ ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n");
++ ErrorF("\n");
+ }
+
+ int
+ ddxProcessArgument (int argc, char **argv, int i)
+ {
+- return KdProcessArgument (argc, argv, i);
+-}
+-
++ if (!strcmp (argv[i], "-fb"))
++ {
++ if (i+1 < argc)
++ {
++ fbdevDevicePath = argv[i+1];
++ return 2;
++ }
++ UseMsg();
++ exit(1);
++ }
+
++ return KdProcessArgument (argc, argv, i);
++}
+
+ KdCardFuncs fbdevFuncs = {
+ fbdevCardInit, /* cardinit */
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb b/meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb
new file mode 100644
index 000000000..f64322621
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb
@@ -0,0 +1,48 @@
+LICENSE = "MIT"
+DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto xcalibrateext recordproto videoproto scrnsaverproto xpext xsp libxkbfile dbus"
+
+PROVIDES = "virtual/xserver"
+PACKAGES =+ "xserver-kdrive-xomap"
+SECTION = "x11/base"
+DESCRIPTION = "X server from freedesktop.org"
+DESCRIPTION_xserver-kdrive-xomap = "X server for the OMAP in the Nokia 800"
+
+PR = "r0"
+
+COMPATIBLE_MACHINE = "nokia800"
+
+FILES_${PN} = "${libdir}/xserver /etc/dbus-1/*"
+FILES_xserver-kdrive-xomap = "${bindir}/Xomap"
+
+RDEPENDS_xserver-kdrive-xomap = "${PN}"
+
+SRC_URI = "http://repository.maemo.org/pool/maemo3.0/free/source/xorg-server_1.1.99.3-0osso21.tar.gz \
+ file://kmode.patch;patch=1 \
+ file://disable-apm.patch;patch=1 \
+ file://no-serial-probing.patch;patch=1 \
+ file://fbdev-not-fix.patch;patch=1 \
+ file://enable-builtin-fonts.patch;patch=1 \
+ file://xcalibrate.patch;patch=1 \
+ file://fixups.patch;patch=1 \
+ file://calibrateext.patch;patch=1"
+# file://kdrive-evdev.patch;patch=1 \
+# file://kdrive-use-evdev.patch;patch=1 \
+# file://optional-xkb.patch;patch=1 \
+# file://disable-xf86-dga-xorgcfg.patch;patch=1 \
+# file://enable-tslib.patch;patch=1 \
+# file://xfbdev-fb-opt.patch;patch=1"
+
+S = "${WORKDIR}/xorg-server-1.1.99.3"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-composite --enable-kdrive --enable-builtin-fonts \
+ --disable-dga --disable-dri --disable-xinerama \
+ --disable-xf86misc --disable-xf86vidmode \
+ --disable-xorg --disable-xorgcfg \
+ --disable-dmx --enable-xcalibrate \
+ --disable-xkb --disable-xnest --disable-xvfb \
+ --disable-xevie --disable-xprint --disable-xtrap \
+ --with-default-font-path=built-ins \
+ ac_cv_file__usr_share_X11_sgml_defs_ent=no \
+ --enable-xomap"
d='n3069' href='#n3069'>3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843