Subject: XFree86 2.1 binaries or source patches?
To: Eric S. Hvozda <ack@clark.net>
From: Matthieu Herrb <matthieu@laas.fr>
List: current-users
Date: 05/06/1994 09:08:27
You wrote (in your message from Thu 5)
> Ianyone out there have XFree86 2.1 up and running on a 30Apr94 tar ball
> source build? If so, did you get bianries or self build? If you did a build,
> did you need patches? If so, can I have a copy ? :-)
You can run X without rebuilding it with the following incantations:
su
sleep 60 < /dev/mem
^D
xinit
I made a patch for that it will be in XFree86 2.1.1 that is coming out
within a few days.
Here is the patch if you want to rebuild:
*** mit/server/ddx/x386/os-support/bsd/bsd_video.c~ Sat Jan 15 13:57:26 1994
--- mit/server/ddx/x386/os-support/bsd/bsd_video.c Sat Apr 30 09:05:43 1994
***************
*** 53,58 ****
--- 53,61 ----
static Bool devMemChecked = FALSE;
static Bool useDevMem = FALSE;
+ #ifdef __NetBSD__
+ static int devMemFd = -1;
+ #endif
/*
* Check if /dev/mem can be mmap'd. If it can't print a warning when
***************
*** 79,85 ****
--- 82,92 ----
/* Try to map a page at the VGA address */
base = (pointer)mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
MAP_FILE, fd, (off_t)0xA0000);
+ #ifdef __NetBSD__
+ devMemFd = fd;
+ #else
close(fd);
+ #endif
if (base == (pointer)-1)
{
if (warn)
***************
*** 112,125 ****
--- 119,138 ----
{
int memFd;
+ #ifdef __NetBSD__
+ if ((memFd = devMemFd) < 0)
+ #else
if ((memFd = open("/dev/mem", O_RDWR)) < 0)
+ #endif
{
FatalError("xf86MapVidMem: failed to open /dev/mem (%s)\n",
strerror(errno));
}
base = (pointer)mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
MAP_FILE, memFd, (off_t)Base);
+ #ifndef __NetBSD
close(memFd);
+ #endif
if (base == (pointer)-1)
{
FatalError("%s: could not mmap /dev/mem [s=%x,a=%x] (%s)\n",
Matthieu
------------------------------------------------------------------------------