linux-mips-fnet
[Top] [All Lists]

PATCH for XFree86 4.0

To: linux-mips@fnet.fr
Subject: PATCH for XFree86 4.0
From: "Gleb O. Raiko" <raiko@niisi.msk.ru>
Date: Wed, 05 Apr 2000 11:23:02 +0400
Organization: NIISI RAN
This patch allows to compile XFree86 4.0 FBDev server for mips big
endian at least. Unfortunately, the server crashes somewhere in
initialization code. Also, define

#define DoLoadableServer NO

in host.def or implement elfloader for linux mips.

To cross-compile the server use the attached host.def.

Regards,
Gleb.
diff -ruN --exclude Makefile* --exclude xmakefile xc.orig/config/cf/Imake.cf 
xc/config/cf/Imake.cf
--- xc.orig/config/cf/Imake.cf  Sun Feb 13 10:47:37 2000
+++ xc/config/cf/Imake.cf       Mon Mar 27 12:16:31 2000
@@ -583,6 +583,10 @@
 #  define Mc68020Architecture
 #  undef mc68000
 # endif /* mc68000 */
+# ifdef mips
+#  define MipsArchitecture
+#  undef mips
+# endif
 # ifdef powerpc
 #  define PpcArchitecture
 #  undef powerpc
diff -ruN --exclude Makefile* --exclude xmakefile xc.orig/config/cf/linux.cf 
xc/config/cf/linux.cf
--- xc.orig/config/cf/linux.cf  Sat Mar  4 07:35:22 2000
+++ xc/config/cf/linux.cf       Mon Mar 27 12:31:51 2000
@@ -459,6 +475,13 @@
 #define ServerOSDefines                XFree86ServerOSDefines -DDDXTIME 
-DPART_NET
 #define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
 #endif /* PpcArchitecture */
+
+#ifdef MipsArchitecture
+#define OptimizedCDebugFlags   -O2
+#define LinuxMachineDefines    -D__mips__
+#define ServerOSDefines                XFree86ServerOSDefines -DDDXTIME 
-DPART_NET
+#define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
+#endif /* MipsArchitecture */
 
 #ifdef SparcArchitecture
 #define OptimizedCDebugFlags   -O2
diff -ruN --exclude Makefile* --exclude xmakefile xc.orig/config/cf/xfree86.cf 
xc/config/cf/xfree86.cf
--- xc.orig/config/cf/xfree86.cf        Tue Mar  7 18:54:18 2000
+++ xc/config/cf/xfree86.cf     Mon Mar 27 16:54:30 2000
@@ -266,6 +266,40 @@
 
 #endif
 
+
+/* Mips drivers */
+
+#ifdef MipsArchitecture
+# ifndef XF86Server
+#  define XF86Server            YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+#  define XF1Bpp                YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+#  define XFShadowFB           YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+#  define XF86FBDevHw          YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+#  define XF86XAA               YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+#  define XF86DDC              YES
+# endif
+
+# ifndef XF86CardDrivers
+#  define XF86CardDrivers      fbdev
+# endif
+
+#endif
+
 /*
  * For Digital Alpha platforms, the default is to build all modules which
  * are supported on this platform.
diff -ruN --exclude Makefile* --exclude xmakefile 
xc.orig/programs/Xserver/hw/xfree86/common/xf86Io.c 
xc/programs/Xserver/hw/xfree86/common/xf86Io.c
--- xc.orig/programs/Xserver/hw/xfree86/common/xf86Io.c Wed Dec 29 03:58:53 1999
+++ xc/programs/Xserver/hw/xfree86/common/xf86Io.c      Thu Mar 30 13:31:56 2000
@@ -396,7 +396,7 @@
   return (Success);
 }
 
-#if !defined(AMOEBA) && !(defined (sun) && defined(i386) && defined (SVR4)) && 
!defined(MINIX) && !defined(__mips__) && !defined(QNX4)
+#if !defined(AMOEBA) && !(defined (sun) && defined(i386) && defined (SVR4)) && 
!defined(MINIX) && !defined(QNX4)
 /*
  * These are getting tossed in here until I can think of where
  * they really belong
diff -ruN --exclude Makefile* --exclude xmakefile 
xc.orig/programs/Xserver/hw/xfree86/os-support/Imakefile 
xc/programs/Xserver/hw/xfree86/os-support/Imakefile
--- xc.orig/programs/Xserver/hw/xfree86/os-support/Imakefile    Sat Feb 26 
08:43:45 2000
+++ xc/programs/Xserver/hw/xfree86/os-support/Imakefile Thu Mar 30 13:45:05 2000
@@ -13,7 +13,8 @@
 #if defined(i386Architecture) || defined(ia64Architecture) || \
        (defined(LinuxArchitecture) && defined(AlphaArchitecture)) || \
        (defined(FreeBSDArchitecture) && defined(AlphaArchitecture)) || \
-       defined(PpcArchitecture) || defined(SparcArchitecture)
+       defined(PpcArchitecture) || defined(SparcArchitecture) || \
+       (defined(LinuxArchitecture) && defined(MipsArchitecture))
 BUS_SUBDIR = bus
 #endif
 
diff -ruN --exclude Makefile* --exclude xmakefile 
xc.orig/programs/Xserver/hw/xfree86/os-support/bus/Imakefile 
xc/programs/Xserver/hw/xfree86/os-support/bus/Imakefile
--- xc.orig/programs/Xserver/hw/xfree86/os-support/bus/Imakefile        Tue Mar 
 7 19:00:42 2000
+++ xc/programs/Xserver/hw/xfree86/os-support/bus/Imakefile     Thu Mar 30 
13:48:27 2000
@@ -21,7 +21,7 @@
 PCIDRVRSRC = sparcPci.c
 PCIDRVROBJ = sparcPci.o
 
-#elif defined(LinuxArchitecture) && defined(PpcArchitecture)
+#elif defined(LinuxArchitecture) && (defined(PpcArchitecture) || 
defined(MipsArchitecture))
 
 XCOMM generic linux PCI driver (using /proc/bus/pci, requires kernel 2.2)
 
diff -ruN --exclude Makefile* --exclude xmakefile 
xc.orig/programs/Xserver/hw/xfree86/os-support/bus/Pci.h 
xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h
--- xc.orig/programs/Xserver/hw/xfree86/os-support/bus/Pci.h    Sun Feb 13 
10:53:02 2000
+++ xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h Thu Mar 30 14:06:09 2000
@@ -136,7 +136,7 @@
 /*
  * Select architecture specific PCI init function
  */
