**Applied** Re: MAKEDEV patch

Miguel Bolanos
2004-06-04T03:08:01Z

[-- Attachment #1: Type: text/plain, Size: 15988 bytes --]

Applied with Eduardo's changes.

Mike

On Wed, 2004-06-02 at 15:04, Tommy McCabe wrote:
> Fixes the bugs with MAKEDEV:
>
> 1. Leftovers from trying to move the script off the
> ELKS disks to save space (All the $DEVDIRS).
>
> 2. ln and mknod are used instead of /bin/ln and
> /bin/mknod, in case someone doesn't have them in /bin.
>
> 3. Proper location is given for MAKESET: in the same
> directory as MAKEDEV, not in the /dev directory on the
> hard drive.
>
> 4. Changes /bin/test to test, in case it's not in
> /bin.
>
> 5. Reduces the number of partition devices used per
> hard drive from 64 to 8.
>
> 6. Changes "d" devices to block (or "b") devices,
> their proper name.
>
> 7. Removes the partitions on CD-ROM drives
> (unimplemented, of course, but who has partitions on a
> CD?).
>
> And although I didn't remove this, who really owns a
> Conrad Electronic Parallel Port Radio Clock? Even
> Debian doesn't have that.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ______________________________________________________________________
> --- ./elkscurr/elkscmd/rootfs_template/dev/MAKEDEV 2002-07-15 01:56:06.000000000 -0400
> +++ ./elks/elkscmd/rootfs_template/dev/MAKEDEV 2004-06-02 16:45:52.000000000 -0400
> @@ -12,14 +12,16 @@
> #
> # Refer to the MAKESET command, also in this directory, for usage details.
>
> -LINK=/bin/ln
> -MKDEV=/bin/mknod
> -MKSET=/dev/MAKESET
> +LINK=ln
> +MKDEV=mknod
> +MKSET=./MAKESET
> +DEVDIR=.
>
> ##############################################################################
> # Ensure required auxilliary script is present.
>
> -if ! /bin/test -f "$MKSET"
> +if ! test -f "$MKSET"
> then
> echo ERROR: \"$MKSET\" script missing, unable to continue.
> exit 1
> @@ -28,80 +30,80 @@
> ##############################################################################
> # Create memory devices.
>
> - $MKDEV mem c 1 1
> - $MKDEV kmem c 1 2
> - $MKDEV null c 1 3
> -# $MKDEV port c 1 4
> - $MKDEV zero c 1 5
> -# $MKDEV core c 1 6
> - $MKDEV full c 1 7
> -# $MKDEV random c 1 8
> -# $MKDEV urandom c 1 9
> -# $MKDEV aio c 1 10
> + $MKDEV $DEVDIR/mem c 1 1
> + $MKDEV $DEVDIR/kmem c 1 2
> + $MKDEV $DEVDIR/null c 1 3
> +# $MKDEV $DEVDIR/port c 1 4
> + $MKDEV $DEVDIR/zero c 1 5
> +# $MKDEV $DEVDIR/core c 1 6
> + $MKDEV $DEVDIR/full c 1 7
> +# $MKDEV $DEVDIR/random c 1 8
> +# $MKDEV $DEVDIR/urandom c 1 9
> +# $MKDEV $DEVDIR/aio c 1 10
>
> ##############################################################################
> # RAM disks.
>
> - $MKSET 0 7 $MKDEV ram b 1
> + $MKSET 0 7 $MKDEV $DEVDIR/ram b 1
>
> - $LINK ram1 ramdisk
> + $LINK $DEVDIR/ram1 $DEVDIR/ramdisk
>
> ##############################################################################
> # Pseudo-TTY master devices. These are not yet supported by the ELKS kernel.
>
> -# $MKSET 0 15 $MKDEV ptyp x 2
> -# $MKSET 16 15 $MKDEV ptyq x 2
> -# $MKSET 32 15 $MKDEV ptyr x 2
> -# $MKSET 48 15 $MKDEV ptys x 2
> -# $MKSET 64 15 $MKDEV ptyt x 2
> -# $MKSET 80 15 $MKDEV ptyu x 2
> -# $MKSET 96 15 $MKDEV ptyv x 2
> -# $MKSET 112 15 $MKDEV ptyw x 2
> -# $MKSET 128 15 $MKDEV ptyx x 2
> -# $MKSET 144 15 $MKDEV ptyy x 2
> -# $MKSET 160 15 $MKDEV ptyz x 2
> -# $MKSET 176 15 $MKDEV ptya x 2
> -# $MKSET 192 15 $MKDEV ptyb x 2
> -# $MKSET 208 15 $MKDEV ptyc x 2
> -# $MKSET 224 15 $MKDEV ptyd x 2
> -# $MKSET 240 15 $MKDEV ptye x 2
> +# $MKSET 0 15 $MKDEV $DEVDIR/ptyp x 2
> +# $MKSET 16 15 $MKDEV $DEVDIR/ptyq x 2
> +# $MKSET 32 15 $MKDEV $DEVDIR/ptyr x 2
> +# $MKSET 48 15 $MKDEV $DEVDIR/ptys x 2
> +# $MKSET 64 15 $MKDEV $DEVDIR/ptyt x 2
> +# $MKSET 80 15 $MKDEV $DEVDIR/ptyu x 2
> +# $MKSET 96 15 $MKDEV $DEVDIR/ptyv x 2
> +# $MKSET 112 15 $MKDEV $DEVDIR/ptyw x 2
> +# $MKSET 128 15 $MKDEV $DEVDIR/ptyx x 2
> +# $MKSET 144 15 $MKDEV $DEVDIR/ptyy x 2
> +# $MKSET 160 15 $MKDEV $DEVDIR/ptyz x 2
> +# $MKSET 176 15 $MKDEV $DEVDIR/ptya x 2
> +# $MKSET 192 15 $MKDEV $DEVDIR/ptyb x 2
> +# $MKSET 208 15 $MKDEV $DEVDIR/ptyc x 2
> +# $MKSET 224 15 $MKDEV $DEVDIR/ptyd x 2
> +# $MKSET 240 15 $MKDEV $DEVDIR/ptye x 2
>
> ##############################################################################
> # Floppy diskettes. Only the auto-detect nodes are listed.
>
> - $MKDEV fd0 b 3 128 # Currently.
> - $MKDEV fd1 b 3 192 # Currently.
> + $MKDEV $DEVDIR/fd0 b 3 128 # Currently.
> + $MKDEV $DEVDIR/fd1 b 3 192 # Currently.
>
> -# $MKSET 0 3 $MKDEV fd b 2 # Ought to be.
> +# $MKSET 0 3 $MKDEV $DEVDIR/fd b 2 # Ought to be.
>
> ##############################################################################
> # Pseudo-TTY master devices. These are not yet supported by the ELKS kernel.
>
> -# $MKSET 0 15 $MKDEV ttyp x 3
> -# $MKSET 16 15 $MKDEV ttyq x 3
> -# $MKSET 32 15 $MKDEV ttyr x 3
> -# $MKSET 48 15 $MKDEV ttys x 3
> -# $MKSET 64 15 $MKDEV ttyt x 3
> -# $MKSET 80 15 $MKDEV ttyu x 3
> -# $MKSET 96 15 $MKDEV ttyv x 3
> -# $MKSET 112 15 $MKDEV ttyw x 3
> -# $MKSET 128 15 $MKDEV ttyx x 3
> -# $MKSET 144 15 $MKDEV ttyy x 3
> -# $MKSET 160 15 $MKDEV ttyz x 3
> -# $MKSET 176 15 $MKDEV ttya x 3
> -# $MKSET 192 15 $MKDEV ttyb x 3
> -# $MKSET 208 15 $MKDEV ttyc x 3
> -# $MKSET 224 15 $MKDEV ttyd x 3
> -# $MKSET 240 15 $MKDEV ttye x 3
> +# $MKSET 0 15 $MKDEV $DEVDIR/ttyp x 3
> +# $MKSET 16 15 $MKDEV $DEVDIR/ttyq x 3
> +# $MKSET 32 15 $MKDEV $DEVDIR/ttyr x 3
> +# $MKSET 48 15 $MKDEV $DEVDIR/ttys x 3
> +# $MKSET 64 15 $MKDEV $DEVDIR/ttyt x 3
> +# $MKSET 80 15 $MKDEV $DEVDIR/ttyu x 3
> +# $MKSET 96 15 $MKDEV $DEVDIR/ttyv x 3
> +# $MKSET 112 15 $MKDEV $DEVDIR/ttyw x 3
> +# $MKSET 128 15 $MKDEV $DEVDIR/ttyx x 3
> +# $MKSET 144 15 $MKDEV $DEVDIR/ttyy x 3
> +# $MKSET 160 15 $MKDEV $DEVDIR/ttyz x 3
> +# $MKSET 176 15 $MKDEV $DEVDIR/ttya x 3
> +# $MKSET 192 15 $MKDEV $DEVDIR/ttyb x 3
> +# $MKSET 208 15 $MKDEV $DEVDIR/ttyc x 3
> +# $MKSET 224 15 $MKDEV $DEVDIR/ttyd x 3
> +# $MKSET 240 15 $MKDEV $DEVDIR/ttye x 3
>
> ##############################################################################
> # Direct IDE disks, Primary channel.
>
> - $MKSET 0 63 $MKDEV hda d 5 # Currently.
> - $MKSET 64 63 $MKDEV hdb d 5 # Currently.
> + $MKSET 0 7 $MKDEV $DEVDIR/hda b 5 # Currently.
> + $MKSET 8 7 $MKDEV $DEVDIR/hdb b 5 # Currently.
>
> -# $MKSET 0 63 $MKDEV hda d 3 # Ought to be.
> -# $MKSET 64 63 $MKDEV hdb d 3 # Ought to be.
> +# $MKSET 0 7 $MKDEV $DEVDIR/hda b 3 # Ought to be.
> +# $MKSET 8 7 $MKDEV $DEVDIR/hdb b 3 # Ought to be.
>
> ##############################################################################
> # Virtual consoles. Note that tty4 through tty7 can't be enabled at this
> @@ -109,156 +111,156 @@
> # used to use the node numbers these now use. However, it is expected that
> # this restriction can be removed in the near future.
>
> - $MKSET 0 3 $MKDEV tty c 4 # Currently
> -# $MKSET 0 15 $MKDEV tty c 4 # Soon to be
> + $MKSET 0 3 $MKDEV $DEVDIR/tty c 4 # Currently
> +# $MKSET 0 15 $MKDEV $DEVDIR/tty c 4 # Soon to be
>
> # Serial ports, as detected by the ROM BIOS.
>
> - $MKSET 64 3 $MKDEV ttyS c 4
> + $MKSET 64 3 $MKDEV $DEVDIR/ttyS c 4
>
> ##############################################################################
> # Alternate TTY devices. These are not yet supported.
>
> -# $MKDEV tty c 5 0
> -# $MKDEV console c 5 1
> -# $MKDEV ptmx c 5 2
> +# $MKDEV $DEVDIR/tty c 5 0
> +# $MKDEV $DEVDIR/console c 5 1
> +# $MKDEV $DEVDIR/ptmx c 5 2
>
> ##############################################################################
> # Parallel devices, as detected by the ROM BIOS.
>
> - $MKSET 0 3 $MKDEV lp c 6
> + $MKSET 0 3 $MKDEV $DEVDIR/lp c 6
>
> ##############################################################################
> # Loopback devices. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV loop c 7
> +# $MKSET 0 15 $MKDEV $DEVDIR/loop c 7
>
> ##############################################################################
> # SCSI disks. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV sda d 8
> -# $MKSET 16 15 $MKDEV sdb d 8
> -# $MKSET 32 15 $MKDEV sdc d 8
> -# $MKSET 48 15 $MKDEV sdd d 8
> -# $MKSET 64 15 $MKDEV sde d 8
> -# $MKSET 80 15 $MKDEV sdf d 8
> -# $MKSET 96 15 $MKDEV sdg d 8
> -# $MKSET 112 15 $MKDEV sdh d 8
> -# $MKSET 128 15 $MKDEV sdi d 8
> -# $MKSET 144 15 $MKDEV sdj d 8
> -# $MKSET 160 15 $MKDEV sdk d 8
> -# $MKSET 176 15 $MKDEV sdl d 8
> -# $MKSET 192 15 $MKDEV sdm d 8
> -# $MKSET 208 15 $MKDEV sdn d 8
> -# $MKSET 224 15 $MKDEV sdo d 8
> -# $MKSET 240 15 $MKDEV sdp d 8
> +# $MKSET 0 7 $MKDEV $DEVDIR/sda b 8
> +# $MKSET 8 7 $MKDEV $DEVDIR/sdb b 8
> +# $MKSET 16 7 $MKDEV $DEVDIR/sdc b 8
> +# $MKSET 24 7 $MKDEV $DEVDIR/sdd b 8
> +# $MKSET 32 7 $MKDEV $DEVDIR/sde b 8
> +# $MKSET 40 7 $MKDEV $DEVDIR/sdf b 8
> +# $MKSET 48 7 $MKDEV $DEVDIR/sdg b 8
> +# $MKSET 56 7 $MKDEV $DEVDIR/sdh b 8
> +# $MKSET 64 7 $MKDEV $DEVDIR/sdi b 8
> +# $MKSET 72 7 $MKDEV $DEVDIR/sdj b 8
> +# $MKSET 80 7 $MKDEV $DEVDIR/sdk b 8
> +# $MKSET 88 7 $MKDEV $DEVDIR/sdl b 8
> +# $MKSET 96 7 $MKDEV $DEVDIR/sdm b 8
> +# $MKSET 104 7 $MKDEV $DEVDIR/sdn b 8
> +# $MKSET 112 7 $MKDEV $DEVDIR/sdo b 8
> +# $MKSET 120 7 $MKDEV $DEVDIR/sdp b 8
>
> ##############################################################################
> # SCSI tapes. These are not yet supported.
>
> -# $MKSET 0 31 $MKDEV st c 9
> -# $MKSET 32 31 $MKDEV st c 9 l
> -# $MKSET 64 31 $MKDEV st c 9 m
> -# $MKSET 96 31 $MKDEV st c 9 a
> -# $MKSET 128 31 $MKDEV nst c 9
> -# $MKSET 160 31 $MKDEV nst c 9 l
> -# $MKSET 192 31 $MKDEV nst c 9 m
> -# $MKSET 224 31 $MKDEV nst c 9 a
> +# $MKSET 0 31 $MKDEV $DEVDIR/st c 9
> +# $MKSET 32 31 $MKDEV $DEVDIR/st c 9 l
> +# $MKSET 64 31 $MKDEV $DEVDIR/st c 9 m
> +# $MKSET 96 31 $MKDEV $DEVDIR/st c 9 a
> +# $MKSET 128 31 $MKDEV $DEVDIR/nst c 9
> +# $MKSET 160 31 $MKDEV $DEVDIR/nst c 9 l
> +# $MKSET 192 31 $MKDEV $DEVDIR/nst c 9 m
> +# $MKSET 224 31 $MKDEV $DEVDIR/nst c 9 a
>
> ##############################################################################
> # Metadisk (RAID) devices. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV md b 9
> +# $MKSET 0 15 $MKDEV $DEVDIR/md b 9
>
> ##############################################################################
> # SCSI CD-ROM devices. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV scd b 11
> +# $MKDEV $DEVDIR/scd b 11
>
> ##############################################################################
> # MSCDEX CD-ROM devices. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV doscd b 12
> +# $MKDEV $DEVDIR/doscd b 12
>
> ##############################################################################
> # 8-bit MFM/RLL controllers. These are not yet supported.
>
> -# $MKSET 0 63 $MKDEV xda b 13
> -# $MKSET 64 63 $MKDEV xdb b 13
> +# $MKSET 0 7 $MKDEV $DEVDIR/xda b 13
> +# $MKSET 8 7 $MKDEV $DEVDIR/xdb b 13
>
> ##############################################################################
> # BIOS hard disks.
>
> - $MKSET 0 63 $MKDEV bda d 3 # Currently
> - $MKSET 64 63 $MKDEV bdb d 3 # Currently
> - $MKSET 128 63 $MKDEV bdc d 3 # Currently
> - $MKSET 192 63 $MKDEV bdd d 3 # Currently
> -
> -# $MKSET 0 63 $MKDEV bda d 14 # Ought to be
> -# $MKSET 64 63 $MKDEV bdb d 14 # Ought to be
> -# $MKSET 128 63 $MKDEV bdc d 14 # Ought to be
> -# $MKSET 192 63 $MKDEV bdd d 14 # Ought to be
> + $MKSET 0 7 $MKDEV $DEVDIR/bda b 3 # Currently
> + $MKSET 8 7 $MKDEV $DEVDIR/bdb b 3 # Currently
> + $MKSET 16 7 $MKDEV $DEVDIR/bdc b 3 # Currently
> + $MKSET 24 7 $MKDEV $DEVDIR/bdd b 3 # Currently
> +
> +# $MKSET 0 7 $MKDEV $DEVDIR/bda b 14 # Ought to be
> +# $MKSET 8 7 $MKDEV $DEVDIR/bdb b 14 # Ought to be
> +# $MKSET 16 7 $MKDEV $DEVDIR/bdc b 14 # Ought to be
> +# $MKSET 24 7 $MKDEV $DEVDIR/bdd b 14 # Ought to be
>
> ##############################################################################
> # Joysticks. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV js c 15
> -# $MKSET 128 15 $MKDEV djs c 15
> +# $MKDEV $DEVDIR/js c 15
> +# $MKDEV $DEVDIR/djs c 15
>
> ##############################################################################
> -# Generic SCSI devics. These are not yet supported.
> +# Generic SCSI devices. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV sg c 21
> +# $MKSET 0 15 $MKDEV $DEVDIR/sg c 21
>
> ##############################################################################
> # Direct IDE disks, Secondary channel. These are not yet supported.
>
> -# $MKSET 0 63 $MKDEV hdc d 22
> -# $MKSET 64 63 $MKDEV hdd d 22
> +# $MKSET 0 7 $MKDEV $DEVDIR/hdc b 22
> +# $MKSET 8 7 $MKDEV $DEVDIR/hdd b 22
>
> ##############################################################################
> # Direct IDE disks, Tertiary channel. These are not yet supported.
>
> -# $MKSET 0 63 $MKDEV hde d 33
> -# $MKSET 64 63 $MKDEV hdf d 33
> +# $MKSET 0 7 $MKDEV $DEVDIR/hde b 33
> +# $MKSET 8 7 $MKDEV $DEVDIR/hdf b 33
>
> ##############################################################################
> # Z80-SIO devices. These are not yet supported.
>
> -# $MKSET 0 7 $MKDEV scc c 34
> +# $MKSET 0 7 $MKDEV $DEVDIR/scc c 34
>
> ##############################################################################
> # Direct IDE disks, Quaternary channel. These are not yet supported.
>
> -# $MKSET 0 63 $MKDEV hde d 34
> -# $MKSET 64 63 $MKDEV hdf d 34
> +# $MKSET 0 7 $MKDEV $DEVDIR/hde b 34
> +# $MKSET 8 7 $MKDEV $DEVDIR/hdf b 34
>
> ##############################################################################
> # Direct IDE disks, Quinternary channel. These are not yet supported.
>
> -# $MKSET 0 63 $MKDEV hdg d 56
> -# $MKSET 64 63 $MKDEV hdh d 56
> +# $MKSET 0 7 $MKDEV $DEVDIR/hdg b 56
> +# $MKSET 8 7 $MKDEV $DEVDIR/hdh b 56
>
> ##############################################################################
> -# Direct IDE disks, Quaternary channel. These are not yet supported.
> +# Direct IDE disks, Septernary channel. These are not yet supported.
>
> -# $MKSET 0 63 $MKDEV hdi d 57
> -# $MKSET 64 63 $MKDEV hdj d 57
> +# $MKSET 0 7 $MKDEV $DEVDIR/hdi b 57
> +# $MKSET 8 7 $MKDEV $DEVDIR/hdj b 57
>
> ##############################################################################
> # SCSI Media Changer. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV sch c 86
> +# $MKSET 0 15 $MKDEV $DEVDIR/sch c 86
>
> ##############################################################################
> # I2C bus drivers. These are not yet supported.
>
> -# $MKSET 0 7 $MKDEV i2c c 89
> +# $MKSET 0 7 $MKDEV $DEVDIR/i2c c 89
>
> ##############################################################################
> # Conrad Electronic Parallel Port Radio Clocks. These are not yet supported.
>
> -# $MKSET 0 1 $MKDEV pcfclock c 181
> +# $MKSET 0 1 $MKDEV $DEVDIR/pcfclock c 181
>
> ##############################################################################
> # EOF.