XENIX System V Release 2.0 for PC/AT Problems in Device Driver Installation

Ken Stanley kens at weitek.UUCP
Wed Feb 26 12:59:40 AEST 1986


I am trying to add a device driver to XENIX System V on an IBM PC/AT.
I have run into several problems.  

Problem 1)  The most serious problem is that 
when I load in any code, even irrelevant code which would never be 
referenced by any other routine, PS stops working.  The following is the 
file which I am loading.

##### start of file avdriver.c

#include <sys/param.h>
#include <sys/buf.h>
#include <sys/iobuf.h>

struct iobuf aqwtab;
struct buf aqwbuf;



aqwinit()
{
printf("aqwinit started\n");
}
[

aqwintr()
{
}

##### end of file avdriver.c

The compile options which I used are:
cc -K -M2em -DM_KERNEL -UM_I86 -O -c avdriver.c
This is the command which you get if you type:  make avdriver.o while
you are in /usr/sys/conf.
(The -UM_I86 does not affect the .o file, the others options do, I
do not know if any of the options have any affect on the symptoms
which I observe.)

The load file which I use is: /usr/sys/conf/link_xenix, which is shown
below.  Simply typing cd /usr/sys/conf;make gives the same result, if
you add avdriver.o to the ld command in /usr/sys/conf/makefile.

##### start of file link_xenix

[ -f xenix ] && mv xenix xenix-
ld -Mm -D 18 -B 20 -A 0 -o xenix KMseg.o oemsup.o c.o space.o picmask.o termsw.o avdriver.o ./mdep/lib_mdep ../sys/lib_sys ../io/lib_io ../io/lib_io.stubs Klibc.a 
echo "RESULT IS IN FILE xenix"

##### end of link_xenix

After /etc/haltsys one eventually gets to:

boot
:/usr/sys/conf/xenix		{This is the new xenix}

Then after some initialization, we are in the new XENIX.
Now, ps gives the following message.

# ps
   PID TTY TIME COMMAND
ps: seek error
#

This error comes up fairly reliably as long as avdriver.o adds at least
130 bytes to the xenix kernel.  I tried moving avdriver.o to the end of the 
load list, after all the files which have "lib" in their names.  This
did not improve the situation.  PS still fails.

Problem 2)  make space.o fails.  The cc compiler complains that it is out
of heap space.  This is true even if no changes have been made to space.c.

Problem 3)  The ld command described above does not appear to recognize 
../io/lib_io.stubs as a library routine and complains if one of the
routines stubbed out in ../io/lib_io.stubs is loaded before ../io/lib_io.stubs.
This completely defeats the purpose of the stubs in the first place.  See
/usr/sys/conf/README.

Problem 4)  The ld command is not completely documented.  The -l switch
is mentioned in the documentation, see the last paragraph of page 4-1, but
it is not documented anywhere.  That's not too bad because it is documented
in other versions of UNIX.  The -D and -B switches are likewise not 
documented in the XENIX documentation.  I have never run into these
switches before and I have no idea what they mean.



More information about the Comp.unix mailing list