Imported Upstream version 2.3.1
[debian/makedev] / MAKEDEV.man
1 .\" $Id: MAKEDEV.man,v 2.2 1995/05/21 17:55:30 alfie Exp $
2 .TH MAKEDEV 8 "14th August 1994" Linux "Linux Programmer's Manual"
3 .SH NAME
4 MAKEDEV \- create devices
5 .SH SYNOPSIS
6 .B "cd dev; ./MAKEDEV -V"
7 .br
8 .B "cd dev; ./MAKEDEV [ -n ] [ -v ] update"
9 .br
10 .BI "cd dev; ./MAKEDEV [ -n ] [ -v ] [ -d ]" " device ..."
11 .SH DESCRIPTION
12 .B MAKEDEV
13 is a script that will create the devices in \fC/dev\fP used to interface
14 with drivers in the kernel.
15 .PP
16 Note that programs giving the error ``ENOENT: No such file or
17 directory'' normally means that the device file is missing, whereas
18 ``ENODEV: No such device'' normally means the kernel does not have the
19 driver configured or loaded.
20 .SH OPTIONS
21 .TP
22 .B \-V
23 Print out version (actually RCS version information) and exit.
24 .TP
25 .B \-n
26 Do not actually update the devices, just print the actions that would be
27 performed.
28 .TP
29 .B \-d
30 Delete the devices.  The main use for this flag is by
31 .B MAKEDEV
32 itself.
33 .TP
34 .B \-v
35 Be verbose.  Print out the actions as they are performed.  This is the
36 same output as produced by
37 .BR \-n .
38 .SH CUSTOMISATION
39 Since there is currently no standardisation in what names are used for
40 system users and groups, it is possible that you may need to modify
41 .B MAKEDEV
42 to reflect your site's settings.  Near the top of the file is a mapping
43 from device type to user, group and permissions (e.g. all CD-ROM devices
44 are set from the \fC$cdrom\fP variable).  If you wish to change the
45 defaults, this is the section to edit.
46 .SH DEVICES
47 .TP
48 .B General Options
49 .TP
50 .B update
51 This only works on kernels which have \fC/proc/interrupts\fP (introduced
52 during 1.1.x).  This file is scanned to see what devices are currently
53 configured into the kernel, and this is compared with the previous
54 settings stored in the file called \fCDEVICES\fP.
55 Devices which are new since then or have a different major number are
56 created, and those which are no longer configured are deleted.
57 .TP
58 .B generic
59 Create a generic subset of devices.  This is the standard devices, plus
60 floppy drives, various hard drives, pseudo-terminals, console devices,
61 basic serial devices, busmice, and printer ports.
62 .TP
63 .B
64 std
65 Standard devices.
66 These are:
67 .B mem
68 \- acess to physical memory;
69 .B kmem
70 \- access to kernel virtual memory;
71 .B null
72 \- null device (infinite sink);
73 .B port
74 \- access to I/O ports;
75 .B zero
76 \- null byte source (infinite source);
77 .B core
78 \- symlink to /proc/kcore (for kernel debugging);
79 .B full
80 \- always returns ENOSPACE on write;
81 .B ram
82 \- ramdisk;
83 .B tty
84 \- to access the controlling tty of a process.
85 .TP 
86 .B local
87 This simply runs 
88 .BR MAKEDEV.local .
89 This is a script that can create any local devices.
90 .TP
91 .B Virtual Terminals
92 .TP
93 .I console
94 This creates the devices associated with the console.  This is the virtual
95 terminals
96 .RI tty x ,
97 where
98 .I x
99 can be from 0 though 63.  The device tty0 is the currently active vt, and
100 is also known as \fCconsole\fP.  For each vt, there are two devices
101 .RI vcs x
102 and
103 .RI vcsa x ,
104 which are used to generate screen-dumps of the vt (the
105 .BI vcs x
106 is just the text,
107 and
108 .BI vcsa x
109 includes the attributes).
110 .TP
111 .B Serial Devices
112 .TP
113 .I ttyS{0..63}
114 Serial ports and corresponding dialout device.  For device
115 .BI ttyS x ,
116 there is also the device
117 .BI cua x
118 which is used to dial out with.  This can avoid the need for cooperative
119 locks in simple situations.
120 .TP
121 .I cyclades
122 Dial-in and dial-out devices for the cyclades intelligent I/O serial card.
123 The dial in device is
124 .BI ttyC x
125 and the corresponding dial-out device is
126 .BI cub x 
127 By default devices for 7 lines are created, but this can be changed to
128 15 by removing the comment.
129 .TP
130 .B Pseudo Terminals
131 .TP
132 .I pty[p-s]
133 Each possible argument will create a bank of 16 master and slave
134 pairs.  The current kernel (1.2) is limited to 64 such pairs.
135 The master pseudo-terminals are 
136 .BR pty[p-s][0-9a-f] ,
137 and the slaves are
138 .BR tty[p-s][0-9a-f] .
139 .TP
140 .B Parallel Ports
141 .TP
142 .I lp
143 Standard parallel ports.  The devices are created 
144 .BR lp0 , 
145 .BR lp1 ,
146 and 
147 .BR lp2 .
148 These correspond to ports at 0x3bc, 0x378 and 0x278.
149 Hence, on some machines, the first printer port may actually be
150 .BR lp1 .
151 .TP
152 .I par
153 Alternative to
154 .IR lp .
155 Ports are named
156 .BI par x
157 instead of
158 .BI lp x .
159 .TP
160 .B Bus Mice
161 .TP
162 .I busmice
163 The various bus mice devices.  This creates the following devices:
164 .B logimouse
165 (Logitech bus mouse),
166 .B psmouse
167 (PS/2-style mouse),
168 .B msmouse
169 (Microsoft Inport bus mouse) and
170 .B atimouse
171 (ATI XL bus mouse) and
172 .B jmouse
173 (J-mouse).
174 .TP
175 .B Joystick Devices
176 .TP
177 .I js
178 Joystick.  Creates 
179 .B js0
180 and 
181 .BR js1 .
182 .TP
183 .B Disk Devices
184 .TP
185 .I fd[0-7]
186 Floppy disk devices.  The device
187 .BI fd x
188 is the device which autodetects the format, and the additional devices are
189 fixed format (whose size is indicated in the name).
190 The other devices are named as
191 .BI fd xLn .
192 The single letter
193 .I L
194 identifies the type of floppy disk (d = 5.25" DD, h = 5.25" HD, D = 3.5"
195 DD, H = 3.5" HD, E = 3.5" ED).  The number
196 .I n
197 represents the capacity of that format in K.  Thus the standard formats
198 are
199 .BI fd x d360 ,
200 .BI fd x h1200 ,
201 .BI fd x D720 ,
202 .BI fd x H1440 ,
203 and
204 .RI fd x E2880 .
205 .IP
206 For more information see Alain Knaff's fdutils package.
207 .IP
208 Devices
209 .BI fd0 *
210 through
211 .BI fd3 *
212 are floppy disks on the first controller, and devices
213 .BI fd4 *
214 through
215 .BI fd7 *
216 are floppy disks on the second controller.
217 .TP
218 .I hd[a-d]
219 AT hard disks.  The device
220 .BI hd x
221 provides access to the whole disk, with the partitions being
222 .BI hd x [0-20].
223 The four primary partitions are
224 .BI hd x 1
225 through
226 .BI hd x 4,
227 with the logical partitions being numbered from
228 .BI hd x 5
229 though
230 .BI hd x 20.
231 (A primary partition can be made into an extended partition, which can hold
232 4 logical partitions).
233 By default, only the devices for 4 logical partitions are made.  The
234 others can be made by uncommenting them.
235 .IP
236 Drives hda and hdb are the two on the first controller.  If using the new
237 IDE driver (rather than the old HD driver), then hdc and hdd are the two
238 drives on the secondary controller.  These devices can also be used to
239 acess IDE CDROMs if using the new IDE driver.
240 .TP
241 .I xd[a-d] 
242 XT hard disks.  Partitions are the same as IDE disks.
243 .TP
244 .I sd[a-h]
245 SCSI hard disks.  The partitions are similar to the IDE disks, but there
246 is a limit of 11 logical partitions
247 .RI (sd x 5
248 through
249 .RI sd x 15).
250 This is to allow there to be 8 SCSI disks.
251 .TP
252 .I loop
253 Loopback disk devices.  These allow you to use a regular file as a
254 block device.  This means that images of filesystems can be mounted,
255 and used as normal.  This creates 8 devices loop0 through loop7.
256 .TP
257 .B Tape Devices
258 .TP
259 .I st[0-7]
260 SCSI tapes.  This creates the rewinding tape device
261 .BI st x
262 and the non-rewinding tape device
263 .BI nst x .
264 .TP
265 .I qic
266 QIC-80 tapes.  The devices created are
267 .BR rmt8 ,
268 .BR rmt16 ,
269 .BR tape-d ,
270 and
271 .BR tape-reset .
272 .TP
273 .I ftape
274 Floppy driver tapes (QIC-117).  There are 4 methods of access depending on
275 the floppy tape drive.  For each of access methods 0, 1, 2 and 3, the
276 devices
277 .BI rft x
278 (rewinding) and
279 .BI nrft x
280 (non-rewinding) are created.  For compatability, devices
281 .B ftape
282 and
283 .B nftape
284 are symlinks to
285 .B rft0
286 and
287 .B nrft0
288 respectively.
289 .TP
290 .B CDROM Devices
291 .TP
292 .I scd[0-7]
293 SCSI CD players.
294 .TP
295 .I sonycd
296 Sony CDU-31A CD player.
297 .TP
298 .I mcd
299 Mitsumi CD player.
300 .TP
301 .I cdu535
302 Sony CDU-535 CD player.
303 .TP
304 .I lmscd
305 LMS/Philips CD player.
306 .TP
307 .I sbpcd{,1,2,3}
308 Sound Blaster CD player.  The kernel is capable of supporting 16 CDROMs,
309 each of which is accessed as
310 .BR sbpcd[0-9a-f] .
311 These are assigned in groups of 4 to each controller.
312 .B sbpcd
313 is a symlink to
314 .BR sbpcd0 .
315 .\" .TP
316 .\" .I idecd
317 .\" NEC CDR-260 (note: this will probably be obsoleted by the new IDE driver).
318 .TP
319 .B Scanner
320 .TP
321 .I logiscan
322 Logitech ScanMan32 & ScanMan 256.
323 .TP
324 .I m105scan
325 Mustek M105 Handscanner.
326 .TP
327 .I ac4096
328 A4Tek Color Handscanner.
329 .TP
330 .B Audio
331 .TP
332 .I audio
333 This creates the audio devices used by the sound driver.  These include
334 .BR mixer ,
335 .BR sequencer ,
336 .BR dsp ,
337 and
338 .BR audio .
339 .TP
340 .I pcaudio
341 Devices for the PC Speaker sound driver.  These are
342 .BR pcmixer .
343 .BR pxsp ,
344 and
345 .BR pcaudio .
346 .TP
347 .B Miscellaneous
348 .TP
349 .I sg
350 Generic SCSI devices.  The devices created are 
351 .B sg0 through 
352 .BR sg7 .
353 These
354 allow arbitary commands to be sent to any SCSI device.  This allows for
355 querying information about the device, or controlling SCSI devices that
356 are not one of disk, tape or CDROM (e.g. scanner, writeable CDROM).
357 .TP
358 .I fd
359 To allow an arbitary program to be fed input from file descriptor
360 .IR x ,
361 use
362 .BI /dev/fd/ x
363 as the file name.  This also creates 
364 BR /dev/stdin ,
365 BR /dev/stdout ,
366 and
367 BR /dev/stderr .
368 (Note, these are just symlinks into /proc/self/fd).
369 .TP
370 .I ibcs2
371 Devices (and symlinks) needed by the IBCS2 emulation.
372 .TP
373 .I apm
374 Devices for power management.
375 .TP
376 .I dcf
377 Driver for DCF-77 radio clock.
378 .TP
379 .I helloworld
380 Kernel modules demonstration device.  See the modules source.
381 .TP
382 .B "Network Devices"
383 Linux used to have devices in /dev for controlling network devices, but
384 that is no longer the case.  To see what network devices are known by the
385 kernel, look at /proc/net/dev.
386 .SH "SEE ALSO"
387 Linux Allocated Devices, maintained by H.\ Peter Anvin,
388 <Peter.Anvin@linux.org>.
389 .SH AUTHOR
390 Nick Holloway, <Nick.Hollowa