[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X11 server on alpha -- update



On Fri, Oct 16, 2009 at 01:38:11AM -0500, Bob Tracy wrote:
> On Thu, Oct 15, 2009 at 10:38:33PM +1300, Michael Cree wrote:
> > Unfortunately Alpha disappears from Debian testing just before we get
> > a working Xserver...
> 
> That has been the most frustrating aspect of this whole journey.
> Xserver has been broken in "testing" for over a month and a half.

Yeah.

The attached patch can be applied to the xserver 1.6 branch to fix it 
for Alpha.  

Download the sources for Debian xserver:

apt-get source xorg-xserver

Either apply the patch manually yourself before starting the build, or place the patch in the debian/patches directory of the extracted source and add the patch filename (slowbcopy-1-6-4-alpha-patch.txt) into the file debian/patches/series then it will be applied by the Debian build process.

Build the package in the usual way. I change directory into the extracted source directory and do:

./debian/rules build
fakeroot ./debian/rules binary

which creates a number of debian packages. You need to install the created xserver-xorg-core package with dpkg. It won't be signed properly so if you then do an upgrade with aptitude or apt it will reinstall the Debian version over the top of your manually compiled one.  I am guessing that doesn't matter since Debian testing is waving goodbye to Alpha.  Nevertheless, maybe some Debian developer can suggest a better method?

I have verified that this works on a Compaq XP1000 Alpha system.

> I assure you, it's not my love of following rabbits down holes that's
> motivating me to (a) figure out how Debian package names map to upstream
> source tarball names; (b) unravel conflicting binary package contents;
> (c) resolve build dependencies by building *those* packages from source;
> etc., etc., ad nauseum.  I don't dare build and install any of the Xorg
> code outside of the Debian framework: too many components end up in
> unexpected places because a simple "--prefix=/usr" ought to be sufficient
> but isn't.  I'm *reasonably* certain the light at the end of the tunnel
> isn't an oncoming train :-/.

Yeah, it can be very frustrating.  I have just tried to install Gentoo on a partition and it took two days to get to the point of having a barely functioning very minimal install.  Part of the reason was the poorly provided config for the kernel build that missed one absolutely essential but completely unobvious system Alpha config option leaving me with a system without keyboard, without the serial port and without any means to connect by network. It was very frustrating trying new kernel options (completely in the dark since I had already tried the obvious options) and booting off the install disc, entering a whole series of commands to get into a chroot on the installed system, install the new kernel, reboot, find it still doesn't work, have to hit the reset button, reboot with the install disc, ad infinitum.  It made me realise how wonderful Debian is that all the detail has already been worked out so that installs go smoothly.

Cheerz
Michael.

diff --git a/hw/xfree86/os-support/misc/SlowBcopy.c b/hw/xfree86/os-support/misc/SlowBcopy.c
index be69b9d..7753afa 100644
--- a/hw/xfree86/os-support/misc/SlowBcopy.c
+++ b/hw/xfree86/os-support/misc/SlowBcopy.c
@@ -59,6 +59,7 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
 
 #ifdef linux
 
+extern unsigned long _bus_base_sparse(void);
 #define SPARSE (7)
 
 #else
@@ -70,32 +71,38 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
 _X_EXPORT void
 xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count)
 {
-    unsigned long addr;
-    long result;
-
-    addr = (unsigned long) src;
-    while( count ){
-	result = *(volatile int *) addr;
-	result >>= ((addr>>SPARSE) & 3) * 8;
-	*dst++ = (unsigned char) (0xffUL & result);
-	addr += 1<<SPARSE;
-	count--;
-	outb(0x80, 0x00);
-    }
+    if (_bus_base_sparse()) {
+	unsigned long addr;
+	long result;
+    
+	addr = (unsigned long) src;
+	while( count ){
+	    result = *(volatile int *) addr;
+	    result >>= ((addr>>SPARSE) & 3) * 8;
+	    *dst++ = (unsigned char) (0xffUL & result);
+	    addr += 1<<SPARSE;
+	    count--;
+	    outb(0x80, 0x00);
+	}
+    }else
+	xf86SlowBcopy(src, dst, count);
 }
   
 _X_EXPORT void
 xf86SlowBCopyToBus(unsigned char *src, unsigned char *dst, int count)
 {
-    unsigned long addr;
+    if (_bus_base_sparse()) {
+	unsigned long addr;
 
-    addr = (unsigned long) dst;
-    while(count) {
-	*(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101;
-	src++;
-	addr += 1<<SPARSE;
-	count--;
-	outb(0x80, 0x00);
-    }
+	addr = (unsigned long) dst;
+	while(count) {
+	    *(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101;
+	    src++;
+	    addr += 1<<SPARSE;
+	    count--;
+	    outb(0x80, 0x00);
+	}
+    }else
+	xf86SlowBcopy(src, dst, count);
 }
 #endif

Reply to: