Problem writing device driver for SCO Unix V/386 3.2.0.

Tom Ivar Helbekkmo tih at
Wed Jun 13 08:20:02 AEST 1990

I'm using SCO Unix V/386 3.2.0 here, and would like to be able to use
a serial card that I've got, with 4 ports on it.  However, the card is
not "intelligent":  I can assign each of the ports individually to IRQ
2, 3, 4 or 5, and each has its own I/O base address.  Actually, I can
even add another card of the same type, as each port can be configured
as COM1 through COM8.  Since I can only use IRQs 3 and 4 for serial
I/O, I have to let 2 ports share each of these (4 ports if I add
another board of the same type).

Anyway, with SCO's serial driver ("sio"), this won't work.  (Unless
I'm mistaken, in which case I'd like to hear about it!)  Each serial
port that's not on an intelligent card has to have its own IRQ.
Because of this, I've been trying to write my own replacement for the
supplied sio driver.  I've based it on the example code in the Device
Driver Writer's Guide, and followed the guidelines there.  I call the
compiler as:

/bin/cc -c -O -K -Zp4 -M3 -DINKERNEL sio.c

Using /etc/conf/cf.d/link_unix (after replacing the files in
/etc/conf/pack.d/sio with my own code) actually produces a new unix,
giving no warnings or error messages in the process.  I've kept the
configuration info from the original sio, as my driver currently only
supports COM1 and COM2 on IRQs 4 and 3, respectively.

Now for the problem:  When I try to boot this new unix, it says
"Header read error: 0" immediately after I specify the unix file name.
This seems strange to me -- I'd expect my new kernel to crash when
accessing the serial ports, sure, but at least I thought I should be
able to boot it!  :-)

If anyone can give me any hints and tips, I'd be very grateful!

Tom Ivar Helbekkmo, NHH, Bergen, Norway.  Telephone: +47-5-959205
tih at, thelbekk at norunit.bitnet, edb_tom at

More information about the Comp.unix.i386 mailing list