2 * Copyright (c) 1996,1997, by Sun Microsystems, Inc.
6 ident "@(#)README 1.11 97/09/09 SMI"
9 sst - Simple SCSI Target driver
14 DESCRIPTION OF DRIVER:
15 This driver is intended as an example of programming a SCSA
16 target driver for Solaris 2.X; it is not intended for any
19 This driver has been modified to be 64-bit ready. In
20 particular it provides an example of how an LP64 driver
21 can manage an ioctl from an ILP32 application. Refer to
22 SunOS 5.6 Writing Device Drivers, Appendix F for more
29 sst_def.h driver definitions
30 sst.conf driver configuration file
31 sstest.c driver test program
34 Areas where you may need to change this code or add your own to
35 deal with your specific devices are marked "Note".
36 Other warnings are marked "WARNING".
39 This driver provides an example of programming using the SCSA
40 DDI/DDK interfaces for Solaris target drivers; it is not intended
41 for any particular device, although it has been tested on disk
42 and tape drives. It is meant to be a skeleton that can be
43 used as a basis for a real-world driver.
46 The driver requires a SCSI target device to operate.
49 To compile and link the driver:
51 use the Makefile provided in the driver subdirectory (sst); the
52 executable files will be built in an architecture-specific
53 subdirectory depending on the architecture of the build machine
56 to compile and link without using the Makefile:
58 % cc -D_KERNEL -c sst.c
63 1. Copy the module (sparc/sst) and config file (sst.conf)
66 2. (optional) Add an entry to /etc/devlink.tab, of the form:
68 type=sample_driver;name=sst;minor=character rsst\A1
70 This will cause devlinks(1M) to create link(s) to /devices with
71 names of the form "/dev/rsstX" where X is the SCSI target number
72 (the target number is "5" in the sst.conf file included in the
73 DDK; you can change it to refer to an appropriate target number
74 for the target device on your system).
80 To compile the test program:
82 run "make sstest" in the sst directory; the executable file will be
83 built in an architecture-specific subdirectory depending on the
84 architecture of the build machine (sst/sparc or sst/i386)
86 The test program takes as arguments the full path to the device
87 file (e.g., /dev/sst0 or /devices/mc/mcis@3540,0/sst@3,0:character)
88 and a command (see the sstest program's usage message for available
91 Setting kernel variables:
92 Variables can be explicitly set from the /etc/system file, by
93 adding an entry of the form
95 "set sst:<variable name>=<value>"
97 The /etc/system file is read only once at boot time, if you change
98 it you must reboot for the change to take effect.
100 Alternatively, you can use adb to set variables and debug as
103 # adb -kw /dev/ksyms /dev/mem
105 Or, if you booted under kadb, you can set the a variable from the
106 kadb prompt. For example, the following command will set the
107 variable sst_debug to the value 3 (maximum debugging messages):
109 kadb[0]: sst_debug:W 3
113 SunOS 5.6 Writing Device Drivers