-#if defined(__powerpc__) && defined(linux)
+#if (defined(__powerpc__) || defined(__mips__)) && defined(linux)
 # define ARCH_PCI_INIT linuxPciInit
 # define INCLUDE_XF86_MAP_PCI_MEM
 #elif defined(__powerpc__)
diff -ruN --exclude Makefile* --exclude xmakefile 
xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c 
xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c
--- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c  Tue Mar 
 7 19:00:43 2000
+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c       Thu Mar 
30 12:30:55 2000
@@ -150,7 +150,7 @@
     return ret;
 }
 
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__mips__)
 
  /* XXX this isn't exactly correct but it will get the server working 
   * for now until we get something better.
diff -ruN --exclude Makefile* --exclude xmakefile 
xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c 
xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
--- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c    Sat Feb 
26 08:43:53 2000
+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c Thu Mar 30 
13:24:58 2000
@@ -385,7 +385,7 @@
        if (ExtendedEnabled)
                return;
 
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && 
!defined(__mips__)
        if (iopl(3))
                FatalError("%s: Failed to set IOPL for I/O\n",
                           "xf86EnableIOPorts");
@@ -401,7 +401,7 @@
        if (!ExtendedEnabled)
                return;
 
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && 
!defined(__mips__)
        iopl(0);
 #endif
        ExtendedEnabled = FALSE;
@@ -417,12 +417,12 @@
 Bool
 xf86DisableInterrupts()
 {
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && 
!defined(__mips__)
        if (!ExtendedEnabled)
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)
                if (iopl(3))
                        return (FALSE);
 #endif
-#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || 
defined(__sparc__)
+#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || 
defined(__sparc__) || defined(__mips__)
 #else
 #ifdef __GNUC__
 #if defined(__ia64__)
@@ -434,7 +434,7 @@
        asm("cli");
 #endif
 #endif
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)  && 
!defined(__mips__)
        if (!ExtendedEnabled)
                iopl(0);
 #endif
@@ -445,11 +445,11 @@
 xf86EnableInterrupts()
 {
        if (!ExtendedEnabled)
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)  && 
!defined(__mips__)
                if (iopl(3))
                        return;
 #endif
-#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || 
defined(__sparc__)
+#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || 
defined(__sparc__) || defined(__mips__)
 #else
 #ifdef __GNUC__
 #if defined(__ia64__)
@@ -461,7 +461,7 @@
        asm("sti");
 #endif
 #endif
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__)  && 
!defined(__mips__)
        if (!ExtendedEnabled)
 
                iopl(0);

X bitmap

<Prev in Thread] Current Thread [Next in Thread>