3 Installing Your Device Driver





After installing the Serial Parallel Controller card, install your device driver. The device driver is software that interacts with your SunOS Operating System to control up to three Serial Parallel Controller cards and the peripheral devices connected to them. This chapter explains how to:

Summary

To install your loadable device driver, complete the following steps explained in this chapter:

If you need assistance, please ask your system administrator or other technical support personnel for help.

Installing on a Diskless System

If your SPARCstation 1, 1+, or IPC does not have a hard disk, you must have read, write, and root access to the following directories on your system before installing your device driver:

If you have a 4.0.3c system, you must also have read, write, and root access to the /usr/diag/sundiag4c directory.

If any of these directories are links to other directories, you must also have read, write, and root access to them. If you do not have proper access to all the necessary directories, the installation of your device driver will be unreliable.

Running the Installation Script

The installation script, configuration script, and device driver are contained on the release media: the 3 1/2-inch (88.9 mm) diskette or the optional 1/4-inch (6.35 mm) tape. The release media contains the script which installs the device driver on a SunOS release 4.1 or 4.0.3c system for you. The script also automatically installs the Sundiag Serial Parallel Controller on your system. If you have Sundiag installed on your system, you can use the Sundiag Serial Parallel Controller to test your Serial Parallel Controller card and device driver for correct operation. For a list of files stored on your system by the installation script, see Appendix H.

Follow the installation instructions for the type of release media you have.

If you have a problem running the installation script, you can quit the installation at any time by pressing and holding the Control key, and then pressing the C key. Repeat the following instructions to try the installation again.

Installing from Diskette

To install your device driver from a diskette:

    1. Type su to become superuser and press the Return key. Then type your superuser password and press the Return key.
    2. Insert the diskette into the drive on your system.
    3. Type cd /usr/tmp and press the Return key.
    4. Type extract_unbundled and press the Return key to start the installation script.

    The installation script asks you for information. As you answer its questions, the script proceeds to install the device driver on your system.

    5. Type lo (local) for the media drive location and press the Return key.

    The location of your diskette must be local. You cannot install the device driver from diskette from a remote system.

    6. Type fd0c for the device name and press the Return key.

    The installation script responds with the following messages:

    7. Type y and press the Return key to continue.

    The installation script copies the install files from the diskette to your system in a directory it creates, and begins the installation:

    The script displays the disk space requirements for your device driver. The /usr directory is the recommended place to store your device driver files. The script informs you about how much space is available in this directory on your system. The amount of space available depends on your system.

    8. Press the Return key to accept the recommended default to store your files in the /usr directory.

    After confirming your choice, the script gives you the option of discontinuing the installation.

    If you choose Q to quit now, you must install your device driver manually at some future time by typing the extract_unbundled command as explained earlier in this chapter.

Continuing the installation now is recommended.

    9. Press the Return key to accept the recommended default to continue the installation now.

    The installation script copies the files containing the device driver and Sundiag Serial Parallel Controller from the release media to the /usr directory on your system. Among the files copied are example programs written in the C and Forth computer languages.

Installing from Tape on a Local System

To install your device driver from a tape on a local system:

    1. Type su to become superuser and press the Return key. Then type your superuser password and press the Return key.
    2. Insert the tape into the drive on your system.
    3. Type cd /usr/tmp and press the Return key.
    4. Type extract_unbundled and press the Return key to start the installation script.

    The installation script asks you for information. As you answer its questions, the script proceeds to install the device driver on your system.

    5. Type lo (local) for the media drive location and press the Return key.
    6. Type the address of your tape drive for the device name and press the Return key.

    In the following example, the address of the tape drive is st0.

    The installation script responds with the following messages:

    7. Type y and press the Return key to continue.

    The installation script copies the install files from the tape to your system in a directory it creates, and begins the installation:

    The script displays the disk space requirements for your device driver. The /usr directory is the recommended place to store your device driver files. The script informs you about how much space is available in this directory on your system. The amount of space available depends on your system.

    8. Press the Return key to accept the recommended default to store your files in the /usr directory.

    After confirming your choice, the script gives you the option of discontinuing the installation.

    If you choose Q to quit now, you must install your device driver manually at some future time by typing the extract_unbundled command as explained earlier in this chapter.

Continuing the installation now is recommended.

    9. Press the Return key to accept the recommended default to continue the installation now.

    The installation script copies the files containing the device driver and Sundiag Serial Parallel Controller from the tape to the /usr directory on your system. Among the files copied are example programs written in the C and Forth computer languages.

Installing from Tape on a Remote System

