Subject: Linux-Activists - DOC Channel digest. 93-3-26-16:26
From: "Linux Activists" <[email-masked]>
To: "Linux-Activists" <[email-masked]>
Date: Mon, 26 Apr 1993 23:56:23 +0300

Topics:
	 The Linux Device List
	 Linux Programmers' Guide

----------------------------------------------------------------------

From: Rick Miller <[email-masked]>
Subject: The Linux Device List
Date: Mon, 26 Apr 1993 16:10:25 +0300

Well folks,

I've *finally* gotten around to updating the Linux Device List again.
Sorry it took so long, but... well, you know how it is.  If I get time,
I'll put out that MAKEDEV I've been promising.

Changes from the previous edition include:

1.) TTY NAMING CHANGES!     Final standard: {tty|cua}<card><port>
        I've caved in under the weight of reason, and am now listing
        the serial lines by *card* and *port* (rather than just by
        number from 0 to 63).  Please, now that there's a reasonable
        standard, let's try to phase out the old "ttys0" and "ttyS0"
        names and start using "tty00"/"cua00" instead.

2.) Some NEW stuff!
        Mitsumi CD-ROM, and a high-speed link interface for all you
        transputer and video-sampling fans.

3.) Corrections &c.

Before I show you the list though, I have a short wish-list:

        1.) I'd *especially* like the AUTHORS of drivers to
            LOOK OVER MY DESCRIPTION OF YOUR DRIVERS.  Fill me
            in where I've got ???'s (or where I'm wrong).

        2.) I'd like the TAPE drivers (both QIC and SCSI) to
            use a more standard naming convention, like under
            SunOS where you have /dev/[n]rmt* and /dev/[n]rst*.
            When you access the tape using the name with the 'n'
            in it, it doesn't automatically rewind.

And now... (drum roll, please...)
-------------------------------------------------------------------------

               T H E   L I N U X   D E V I C E   L I S T

   maintained by [email-masked] (Rick Miller, Linux Device Registrar)

                     Last revised:  April 26, 1993

This is a list of the device names, along with Major and minor numbers,
which the Linux kernel may currently recognize.  I say "may" because some
of them may require patches to your kernel, others must be configured-in
using the Linux kernel's "make config" routine before compiling.

My profuse thanks to all the writers of device drivers for Linux, and to
all those patient folks who took the time to explain their devices to me.
May they become obscenely rich.  Until then, I hope this list will help
prevent driver collisions and perhaps lend a clue to a newbie or two.

        IF YOU WANT ANY CHANGES OR ADDITIONS TO THIS LIST, *TELL ME*!

        DEVICES NOT LISTED HERE SHOULD USE MAJOR NUMBERS *ABOVE 127*
        UNTIL ALLOCATED A MORE PERMANENT NUMBER IN THE LOWER RANGE.
        (I suggest using a more-or-less random number to avoid the
         chance of collisions with any other experimental drivers.)

        TO HAVE MAJOR/MINOR NUMBERS ALLOCATED (OFFICIALLY) FOR
        YOUR DEVICE DRIVER, SEND E-MAIL TO:  [email-masked]

Majors:
  0.  Unnamed .......  (unknown) ....  for proc-fs, NFS clients, etc. (???)
  1.  Memory ........  (character) ..  mem ramdisk kmem null port zero core
  2.  Floppy ........  (block) ......  fd[0-3]<[dhDH]{360,720,1200,1440}>
  3.  AT-Disk .......  (block) ......  hd[a-b]<[0-8]>
  4.  Tty ...........  (character) ..  tty's and pty's
  5.  Dial-out ......  (character) ..  tty cua*
  6.  Parallel ......  (character) ..  par[0-2] lp[0-2]
  8.  SCSI-Disk .....  (block) ......  sd[a-h]<[0-8]>
  9.  SCSI-Tape .....  (character) ..  <n>st[0-1] or <n>rmt[0-1]
 10.  Mouse .........  (character) ..  logibm psaux inportbm atibm (mouse)
 11.  CD-ROM ........  (block) ......  scd[0-1]
 12.  QIC-tape? .....  (character) ..  rmt{8,16} tape<{-d,-reset}>
 13.  XT-disk .......  (block) ......  xd[a-b]<[0-8]>
 14.  Audio .........  (character) ..  audio dsp midi mixer sequencer
 15.  Joystick ......  (character) ..  js[0-1]
 16.  Socket ........  (character) ..  net arp
 17.  AF_UNIX .......  (character) ..  unix
 18.  AF_INET .......  (character) ..  inet ip icmp tcp udp
 19.  WE-driver .....  (character) ..  we[0-3]
 20.  DP8390-driver .  (character) ..  wd[0-3] ec[0-3] ne[0-3]
 21.  Sony-CD-ROM ...  (block) ......  sonycd
 22.  2nd AT-Cntrlr .  (block) ......  hd1[a-b]<[0-8]>
 23.  Mitsumi CD-ROM   (block) ......  mcd
 31.  Link Interface   (character?) .  ???

