From fdfc7843aa85f23a3211afeb289042ec89738ace Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 30 Apr 2014 13:20:51 +0200 Subject: more work need to be done, Xorg still broken --- package/xorg-server/Makefile | 6 ++- .../patches/patch-hw_kdrive_linux_linux_c | 13 +++++ .../patches/patch-hw_xfree86_common_compiler_h | 58 +++++++++++++++++++++- .../patch-hw_xfree86_common_xf86VGAarbiter_h | 18 +++++++ .../xorg-server/patches/patch-hw_xfree86_dri_dri_c | 18 +++++++ .../patches/patch-hw_xfree86_dri_sarea_h | 11 ++++ .../patch-hw_xfree86_os-support_linux_lnx_init_c | 13 +++++ .../patch-hw_xfree86_os-support_linux_lnx_video_c | 23 +++++++++ 8 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 package/xorg-server/patches/patch-hw_kdrive_linux_linux_c create mode 100644 package/xorg-server/patches/patch-hw_xfree86_common_xf86VGAarbiter_h create mode 100644 package/xorg-server/patches/patch-hw_xfree86_dri_dri_c create mode 100644 package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h create mode 100644 package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_init_c create mode 100644 package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c (limited to 'package') diff --git a/package/xorg-server/Makefile b/package/xorg-server/Makefile index a8217311a..486bcec2e 100644 --- a/package/xorg-server/Makefile +++ b/package/xorg-server/Makefile @@ -31,7 +31,7 @@ PKG_ARCH_DEPENDS:= !m68k PKG_FLAVOURS_XORG_SERVER:= WITH_DRI WITH_KDRIVE PKGFS_WITH_DRI:= mesalib -PKGFD_WITH_DRI:= enable DRI/DRI2 support +PKGFD_WITH_DRI:= enable DRI support PKGFB_WITH_DRI:= xf86driproto glproto MesaLib PKGFD_WITH_KDRIVE:= Build Kdrive Xfbdev server @@ -78,6 +78,8 @@ CONFIGURE_ARGS+= --enable-dga \ --disable-xcsecurity \ --disable-xvfb \ --disable-xvmc \ + --disable-selective-werror \ + --disable-strict-compilation \ --with-xkb-output=/tmp \ --with-os-vendor=OpenADK \ --with-vendor-web="http://openadk.org" @@ -109,8 +111,10 @@ xorg-server-install: ${CP} ${WRKINST}/usr/bin/* $(IDIR_XORG_SERVER)/usr/bin ${CP} ${WRKINST}/usr/lib/xorg/modules/*.so \ $(IDIR_XORG_SERVER)/usr/lib/xorg/modules +ifeq (${ADK_PACKAGE_XORG_SERVER_WITH_DRI},y) ${CP} ${WRKINST}/usr/lib/xorg/modules/extensions/*.so \ $(IDIR_XORG_SERVER)/usr/lib/xorg/modules/extensions +endif ${CP} ${WRKINST}/usr/lib/xorg/modules/multimedia/*.so \ $(IDIR_XORG_SERVER)/usr/lib/xorg/modules/multimedia ifeq (${ADK_TARGET_SYSTEM_LEMOTE_YEELONG},y) diff --git a/package/xorg-server/patches/patch-hw_kdrive_linux_linux_c b/package/xorg-server/patches/patch-hw_kdrive_linux_linux_c new file mode 100644 index 000000000..a7ad990e1 --- /dev/null +++ b/package/xorg-server/patches/patch-hw_kdrive_linux_linux_c @@ -0,0 +1,13 @@ +--- xorg-server-1.15.0.orig/hw/kdrive/linux/linux.c 2013-12-27 18:38:52.000000000 +0100 ++++ xorg-server-1.15.0/hw/kdrive/linux/linux.c 2014-03-21 12:51:06.774068258 +0100 +@@ -66,8 +66,8 @@ static void + LinuxCheckChown(const char *file) + { + struct stat st; +- __uid_t u; +- __gid_t g; ++ uid_t u; ++ gid_t g; + + if (stat(file, &st) < 0) + return; diff --git a/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h b/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h index 3a0eb0dbb..07737fafe 100644 --- a/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h +++ b/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h @@ -1,7 +1,63 @@ from alpinelinux --- xorg-server-1.15.0.orig/hw/xfree86/common/compiler.h 2013-12-15 08:48:09.000000000 +0100 -+++ xorg-server-1.15.0/hw/xfree86/common/compiler.h 2014-03-14 23:25:52.000000000 +0100 ++++ xorg-server-1.15.0/hw/xfree86/common/compiler.h 2014-03-21 12:53:48.834417415 +0100 +@@ -727,26 +727,26 @@ xf86WriteMmio32LeNB(__volatile__ void *b + #define PORT_SIZE short + #endif + +-_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ ++_X_EXPORT volatile unsigned char *ioBase; /* Memory mapped I/O port area */ + + static __inline__ void + outb(unsigned PORT_SIZE port, unsigned char val) + { +- *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) = ++ *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + ioBase) = + val; + } + + static __inline__ void + outw(unsigned PORT_SIZE port, unsigned short val) + { +- *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) = ++ *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + ioBase) = + val; + } + + static __inline__ void + outl(unsigned PORT_SIZE port, unsigned int val) + { +- *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) = ++ *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + ioBase) = + val; + } + +@@ -754,21 +754,21 @@ static __inline__ unsigned int + inb(unsigned PORT_SIZE port) + { + return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + +- IOPortBase); ++ ioBase); + } + + static __inline__ unsigned int + inw(unsigned PORT_SIZE port) + { + return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + +- IOPortBase); ++ ioBase); + } + + static __inline__ unsigned int + inl(unsigned PORT_SIZE port) + { + return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + +- IOPortBase); ++ ioBase); + } + + #if defined(__mips__) @@ -995,7 +995,7 @@ inl(unsigned short port) return xf86ReadMmio32Le((void *) ioBase, port); } diff --git a/package/xorg-server/patches/patch-hw_xfree86_common_xf86VGAarbiter_h b/package/xorg-server/patches/patch-hw_xfree86_common_xf86VGAarbiter_h new file mode 100644 index 000000000..599c558d0 --- /dev/null +++ b/package/xorg-server/patches/patch-hw_xfree86_common_xf86VGAarbiter_h @@ -0,0 +1,18 @@ +--- xorg-server-1.15.0.orig/hw/xfree86/common/xf86VGAarbiter.h 2013-12-15 08:48:09.000000000 +0100 ++++ xorg-server-1.15.0/hw/xfree86/common/xf86VGAarbiter.h 2014-03-21 17:00:39.953676328 +0100 +@@ -30,6 +30,7 @@ + #include "misc.h" + #include "xf86.h" + ++#ifdef XSERVER_LIBPCIACCESS + /* Functions */ + extern void xf86VGAarbiterInit(void); + extern void xf86VGAarbiterFini(void); +@@ -41,6 +42,7 @@ extern void xf86VGAarbiterUnlock(ScrnInf + /* allow a driver to remove itself from arbiter - really should be + * done in the kernel though */ + extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc); ++#endif + + /* DRI and arbiter are really not possible together, + * you really want to remove the card from arbitration if you can */ diff --git a/package/xorg-server/patches/patch-hw_xfree86_dri_dri_c b/package/xorg-server/patches/patch-hw_xfree86_dri_dri_c new file mode 100644 index 000000000..6f0f10aec --- /dev/null +++ b/package/xorg-server/patches/patch-hw_xfree86_dri_dri_c @@ -0,0 +1,18 @@ +--- xorg-server-1.15.0.orig/hw/xfree86/dri/dri.c 2013-12-27 18:38:52.000000000 +0100 ++++ xorg-server-1.15.0/hw/xfree86/dri/dri.c 2014-03-21 16:18:51.934149666 +0100 +@@ -37,6 +37,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN + #include + #endif + ++#include "xf86VGAarbiter.h" + #include "xf86.h" + #include + #include +@@ -68,7 +69,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN + #include "mipointer.h" + #include "xf86_OSproc.h" + #include "inputstr.h" +-#include "xf86VGAarbiter.h" + #include "xf86Extensions.h" + + static int DRIEntPrivIndex = -1; diff --git a/package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h b/package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h new file mode 100644 index 000000000..12f64f718 --- /dev/null +++ b/package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h @@ -0,0 +1,11 @@ +--- xorg-server-1.15.0.orig/hw/xfree86/dri/sarea.h 2013-12-15 08:48:09.000000000 +0100 ++++ xorg-server-1.15.0/hw/xfree86/dri/sarea.h 2014-03-21 12:54:54.486559308 +0100 +@@ -43,6 +43,8 @@ + #define SAREA_MAX 0x2000 + #elif defined(__ia64__) + #define SAREA_MAX 0x10000 /* 64kB */ ++#elif defined(__mips__) ++#define SAREA_MAX 0x4000 + #else + /* Intel 830M driver needs at least 8k SAREA */ + #define SAREA_MAX 0x2000 diff --git a/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_init_c b/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_init_c new file mode 100644 index 000000000..d170fa424 --- /dev/null +++ b/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_init_c @@ -0,0 +1,13 @@ +--- xorg-server-1.15.0.orig/hw/xfree86/os-support/linux/lnx_init.c 2013-12-27 18:38:52.000000000 +0100 ++++ xorg-server-1.15.0/hw/xfree86/os-support/linux/lnx_init.c 2014-03-21 12:56:02.898707432 +0100 +@@ -83,8 +83,8 @@ xf86OpenConsole(void) + struct vt_mode VT; + struct vt_stat vts; + MessageType from = X_PROBED; +- char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; +- char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; ++ char *tty0[] = { "/dev/tty0", NULL }; ++ char *vcs[] = { "/dev/tty%d", NULL }; + + if (serverGeneration == 1) { + diff --git a/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c b/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c new file mode 100644 index 000000000..843cc145b --- /dev/null +++ b/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c @@ -0,0 +1,23 @@ +--- xorg-server-1.15.0.orig/hw/xfree86/os-support/linux/lnx_video.c 2013-12-27 18:38:52.000000000 +0100 ++++ xorg-server-1.15.0/hw/xfree86/os-support/linux/lnx_video.c 2014-03-21 13:14:06.821293270 +0100 +@@ -473,7 +473,7 @@ unmapVidMem(int ScreenNum, pointer Base, + /* I/O Permissions section */ + /***************************************************************************/ + +-#if defined(__powerpc__) ++#if defined(__powerpc__) || defined(__mips__) + volatile unsigned char *ioBase = NULL; + + #ifndef __NR_pciconfig_iobase +@@ -484,7 +484,11 @@ static Bool + hwEnableIO(void) + { + int fd; ++#ifdef __powerpc__ + unsigned int ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0); ++#else ++ unsigned int ioBase_phys = 0x1fd00000; ++#endif + + fd = open("/dev/mem", O_RDWR); + if (ioBase == NULL) { -- cgit v1.2.3