Subject: X.org 1.3.0 server on NetBSD/alpha
To: None <port-alpha@NetBSD.org>
From: Tobias Nygren <tnn@NetBSD.org>
List: port-alpha
Date: 10/05/2007 12:53:59
This is a multi-part message in MIME format.

--Multipart=_Fri__5_Oct_2007_12_53_59_+0200_fWlVWIFErGCBP4ln
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi NetBSD/alpha users,

Good news, I got the modular X.org server from pkgsrc to compile and
run with an ATI Radeon 9250 on my PC164SX board. It needed a few
patches to alpha specific code, which seems to have been subject to
bitrot. The int10 module still causes machine checks for me, but simply
removing libint10.so makes "Xorg -configure" succeed. Also make sure
wscons is enabled.

The attached patches apply after pkgsrc patches ("localpatches" style).

Have fun,
-Tobias

--Multipart=_Fri__5_Oct_2007_12_53_59_+0200_fWlVWIFErGCBP4ln
Content-Type: text/plain;
 name="patch-alpha_video.txt"
Content-Disposition: attachment;
 filename="patch-alpha_video.txt"
Content-Transfer-Encoding: 7bit

--- hw/xfree86/os-support/bsd/alpha_video.c.orig	2007-10-04 22:57:29.000000000 +0200
+++ hw/xfree86/os-support/bsd/alpha_video.c	2007-10-04 23:00:13.000000000 +0200
@@ -43,7 +43,9 @@
 #  include <machine/sysarch.h>
 #endif
 
+#ifndef __NetBSD__
 #include "xf86Axp.h"
+#endif
 
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
@@ -58,9 +60,8 @@
 #define MAP_FAILED ((caddr_t)-1)
 #endif
 
-axpDevice bsdGetAXP(void);
-
 #ifndef __NetBSD__
+axpDevice bsdGetAXP(void);
 extern unsigned long dense_base(void);
 
 static int axpSystem = -1;


--Multipart=_Fri__5_Oct_2007_12_53_59_+0200_fWlVWIFErGCBP4ln
Content-Type: text/plain;
 name="patch-bsd_axp.txt"
Content-Disposition: attachment;
 filename="patch-bsd_axp.txt"
Content-Transfer-Encoding: 7bit

--- hw/xfree86/os-support/bsd/bsd_axp.c.orig	2007-10-04 22:59:13.000000000 +0200
+++ hw/xfree86/os-support/bsd/bsd_axp.c	2007-10-04 23:04:52.000000000 +0200
@@ -7,13 +7,17 @@
 #include "os.h"
 #include "xf86.h"
 #include "xf86Priv.h"
+#ifndef __NetBSD__
 #include "xf86Axp.h"
+#endif
 #include <sys/param.h>
 #include "xf86_OSlib.h"
 #include <stdio.h>
 #include <sys/sysctl.h>
 
+#ifndef __NetBSD__
 axpDevice bsdGetAXP(void);
+#endif
 
 /*
  * BSD does a very nice job providing system information to
@@ -23,6 +27,7 @@
  * ourselves.
  */
 
+#ifndef __NetBSD__
 typedef struct {
 	char *name;
 	int type;
@@ -70,3 +75,4 @@
 			return axpList[i].type;
 	}
 }	
+#endif


--Multipart=_Fri__5_Oct_2007_12_53_59_+0200_fWlVWIFErGCBP4ln
Content-Type: text/plain;
 name="patch-configure.txt"
Content-Disposition: attachment;
 filename="patch-configure.txt"
Content-Transfer-Encoding: 7bit

--- configure.orig	2007-10-04 22:16:33.000000000 +0200
+++ configure	2007-10-04 22:16:57.000000000 +0200
@@ -24752,6 +24752,7 @@
 cat >>confdefs.h <<\_ACEOF
 #define USE_ALPHA_PIO 1
 _ACEOF
+	SYS_LIBS=-lalpha
  ;;
 	esac
 	;;


--Multipart=_Fri__5_Oct_2007_12_53_59_+0200_fWlVWIFErGCBP4ln
Content-Type: text/plain;
 name="patch-xf86sym.txt"
Content-Disposition: attachment;
 filename="patch-xf86sym.txt"
Content-Transfer-Encoding: 7bit

--- hw/xfree86/loader/xf86sym.c.orig	2007-10-05 08:26:33.000000000 +0200
+++ hw/xfree86/loader/xf86sym.c	2007-10-05 08:28:01.000000000 +0200
@@ -986,7 +986,7 @@
     SYMFUNC(_alpha_inb)
     SYMFUNC(_alpha_inw)
     SYMFUNC(_alpha_inl)
-# else
+# elsif !defined(__NetBSD__)
     SYMFUNC(outw)
     SYMFUNC(outb)
     SYMFUNC(outl)


--Multipart=_Fri__5_Oct_2007_12_53_59_+0200_fWlVWIFErGCBP4ln
Content-Type: text/plain;
 name="patch-stubs.txt"
Content-Disposition: attachment;
 filename="patch-stubs.txt"
Content-Transfer-Encoding: 7bit

--- hw/xfree86/utils/xorgcfg/stubs.c.orig	2007-10-05 12:34:50.000000000 +0200
+++ hw/xfree86/utils/xorgcfg/stubs.c	2007-10-05 12:39:27.000000000 +0200
@@ -40,6 +40,11 @@
 static char dummy;
 #endif
 
+/* Hack to avoid linker error: multiple definition of `ErrorF' */
+#if defined(__NetBSD__) && defined(__alpha__)
+#define USE_MODULES
+#endif
+
 #if !defined(USE_MODULES)
 /* these are defined in libdummy.a */
 int

--Multipart=_Fri__5_Oct_2007_12_53_59_+0200_fWlVWIFErGCBP4ln--