DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Testing and debugging SVR5 NFB drivers

Static Server

Because the dynamically linked version of the X server is very difficult to debug, the X Link kit allows you to create a statically linked X server for testing purposes. Once you have written and compiled your libXDriver.o file, you must create a static X server to debug your driver. To do so, complete the following steps:

  1. Make a new server by issuing the following commands:


    NOTE: For the purposes of this procedure, we assume that you are using /usr/xlink as the root of the X Link Kit filesystem. You may use any name you wish for this directory, but you must remember to substitute the name you choose for /usr/xlink when completing these steps.

    cd /usr/xlink/src/X11/server
    make

  2. There is a short cut make rule that will relink a static X server containing only your X driver. To use the short cut, issue the following commands:

    cd /usr/xlink/src/X11/server
    make loadXsco

    This creates an Xsco binary in that directory.

  3. To run this binary, your grafinfo file must be installed in the proper directory. Again, there is a special make rule to do this in your ports directory. Issue the following commands:

    cd /usr/xlink/src/X11/server/ddx/ports/xxx
    make install

    where xxx is your graphics driver name.

    make install copies your xxx.xgi file to /usr/lib/grafinfo/xxx and the libXDriver.o file to /usr/lib/X11/dyddx/xxx/driver.o.

  4. To change the name of your grafinfo file, edit your local Imakefile and find the following lines:
       /**/#
       /**/#   You may want to change the target and destination directories
       /**/#	"./grafinfo/xxx" and "xxx" in the install rule below to the
       /**/#   manufacturer's name of your video adapter.  Then update the
       /**/#   VENDOR string in your xxx.xgi file to match this directory
       /**/#	name.
       /**/#
       

    /**/#

    InstallGrafFile(./grafinfo/xxx,xxx.xgi,xxx)

    Modify InstallGrafFile statement with the new grafinfo file name.


    WARNING: If you modify this line, be sure the directory name matches the VENDOR name in the grafinfo file and the file name matches the MODEL name. Example:
     VENDOR IBM "IBM"
      MODEL  IBM864 "S3 864"
       CLASS  S3V ""
        MODE   1280x1024-256-75 "1280x1024 256 Colors, 75Hz, 2MB"
    
    This grafinfo file name is /usr/lib/grafinfo/ibm/ibm864.xgi.

    Although make install installs your libXDriver.o file, this file is not used by the static server. It is only used by the dynamic server.

  5. Now you are ready to run the static server. The X server will change the console into graphics mode, so you should either log into the system from a serial terminal, or use another SCO system or X terminal so you can have multiple connections to the machine.


    NOTE: The X server must be run as ``root'' to access the video hardware. This option must be used with debuggers as well.

    To run the X server from a telnet or rlogin session over the network or from a serial terminal cd to the /usr/xlink/src/Xserver directory and issue the appropriate command:

    Platform Command
    SCO OpenServer 5 ./Xsco -crt /dev/tty01
    SVR5 ./Xsco -crt /dev/vt01


© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005