This appendix explains how to add the Serial Parallel Controller device driver to your system kernel. This method of configuring your device driver is an alternative to loading your device driver as explained in Chapter 3 of this book. Before performing the following instructions, make sure you first run the installation script to install the device driver on your system. At the question Run the configuration script? [yes] type n and press the Return key. Follow the instructions explained in this appendix.
To add the Serial Parallel Controller device driver to your system kernel, complete the following steps explained in this appendix:
The system kernel is the heart of your SunOS Operating System, and is configured to meet the needs of most users. You can reconfigure the system kernel to make your device driver part of the kernel. This procedure assumes that your system has a kernel on its local disk. For information about reconfiguring other types of kernels, see System & Network Administration.
The first step in reconfiguring your system kernel is to create a new kernel configuration file to provide the system software support you require. Since it is easier to use an existing kernel configuration file than to create a new file, you can:
To locate your current kernel configuration file, type arch -k to determine the kernel architecture name.
Since the kernel architecture name is sun4c, the kernel configuration file is stored in the /usr/share/sys/sun4c/conf directory.
If you do not know which kernel configuration file was used to build your current kernel, look for the generic kernel configuration file appropriate to the kernel architecture of your system. The name of the generic kernel configuration file is GENERIC.
For example, /usr/share/sys/sun4c/conf/GENERIC is the generic kernel configuration file for a SPARC desktop system.
The old kernel configuration file can be the GENERIC kernel configuration file shipped with your system. Or, if you have renamed the kernel configuration file, use that kernel configuration file name.
For example:
The information you need to add is listed in the following example. To add a comment to the kernel configuration file, type a pound character (#) at the beginning of the line containing the comment.
The following example creates a new kernel configuration file named /usr/share/sys/sun4c/conf/MYKERNEL based on the /usr/share/sys/sun4c/conf/GENERIC generic kernel configuration file, and adds an entry for the device driver.
Your Serial Parallel Controller device driver, like all new device drivers, requires an entry in the following kernel files:
In the following example, the last number used is 103; so 104 is used as the major number for the new card. Your major number might be different.
After copying and modifying the kernel, build a new kernel from your new kernel configuration file.
To build a system kernel from the new kernel configuration file:
The system displays the message:
Doing a "make depend"
The system displays kernel build messages.
This example builds a kernel on a SPARC desktop system using a new kernel configuration file named /usr/share/sys/sun4c/conf/ MYKERNEL:
This section explains how to install your new kernel, so that your system will use it when you boot.
To install your new system kernel:
This removes old Serial Parallel Controller device driver files and device entries, if present.
This saves a copy of the current kernel file.
The system boots using the new kernel. For more information about booting your system, see Sun System & Network Manager's Guide.
This example installs and boots a kernel named /usr/share/sys/sun4c/MYKERNEL/vmunix:
This section explains how to create device files.
Replace # with the major number of your Serial Parallel Controller device driver, determined earlier in this appendix. For example, if the major number of your device driver is 104, type ./stc_config -M104 -m and press the Return key.
If your system does not boot correctly with the new kernel, you can restore your old kernel by following the instructions in this section. If you are upgrading to a new release of the Serial Parallel Controller card or no longer wish to use it, you can also follow these instructions to remove your Serial Parallel Controller device driver from your system.
To restore your old kernel, you must be superuser. As superuser, boot the old kernel in single-user mode, move the old kernel back to /vmunix, and reboot your system. The system should now function as it did before you reconfigured your kernel. The following example boots with the old kernel, moves the old kernel back to /vmunix and reboots the system:
After rebooting your system with the old kernel and logging in, remove the Serial Parallel Controller device driver files and device entries from your system.
To remove the device driver from your system:
This removes the Serial Parallel Controller device driver from your system.
For more information about reconfiguring your kernel, see the SunOS Reference Manual or the config(8) Man Page. Also see your Sun System & Network Manager's Guide.