Imported Upstream version 2.5.1
[debian/amanda] / contrib / sst / README
1 /*
2  * Copyright (c) 1996,1997, by Sun Microsystems, Inc.
3  * All Rights Reserved
4  */
5
6         ident   "@(#)README 1.11        97/09/09 SMI"
7
8 DRIVER NAME:
9         sst - Simple SCSI Target driver
10
11 ARCHITECTURES:
12         SPARC and x86
13
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
17         particular device.
18
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
23         information.
24
25         Source Files
26         -------------
27
28         sst.c           driver source
29         sst_def.h       driver definitions
30         sst.conf        driver configuration file
31         sstest.c        driver test program
32
33 NOTE:
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".
37
38 DISCLAIMER:
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.  
44
45 SYSTEM REQUIREMENTS:
46         The driver requires a SCSI target device to operate.
47
48 COMPILING/LOADING:
49         To compile and link the driver:
50
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
54         (i.e., sst/sparc)
55
56         to compile and link without using the Makefile:
57
58         % cc -D_KERNEL -c sst.c
59         % ld -r sst.o -o sst
60
61         To install:
62
63         1. Copy the module (sparc/sst) and config file (sst.conf)
64            into /usr/kernel/drv
65
66         2. (optional) Add an entry to /etc/devlink.tab, of the form:
67
68                 type=sample_driver;name=sst;minor=character        rsst\A1
69
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).
75
76         3. Run add_drv(1M).
77
78                 # add_drv sst
79
80         To compile the test program:
81
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)
85
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
89         commands)
90
91         Setting kernel variables:
92             Variables can be explicitly set from the /etc/system file, by
93             adding an entry of the form
94
95                 "set sst:<variable name>=<value>"
96
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.
99
100             Alternatively, you can use adb to set variables and debug as
101             follows:
102
103                 # adb -kw /dev/ksyms /dev/mem
104
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):
108
109                 kadb[0]: sst_debug:W 3
110            
111 REFERENCES:
112         
113         SunOS 5.6 Writing Device Drivers