Breakdown of minors by Majors:
------------------------------
  0.  Unnamed .......  (unknown) ....  for proc-fs, NFS clients, etc.
        Minors?

  1.  Memory ........  (character) ..  ram mem kmem null port zero core
        (0.  /dev/ram:  was supposed to be the ramdisk, but never got used.
         As of this date it has not been implemented and probably won't be.)
        1.  /dev/mem
        1.  /dev/ramdisk: a BLOCK device (the RAM-disk)
        2.  /dev/kmem
        3.  /dev/null
        4.  /dev/port
        5.  /dev/zero
        6.  /dev/core:  like /dev/mem, but in "core"-file format for gdb

  2.  Floppy ........  (block) ......  fd[0-3]<[dhDH]{360,720,1200,1440}>
        Minors are [[4 * type] + drive] where drive 0-3 == A:-D: (floppy)
        and type is:    0: Autodetect           4: 720k on 3.5" DD
                        1: 360k on 5.25" DD     5: 360k on 5.25" HD
                        2: 1.2M on 5.25" HD     6. 720k on 5.25" HD
                        3: 360k on 3.5" DD      7. 1.44M on 3.5" HD

        0. /dev/fd0:  Autodetected first floppy.
        1. /dev/fd1:  Autodetected second floppy.
        2. /dev/fd2:  Autodetected third floppy.
        3. /dev/fd3:  Autodetected fourth floppy.
        4. /dev/fd0d360:  360k on 5.25" DD in first drive
        5. /dev/fd1d360:  360k on 5.25" DD in second drive
                (You can work out the rest of the intermediates...)
        8. /dev/fd0h1200:  1.2M on 5.25" HD in first drive
        12. /dev/fd0D360 (/dev/fd0H360):  360k on 3.5" DD in first drive
        16. /dev/fd0D720 (/dev/fd0H720):  720k on 3.5" DD in first drive
        20. /dev/fd0h360:  360k on 5.25" HD in first drive
        24. /dev/fd0h720:  720k on 5.25" HD in first drive
        28. /dev/fd0H1440:  1.44M on 3.5" HD in first drive

     Naming goes like this:
        fd[drive][media][size]
         where: [drive]=0-3:  Corresponds to DOS's "A:"-"D:".
                [media]={d,h,D,H}:  d=Double Density 5.25" diskette
                                    h=High Density 5.25" diskette
                                    D=Double Density 3.5" diskette
                                    H=High Density 3.5" diskette
                [size]={360,720,1200,1440} kilobytes.

     Floppies are assumed to be double-sided (DS), and
        drives are assumed to be high-density devices.

  3.  AT-Disk .......  (block) ......  hd[a-d]<[0-8]>
     (For IDE, MFM, and RLE drives and controllers.)
      On the first AT controller card:
        0.  /dev/hda (/dev/hda0):  The whole first HD, including its MBR.
        1-4.  /dev/hda{1-4}:  Primary partitions on the first hard drive.
        5-8.  /dev/hda{5-8}:  Extended partitions on the first hard drive.
        64.  /dev/hdb (/dev/hdb0):  The whole second HD, including its MBR.
        65-68.  /dev/hdb{1-4}:  Primary partitions on the second hard drive.
        69-72.  /dev/hdb{5-8}:  Extended partitions on the second hard drive.
      On the second AT controller card:
        128.  /dev/hdc (/dev/hdc0):  The whole third HD, including its MBR.
        129-132.  /dev/hdc{1-4}:  Primary partitions on the third hard drive.
        133-136.  /dev/hdc{5-8}:  Extended partitions on the third hard drive.
        192.  /dev/hdd (/dev/hdd0):  The whole fourth HD, including its MBR.
        193-196.  /dev/hdd{1-4}:  Primary partitions on the fourth hard drive.
        197-200.  /dev/hdd{5-8}:  Extended partitions on the fourth hard drive.

        Notes:  BE *VERY* CAREFUL WITH the four "whole drive" devices (hda,
                hdb, hdc, and hdd)!!  These four devices embody the *entire*
                *drive*, not just one partition.  The only things that use
                them are things that need to read/change the partition table
                (like fdisk).

                Linux doesn't order anything.  It perceives partitions in the
                order in which they appear in the partition table.  Thus,
                /dev/hd?1 may follow /dev/hd?2 in the cylinder numbering.

                The names of the hard drives are not the same as under Minix.

  4.  Tty ...........  (character) ..  tty's and pty's
        0.  /dev/tty0:  This is the currently active Virtual Console.
        1-9.  /dev/tty[1-9]:  Specific virtual consoles.
        10-63.  /dev/ttyV[10-63]:  More virtual consoles that nobody uses.
        64-127.  /dev/tty[0-?][0-63]:  Dial-in serial ([controller][port]).
        128-191.  /dev/pty[p-s][0-f]:  PTY Masters.
        192-255.  /dev/tty[p-s][0-f]:  PTY Slaves. ([0-f]=0123456789abcdef)

        Notes:  NOTICE THE NEW NAMING FOR SERIAL LINES.  Serial lines will
                be named either "tty..." or "cua..." (See Major #5) followed
                by the one-digit number of the *board* the line is from, and
                the number of the line on that board.  The four default lines
                are considered to be on board "0", so what DOS calls "COM2:"
                should now be known as "/dev/tty01" or "/dev/cua01".

                For more information on the use of multi-port boards, read
                the documentation which accompanies the serial patches.

  5.  Dial-out ......  (character) ..  tty cua*
        0.  /dev/tty:  the tty that owns the process calling it.
        64-127.  /dev/cua[0-?][0-63]:  Dial-out serial ([controller][port]).
                (See Major #4 for NEW NAMING CONVENTION.)

  6.  Parallel ......  (character) ..  par[0-2] lp[0-2]
     Parallel (printer) ports.  (Increasable in include/linux/lp.h)
        0.  /dev/par0 (/dev/lp0):  First XT parallel port
        1.  /dev/par1 (/dev/lp1):  First AT parallel port
        2.  /dev/par2 (/dev/lp2):  Second AT parallel port

        Notes:  The number of line printers is defined by LP_NO which is
                found in [/usr/src]/linux/include/lp.h.

  7.  Unused.  (First come, first serve.)
        This one's getting old.  No minor numbers are yet assigned.
        It's not even in the source code.  Maybe it never will be...

  8.  SCSI-Disk .....  (block) ......  sd[a-h]<[0-8]>
        Minors numbers are ((16 * Drive) + Partition)
        where
          Drive is the number of the physical drive in order of detection
        and
          Partition is as follows:
                0   is the whole drive
                1-4 are the DOS "primary" partitions
                5-15 are the DOS "extended" (or "logical") partitions, so...

        0.  /dev/sda (/dev/sda0):  The first (detected) SCSI drive.
        1-4.  /dev/sda[1-4]:  Primary partitions on the first SCSI drive.
        5-15.  /dev/sda[5-15]:  Extended partitions on the first SCSI drive.
        16.  /dev/sdb (/dev/sdb0):  The second (detected) SCSI drive.
        17-20.  /dev/sdb[1-4]:  Primary partitions on the second drive.
        21-31.  /dev/sdb[5-15]:  Extended partitions on the second drive.
        32.  /dev/sdc (/dev/sdc0):  The third (detected) SCSI drive.
        ...and so on.

  9.  SCSI-Tape .....  (character) ..  <n>st[0-1] or <n>rmt[0-1]
        0.  /dev/st0:  First (detected) SCSI tape drive, rewind-on-close.
        1.  /dev/st1:  Second (detected) SCSI tape drive, rewind-on-close.
        128.  /dev/nst0:  First (detected) SCSI tape, *no* rewind-on-close.
        129.  /dev/nst1:  Second (detected) SCSI tape, *no* rewind-on-close.

 10.  Mouse .........  (character) ..  logibm psaux inportbm atibm (mouse)
     (MGR may require that /dev/mouse be linked to one of these...)
                NOTE THE CHANGES TO DIFFERENTIATE MOUSE TYPES!
                (Please implement these in the distributions.)
        0.  /dev/logibm:  Logitec-'compatible' bus mouse
        1.  /dev/psaux:  PS/2 mouse port (may not work on some lap-tops, yet)
        2.  /dev/inportbm:  MicroSoft "InPort" bus mouse
        3.  /dev/atibm:  ATI XL bus mouse

 11.  CD-ROM ........  (block) ......  scd[0-1]
        0.  /dev/scd0:  The first (detected) SCSI CD-ROM.
        1.  /dev/scd1:  The second (detected) SCSI CD-ROM.
        ("There's not much more to it than that" says Eric Youngdale.)

 12.  QIC-tape? .....  (character) ..  rmt{8,16} tape<{-d,-reset}>
     (I really don't have much info on this one... )
        6.  /dev/rmt8:  QIC-120
        8.  /dev/rmt16 (/dev/tape):  QIC-150
        136.  /dev/tape-d:  (It has something to do with being 128+8... ?)
        255.  /dev/tape-reset:  For resetting only.

 13.  XT-disk .......  (block) ......  xd[a-b]<[0-8]>
     XT (8-bit) hard disk controller devices.
        Minor numbers are assigned in the same manner as for the
        normal (AT-type) Hard Drive devices ("/dev/hd*").

 14.  Audio .........  (character) ..  audio dsp midi mixer sequencer
        0.  /dev/mixer:  Mixer and Control Device
        1.  /dev/sequencer:  FM-synthesizer and Midi
        2.  /dev/midi:  (for future use)
        3.  /dev/dsp:  Digitized voice (DAC/ADC)
        4.  /dev/audio:  (Reserved for compatibility with Sun)

 15.  Joystick ......  (character) ..  js[0-1]
        0.  /dev/js0:  (Left/Right?) joystick.
        1.  /dev/js1:  (Right/Left?) joystick.

 16.  Socket ........  (character) ..  net arp
        0.  /dev/net:  Generic layer (sockets)
        1.  /dev/arp:  Address Resolution Protocol (ARP)

 17.  AF_UNIX .......  (character) ..  unix
        0.  /dev/unix:  AF_UNIX protocol layer

 18.  AF_INET .......  (character) ..  inet ip icmp tcp udp
        0.  /dev/inet:  AF_INET protocol layer
        1.  /dev/ip:  Inernet Protocol (IP)
        2.  /dev/icmp:  Internet Control Message Protocol (ICMP)
        3.  /dev/tcp:  Transmission Control Protocol (TCP)
        4.  /dev/udp:  User Datagram Protocol (UDP)

 19.  WE-driver .....  (character) ..  we[0-3]
        0-3.  /dev/we[0-3]:  "WE" driver

 20.  DP8390-driver .  (character) ..  wd[0-3] ec[0-3] ne[0-3]
        0-3.  /dev/wd[0-3]:  "DP8390" driver, WD8003
        8-11.  /dev/ec[0-3]:  "DP8390" driver, 3C503
        16-19.  /dev/ne[0-3]:  "DP8390" driver, NE2000

 21.  Sony-CD-ROM ...  (block) ......  sonycd
        0.  /dev/sonycd:  Sony CDU-535 CD-ROM, I think.

 22.  2nd AT-Cntrlr .  (block) ......  hd1[a-b]<[0-8]>
     Minor numbers are like those of the primary AT-Disk controller.
        THIS MAY WORK FOR HARD-CARDS.
     (Note the "1" in the device name for the secondary controller.
      This is because we may eventually wish to change the names of
      the primary-controller drives to "hd0[a-b]...".)

 23.  Mitsumi CD-ROM   (block) ......  mcd
     I don't know much about this one.

 31.  Link Interface   (character?) .  ???
        0.  ???
     Link Interface for use with Christoph Niemann's driver for the
     INMOS C012-based high-speed serial link interface card (useful
     for talking to transputers or video digitizers).

--
Rick Miller  <[email-masked]> | <[email-masked]>   Ricxjo Muelisto
Send a postcard, get one back! | Enposxtigu bildkarton kaj vi ricevos alion!
          RICK MILLER // 16203 WOODS // MUSKEGO, WIS. 53150 // USA

------------------------------

From: [email-masked] (Michael K Johnson)
Subject: Linux Programmers' Guide
Date: Mon, 26 Apr 1993 18:59:08 +0300

I don't think that anyone is working on a Programmers' Guide.  If
someone is, please tell me that I am wrong...

If I am right, and no one is working on such a beast, I will start.
There are a lot of overlapping ideas between this and the KHG, and so
it will probably be most efficient for me to be editor and main
contributor of both.  A little bit of the material in the KHG might
migrate into a Programmers' Guide, and there are other things that I
have thought about and wanted to write about that just haven't fit
into the KHG.

I assume that it could be refered to as the LPG, or just the PG.

I would regularly release alpha and beta versions of this to the
public, because there is nothing like getting it into the hands of the
people who would be using it to get the ideas that I would need.  At
first, I would probably concentrate on documenting ways that Linux is
different from most other *nices, and would then expand to be more
complete, covering more and more aspects of programming for Linux.

I would appreciate any help on this I can get...

Any comments?

michaelkjohnson

------------------------------

End of DOC Digest
*****************
-------