The contents of this archive must be copied to the directory
/etc/conf/cdu31 first.

The driver uses major number 14, modify the appropriate line in
/usr/include/sys/devices.h:

#define CDU31_MAJOR	14	/* Sony CDU31A CD-ROM drive		*/

An example devices.h is in the directory src, if devices.h isn't
already modified, copy this file to /usr/include.

Take a look at Space.c, the I/O address for the Sony controler
must be changed to the right value. Space.c comes with the I/O address
0x340, which is the default I/O address for this controler. If you
jumpered it to another address it must be changed in Space.c appropriate.
The interrupt vector and the DMA channel aren't interesting yet, the
driver uses polling, leave the values how they are.
The variable CDU31_BUFFERS controls the size of the read-ahead buffer
cache for the drive. If the value is 0 the driver uses the buffer size
reported by the "get drive configuration" command. If you are not happy
with this buffer size change this variable to a value between 1 and 32,
this are the number of 2048 byte buffers used then. The read-ahead buffer
is allocated from the kernel memory pool, the driver panics when it can't
allocate memory.

Copy the file cdrom.h in the directory src to /usr/include/sys. This
header file includes ioctl functions and structures for the audio
support. The definitions are common for all supported CD-ROM drives,
this header file will become part of a future COHERENT distribution.

Add the following line into the section "old-style Coherent drivers"
into the file /etc/conf/mdevice:

cdu31	-	CGHo	cdu31	14	14	0	255	-1	-1

Add the following line into the section "old-style Coherent drivers"
into the file /etc/conf/sdevice:

cdu31	Y	0	0	0	0	0x0	0x0	0x0	0x0

Now build a new kernel including this driver:
cd /etc/conf
bin/idmkcoh -o /coh.test

To create the special files in /dev needed for the drive run the
mkdev shell script. The script also creates a link to /dev/cdrom
if this file doesn't exist already. This is the default device used
by xcdplayer and cdview, it can be linked to other CD-ROM drivers
when more then one drive is installed in the machine.

Now reboot the machine with the new kernel coh.test. The driver prints
the release message to the console and some informations about the
used Sony CD-ROM if one was found. If the driver doesn't find a CD-ROM
drive it print the message "No Sony CD-ROM drive found" instead. This
means that eighter the I/O address in Space.c is wrong or the driver
isn't compatible to the used CD-ROM drive. So far I've tested it with
a Sony CDU31A revision 1.3d.