To install your device driver from a tape on a remote system:

    1. Type su to become superuser and press the Return key. Then type your superuser password and press the Return key.
    2. Insert the tape into the tape drive on your system.
    3. Type cd /usr/tmp and press the Return key.
    4. Type extract_unbundled and press the Return key to start the installation script.

    The installation script asks you for information. As you answer its questions, the script proceeds to install the device driver on your system.

    5. Type remote for the media drive location and press the Return key.
    6. Type the hostname of the remote system that contains the tape drive from which you are installing the device driver, and press the Return key.

    In this example, the remote hostname is baton.

    7. Type the address of your tape drive for the device name and press the Return key.

    In the following example, the address of the tape drive is st0.

    The installation script responds with the following messages:

    8. Type y and press the Return key to continue.

    The installation script copies the install files from the tape to your system in a directory it creates, and begins the installation:

    The script displays the disk space requirements for your device driver. The /usr directory is the recommended place to store your device driver files. The script informs you about how much space is available in this directory on your system. The amount of space available depends on your system.

    9. Press the Return key to accept the recommended default to store your files in the /usr directory.

    After confirming your choice, the script gives you the option of discontinuing the installation.

    If you choose Q to quit now, you must install your device driver manually at some future time by typing the extract_unbundled command as explained earlier in this chapter.

Continuing the installation now is recommended.

    10. Press the Return key to accept the recommended default to continue the installation now.

    The installation script copies the files containing the device driver and Sundiag Serial Parallel Controller from the tape to the /usr directory on your system. Among the files copied are example programs written in C and Forth computer languages.

Configuring the Device Driver

After installing your device driver files in the /usr directory, the installation script runs another script to configure the driver into your system. The configuration for a SunOS 4.1 system is different from a SunOS 4.0.3c system. You must tell the configuration script which system you are using:

For SunOS 4.1

If you are using a SunOS 4.1 system, press the Return key to accept the default configuration. The script confirms your choice with the following message, and restores the Sundiag test file saved before the installation began:

For SunOS 4.0.3c

If you are using a SunOS 4.0.3c system, type y to reject the default configuration. The script confirms your choice with the following message, and restores the Sundiag test files saved before the installation began:

The configuration script gives you the option of loading your device driver into your system or adding it to your system kernel. Loading the device driver is recommended because you do not have to reconfigure your system kernel. However, if you routinely load a number of device drivers into the system, you might wish to add the device driver(s) to your system kernel to decrease the time required to boot your system. You must tell the configuration script which method you prefer to use:

Loading the Driver into the System

To load the device driver into your system, press the Return key to accept the recommended default to run the configuration script. The script loads the device driver into your system for you.

Adding the Driver to the System Kernel

To add the device driver to your system kernel, you must have kernel reconfiguration experience. Type n to reject the recommended default. See Appendix B to learn how to add the device driver to your system kernel. Then see "Testing the Serial Parallel Controller" later in this chapter.

Testing the Serial Parallel Controller

If you see the following error messages, the device driver was installed before your card.

To correct the problem:

    1. Type su to become superuser and press the Return key. Then type your superuser password and press the Return key.

    If you are unfamiliar with this command, see your Sun System & Network Manager's Guide.

    2. Type halt and press the Return key.

    Your system displays halt messages followed by the Monitor prompt >.

    3. Install your Serial Parallel Controller card as explained in Chapter 2 of this book.
    4. Type cd /usr/sys/unbundled/stc and press the Return key.
    5. Type ./stc_config and press the Return key.

After installing your card and device driver, you can test them to make sure they are working correctly. If you have Sundiag installed on your system, you can use the Sundiag Serial Parallel Controller tests (installed on your system by the installation script) to run various tests. If you wish to use any of these tests, see Appendix E.

If your card is not working correctly, see Appendix F for information about troubleshooting card problems. If your device driver is not working correctly, see Appendix G for a list of error messages and probable causes.

For more technical information about your device driver, see the Serial Parallel Controller Man Page, located in /usr/man/man4/spc.4s on most systems. To view the Man Page, type man spc and press the Return key.

Removing the Device Driver

If you are upgrading to a new release of the Serial Parallel Controller device driver or no longer wish to use it, you can remove the driver from your system by following the instructions explained in this section.

If you ran the configuration script to load the device driver into your system, follow the instructions in this section. If you added the device driver to your system kernel, see "Restoring the Old Kernel" in Appendix B for instructions about removing the driver from your system. To remove the device driver from your system:
    1. Type su to become superuser and press the Return key. Then type your superuser password and press the Return key.
    2. Type cd /usr/sys/unbundled/stc and press the Return key.
    3. Type ./stc_config -c and press the Return key.

    This command removes the device driver and the devices created in the /dev directory by the installation script.

    The installation script displays messages to confirm that your device driver has been removed from your system: