From: veit@du9ds3.fb9dv.uni-duisburg.de (Holger Veit)
Newsgroups: comp.unix.bsd
Subject: Re: CODRV EXPERIENCES [was Re: XFree86 problems (keyboard hangs overnight)]
Date: 16 Nov 92 11:45:54 GMT
Organization: Uni-Duisburg FB9 Datenverarbeitung
Distribution: comp
Reply-To: veit@du9ds3.uni-duisburg.de
NNTP-Posting-Host: du9ds3.fb9dv.uni-duisburg.de

In <JKH.92Nov16095746@esel.lotus.com> jkh@esel.lotus.com (Jordan K Hubbard) writes:


>	I am becoming quite tired now to to say that all of this is covered by "codrv". 
>	Get the keycap-0.1.1.tar.Z stuff from ftp.uni-duisburg.de (134.91.100.14).
>	Read README*, FAQ.ddmmyy, and BUGLIST.ddmmyy there.

>Actually, in an attempt to be somewhat fair (after jumping all over
>Herr Dr. Veit for suggesting that hacking the pccons driver was a
>complete waste of time), I installed the keycap stuff over the
>weekend.  This is what I encountered:

>The instructions assume you don't have anything at major 0x0F - this
>is obviously not going to be the case for everyone, so bias the
>instructions accordingly.

This is the general problem with all kinds of drivers, not only with codrv.

>codrv, as distributed, does not seem to compile on its own.  You need
>to grab pcmmap() from pccons.c in order to get the kernel to link.  I
>haven't checked to see if it's ever called, but I doubt it is.

Sorry. This is why I recommended to "always get the latest BUGLIST-file". The
earlier version of keycap had a documentation bug concerning the modifications
to cons.c. See the excerpt of BUGLIST.111192 on this enclosed below. In the
current package this bug is corrected (You do not need to get the whole package
again). You might also have taken a look at the diffs/cons.c file which was
included for references.

>Everything seems to work as far as the console driver is concerned,
>but I was unable to get the Xfree86 1.1 driver to work at all.  I
>applied all the 1.1 patches (successfully) and recompiled the server
>to codrv support enabled, but got 'unable to map /dev/vga' upon
>running it (with the server suid root, of course).  I didn't
>have time to debug it, so I've switched back to the old pccons
>driver (with my hacks) for now.

This is exactly what happens with comap missing in the cons.c file. You don't
need to fix anything special for this in the xserver (there are however some
other effects you should lookup in the BUGLIST).

>Perhaps when the X11 support is more functional I'll go back to it.
>Has anyone gotten this to work?

My opinion on "anyone gotten this to work" does not count here, surely my
version works, but I have a number of positive responses that it works.

My apology for the "hacker's documentation", but the whole 386bsd is not yet
intended for the casual user.

Holger


--------------------------

Excerpt from BUGLIST.111192 on the "comap" effect:

------------
BUG 5:	My kernel is built with the fixes, and is a codrv kernel, but your
	X386 fails with a message "Cannot memorymap videomemory".

FIX 5:	This is a bug in documentation. The conf.includes template lacks
	the "comap" entry. It should read as following (corrected in the
	actual tar.Z file):

#include "co.h"
#if NCO > 0
int	coopen(),coclose(),coread(),coioctl(),coselect(),comap();
#define pcmmap comap
#else
#define coopen	enxio
#define coclose	enxio
#define coread	enxio
#define coioctl	enxio
#define coselect enxio
#define comap   enxio
#endif

.....

struct cdevsw	cdevsw[] =
{
	.....
	{ coopen,	coclose,	coread,		enodev,		/*F*/
	  coioctl,	nullop,		nullop,		NULL,
	  coselect,	comap,		NULL },
.....

--END-----------
-- 
|  |   / Dr. Holger Veit         | INTERNET: veit@du9ds3.fb9dv.uni-duisburg.de
|__|  /  University of Duisburg  | "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|  | /   Dept. of Electr. Eng.   |   Sorry, the above really good fortune has
|  |/    Inst. f. Dataprocessing |      been CENSORED because of obscenity"
Newsgroups: comp.unix.bsd