head	1.4;
access;
symbols
	perseant-exfatfs-base-20250801:1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.48
	perseant-exfatfs-base:1.4
	cjep_sun2x:1.4.0.46
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	cjep_staticlib_x:1.4.0.44
	cjep_staticlib_x-base:1.4
	phil-wifi-20200421:1.4
	phil-wifi-20200411:1.4
	phil-wifi-20200406:1.4
	pgoyette-compat-merge-20190127:1.4
	pgoyette-compat-20190127:1.4
	pgoyette-compat-20190118:1.4
	pgoyette-compat-1226:1.4
	pgoyette-compat-1126:1.4
	pgoyette-compat-1020:1.4
	pgoyette-compat-0930:1.4
	pgoyette-compat-0906:1.4
	pgoyette-compat-0728:1.4
	pgoyette-compat-0625:1.4
	pgoyette-compat-0521:1.4
	pgoyette-compat-0502:1.4
	pgoyette-compat-0422:1.4
	pgoyette-compat-0415:1.4
	pgoyette-compat-0407:1.4
	pgoyette-compat-0330:1.4
	pgoyette-compat-0322:1.4
	pgoyette-compat-0315:1.4
	pgoyette-compat:1.4.0.42
	pgoyette-compat-base:1.4
	perseant-stdc-iso10646:1.4.0.40
	perseant-stdc-iso10646-base:1.4
	prg-localcount2-base3:1.4
	prg-localcount2-base2:1.4
	prg-localcount2-base1:1.4
	prg-localcount2:1.4.0.38
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	pgoyette-localcount-20170320:1.4
	bouyer-socketcan:1.4.0.36
	bouyer-socketcan-base:1.4
	pgoyette-localcount-20170107:1.4
	pgoyette-localcount-20161104:1.4
	localcount-20160914:1.4
	pgoyette-localcount-20160806:1.4
	pgoyette-localcount-20160726:1.4
	pgoyette-localcount:1.4.0.34
	pgoyette-localcount-base:1.4
	netbsd-5-2-3-RELEASE:1.4
	netbsd-5-1-5-RELEASE:1.4
	yamt-pagecache-base9:1.4
	yamt-pagecache-tag8:1.4
	tls-earlyentropy:1.4.0.30
	tls-earlyentropy-base:1.4
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.4
	riastradh-drm2-base3:1.4
	netbsd-5-2-2-RELEASE:1.4
	netbsd-5-1-4-RELEASE:1.4
	netbsd-5-2-1-RELEASE:1.4
	netbsd-5-1-3-RELEASE:1.4
	agc-symver:1.4.0.32
	agc-symver-base:1.4
	tls-maxphys-base:1.4
	yamt-pagecache-base8:1.4
	netbsd-5-2:1.4.0.28
	yamt-pagecache-base7:1.4
	netbsd-5-2-RELEASE:1.4
	netbsd-5-2-RC1:1.4
	yamt-pagecache-base6:1.4
	yamt-pagecache-base5:1.4
	yamt-pagecache-base4:1.4
	netbsd-5-1-2-RELEASE:1.4
	netbsd-5-1-1-RELEASE:1.4
	yamt-pagecache-base3:1.4
	yamt-pagecache-base2:1.4
	yamt-pagecache:1.4.0.26
	yamt-pagecache-base:1.4
	bouyer-quota2-nbase:1.4
	bouyer-quota2:1.4.0.24
	bouyer-quota2-base:1.4
	matt-nb5-pq3:1.4.0.22
	matt-nb5-pq3-base:1.4
	netbsd-5-1:1.4.0.20
	netbsd-5-1-RELEASE:1.4
	netbsd-5-1-RC4:1.4
	netbsd-5-1-RC3:1.4
	netbsd-5-1-RC2:1.4
	netbsd-5-1-RC1:1.4
	netbsd-5-0-2-RELEASE:1.4
	netbsd-5-0-1-RELEASE:1.4
	jym-xensuspend-nbase:1.4
	netbsd-5-0:1.4.0.18
	netbsd-5-0-RELEASE:1.4
	netbsd-5-0-RC4:1.4
	netbsd-5-0-RC3:1.4
	netbsd-5-0-RC2:1.4
	jym-xensuspend:1.4.0.16
	jym-xensuspend-base:1.4
	netbsd-5-0-RC1:1.4
	netbsd-5:1.4.0.14
	netbsd-5-base:1.4
	yamt-pf42-base4:1.4
	yamt-pf42-base3:1.4
	hpcarm-cleanup-nbase:1.4
	yamt-pf42-base2:1.4
	yamt-pf42:1.4.0.12
	yamt-pf42-base:1.4
	mjf-devfs2:1.4.0.10
	mjf-devfs2-base:1.4
	keiichi-mipv6:1.4.0.8
	keiichi-mipv6-base:1.4
	mjf-devfs:1.4.0.6
	mjf-devfs-base:1.4
	cube-autoconf:1.4.0.4
	cube-autoconf-base:1.4
	hpcarm-cleanup:1.4.0.2
	hpcarm-cleanup-base:1.4
	netbsd-1-5-PATCH003:1.3
	netbsd-1-5-PATCH002:1.3
	netbsd-1-5-PATCH001:1.3
	netbsd-1-5-RELEASE:1.3
	netbsd-1-5-BETA2:1.3
	netbsd-1-5-BETA:1.3
	netbsd-1-4-PATCH003:1.2
	netbsd-1-5-ALPHA2:1.3
	netbsd-1-5:1.3.0.2
	netbsd-1-5-base:1.3
	minoura-xpg4dl:1.2.0.10
	minoura-xpg4dl-base:1.2
	netbsd-1-4-PATCH002:1.2
	wrstuden-devbsize-19991221:1.2
	wrstuden-devbsize:1.2.0.8
	wrstuden-devbsize-base:1.2
	comdex-fall-1999:1.2.0.6
	comdex-fall-1999-base:1.2
	netbsd-1-4-PATCH001:1.2
	netbsd-1-4-RELEASE:1.2
	netbsd-1-4:1.2.0.4
	netbsd-1-4-base:1.2
	netbsd-1-3-PATCH003:1.2.2.2
	netbsd-1-3-PATCH003-CANDIDATE2:1.2.2.2
	netbsd-1-3-PATCH003-CANDIDATE1:1.2.2.2
	netbsd-1-3-PATCH003-CANDIDATE0:1.2.2.2
	netbsd-1-3-PATCH002:1.2.2.2
	netbsd-1-3-PATCH001:1.2.2.2
	netbsd-1-3-RELEASE:1.2.2.2
	netbsd-1-3:1.2.0.2;
locks; strict;
comment	@# @;


1.4
date	2002.05.17.17.52.33;	author lukem;	state dead;
branches;
next	1.3;

1.3
date	2000.06.10.04.04.45;	author tsutsui;	state Exp;
branches;
next	1.2;

1.2
date	97.12.18.22.22.32;	author gwr;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	97.12.18.22.18.44;	author gwr;	state Exp;
branches;
next	;

1.2.2.1
date	97.12.18.22.22.32;	author perry;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	97.12.20.22.45.19;	author perry;	state Exp;
branches;
next	;


desc
@@


1.4
log
@convert to NDWO, a la sun2.

XXX:	untested.
	also needs sun3 converted to sun68k/stand/bootxx so that
	the ${INSTALLBOOT} in miniroot can be enabled.

XXX^2:	sun2 & sun3 should share distrib dirs since they're extremely similar...
@
text
@#!/bin/sh -
#
#	$NetBSD: rd.MAKEDEV,v 1.3 2000/06/10 04:04:45 tsutsui Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the University of
#	California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#	@@(#)MAKEDEV	5.5 (Berkeley) 5/28/91
#
# Device "make" file.  Valid arguments:
#	std	standard devices
#	local	configuration specific devices
# Tapes:
#	st*	SCSI tape
# Disks:
#	sd*	Sun SCSI disks
#	fd*	Floppies
#	vnd*	"file" pseudo-disks
#	ccd*	concatenated disk driver
#	raid*	RAIDframe disk driver
#	md*	memory pseudo-disk devices
# Pseudo terminals:
#	pty*	set of 16 master and slave pseudo terminals
# Special purpose devices:
#	bwtwo*	monochromatic frame buffer
#	cgtwo*	8-bit VME bus color frame buffer
#	cgfour*	8-bit color frame buffer
#	bpf*	packet filter
#	lkm	loadable kernel modules interface
#	tun*	network tunnel driver
#	random	Random number generator
#	scsibus* SCSI busses, see scsictl(8), scsi(4)

# XXX - Keep /usr/etc so SunOS can find chown
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/etc
umask 77

# set this to echo for Echo-Only debugging
eo=

# mk name b/c major minor [mode] [group]
mk() {
	$eo rm -f $1
	$eo mknod $1 $2 $3 $4
	$eo chmod ${5-666} $1
	test -n "$6" && $eo chgrp $6 $1
	return 0
}

for arg
do

unit=`expr $arg : '[a-z][a-z]*\([0-9][0-9]*\)'`
[ "$unit" ] || unit=0

case $arg in

all)
	sh $0 std fd pty0
	sh $0 bwtwo0 cgtwo0 cgfour0
	sh $0 raid0 raid1 raid2 raid3
	sh $0 sd0 sd1 sd2 sd3 sd4 sd5 sd6
	sh $0 cd0 cd1 st0 st1 st2 fd0
	sh $0 xd0 xd1 xd2 xd3
	sh $0 xy0 xy1 xy2 xy3
	sh $0 bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7
	sh $0 tun0 tun1
	sh $0 lkm random
	sh $0 scsibus0 scsibus1 scsibus2 scsibus3
	sh $0 local
	;;

std)
	mk console	c 0 0 622
	mk kd		c 1 0 622
	mk tty		c 2 0

	mk mem		c 3 0 640 kmem
	mk kmem		c 3 1 640 kmem
	mk null		c 3 2
	mk eeprom	c 3 11 640 kmem
	mk zero		c 3 12
	mk leds		c 3 13
	mk drum		c 7 0 640 kmem

	mk ttya		c 12 0
	mk ttyb		c 12 1
	mk mouse	c 13 0
	mk klog		c 16 0 600
	mk fb		c 22 0
	mk kbd		c 29 0
	mk stdin	c 23 0
	mk stdout	c 23 1
	mk stderr	c 23 2
	;;

fd)
	rm -f fd/*
	mkdir fd > /dev/null 2>&1
	n=0
	while [ $n -lt 64 ]; do
		mk fd/$n c 23 $n 666
		n=$(($n + 1))
	done
	chown -R root.wheel fd
	chmod 755 fd
	;;

bpf*)
	mk bpf$unit c 36 $unit 600
	;;

tun*)
	mk tun$unit c 24 $unit 600
	;;

pty*)
	class=${arg#pty}
	case $unit in
	0)      name=p;;
	1)      name=q;;
	2)      name=r;;
	3)      name=s;;
	4)      name=t;;
	5)      name=u;;
	6)      name=v;;
	7)      name=w;;
	8)      name=x;;
	9)      name=y;;
	10)     name=z;;
	11)     name=P;;
	12)     name=Q;;
	13)     name=R;;
	14)     name=S;;
	15)     name=T;;
	*)      echo "$0: $i: pty unit must be between 0 and 15"
	        continue ;;
	esac
	rm -f tty$name[0-9a-f] pty$name[0-9a-f]
	for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
	do
		case $j in
		[0-9])  jn=$j ;;
		a)      jn=10 ;;
		b)      jn=11 ;;
		c)      jn=12 ;;
		d)      jn=13 ;;
		e)      jn=14 ;;
		f)      jn=15 ;;
		esac
		unit=$(($class * 16 + $jn))
		mknod tty$name$j c 20 $unit
		mknod pty$name$j c 21 $unit
	done
        chgrp wheel tty$name? pty$name?
        chmod 666 tty$name? pty$name?
	;;

ccd*|cd*|fd*|sd*|xd*|xy*|vnd*|raid*)
	case $arg in
	  ccd*) name=ccd; blk=9; chr=33;;
	  cd*) name=cd; blk=18; chr=58;;
	  fd*) name=fd; blk=16; chr=54;;
	  raid*) name=raid; blk=25; chr=82;;
	  sd*) name=sd; blk=7; chr=17;;
	  xd*) name=xd; blk=10; chr=42;;
	  xy*) name=xy; blk=3; chr=9 ;;
	  vnd*) name=vnd; blk=5; chr=19;;
	esac
	case $unit in
	  [0-7]) offset=$(($unit * 8));;
	  *) echo bad unit for $name in: $arg;;
	esac
	for part in a.0 b.1 c.2 d.3 # e.4 f.5 g.6 h.7
	do
	(
		tmp="$IFS" ; IFS="$IFS."
		set -- $part
		IFS="$tmp" ; unset tmp
		minor=$(($offset + $2))
#		mk  $name$unit$1 b $blk $minor 640 operator
		mk r$name$unit$1 c $chr $minor 640 operator
	)
	done
	;;

st*)
	name=st; blk=11; chr=18;
	mk   r$name$unit c $chr $(($unit * 16 + 0)) 660 operator
	mk  nr$name$unit c $chr $(($unit * 16 + 1)) 660 operator
	mk  er$name$unit c $chr $(($unit * 16 + 2)) 660 operator
	mk enr$name$unit c $chr $(($unit * 16 + 3)) 660 operator
	;;

bwtwo*)
	mk bwtwo$unit c 27 $unit
	;;

cgtwo*)
	mk cgtwo$unit c 31 $unit
	;;

cgfour*)
	mk cgfour$unit c 39 $unit
	;;

md*)
	name=md; blk=13; chr=52;
	mk  md${unit}a b $blk $(($unit * 8 + 0)) 640 operator
	mk  md${unit}c b $blk $(($unit * 8 + 2)) 640 operator
#	mk rmd${unit}a c $chr $(($unit * 8 + 0)) 640 operator
#	mk rmd${unit}c c $chr $(($unit * 8 + 2)) 640 operator
	;;

lkm)
	mk lkm c 72 0 640 kmem
	;;

random)
	mk  random c 80 0 444
	mk urandom c 80 1
	;;

scsibus*)
	mk scsibus${unit} c 81 $unit 644 wheel
	;;

local)
	umask 0
	sh $0.local all
	umask 77
	;;
*)
	echo $arg: unknown device
	;;

esac
done

@


1.3
log
@Sync with etc/etc.sun3/MAKEDEV.
@
text
@d3 1
a3 1
#	$NetBSD: rd.MAKEDEV,v 1.2 1997/12/18 22:22:32 gwr Exp $
@


1.2
log
@Aw crud. Commented the wrong line.
@
text
@d3 1
a3 1
#	$NetBSD: rd.MAKEDEV,v 1.1 1997/12/18 22:18:44 gwr Exp $
d48 2
a51 2
# Printers:
# Call units:
d53 3
a55 3
#	bwtwo*
#	cgtwo*
#	cgfour*
a58 1
#	md*	memory pseudo-disk
d60 1
d89 1
d91 1
a91 1
	sh $0 cd0 cd1 st0 st1 st2
d94 1
a94 1
	sh $0 bpf0 bpf1 bpf2 bpf3
d97 1
d187 1
a187 1
cd*|sd*|xd*|xy*|vnd*|ccd*)
d189 1
d191 2
a196 1
	  ccd*) name=ccd; blk=9; chr=33;;
d237 4
a240 3
	mk  md${unit}  b $blk $((($unit +  0) * 8)) 640 operator
	mk  md${unit}c b $blk $((($unit + 16) * 8)) 640 operator
#	mk rmd${unit}  c $chr $((($unit + 16) * 8)) 640 operator
d250 4
@


1.2.2.1
log
@file rd.MAKEDEV was added on branch netbsd-1-3 on 1997-12-20 22:45:19 +0000
@
text
@d1 258
@


1.2.2.2
log
@pullup from trunk (gwr)
@
text
@a0 258
#!/bin/sh -
#
#	$NetBSD: rd.MAKEDEV,v 1.2.2.1 1997/12/20 22:45:19 perry Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the University of
#	California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#	@@(#)MAKEDEV	5.5 (Berkeley) 5/28/91
#
# Device "make" file.  Valid arguments:
#	std	standard devices
#	local	configuration specific devices
# Tapes:
#	st*	SCSI tape
# Disks:
#	sd*	Sun SCSI disks
#	fd*	Floppies
#	vnd*	"file" pseudo-disks
#	ccd*	concatenated disk driver
# Pseudo terminals:
#	pty*	set of 16 master and slave pseudo terminals
# Printers:
# Call units:
# Special purpose devices:
#	bwtwo*
#	cgtwo*
#	cgfour*
#	bpf*	packet filter
#	lkm	loadable kernel modules interface
#	tun*	network tunnel driver
#	md*	memory pseudo-disk
#	random	Random number generator

# XXX - Keep /usr/etc so SunOS can find chown
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/etc
umask 77

# set this to echo for Echo-Only debugging
eo=

# mk name b/c major minor [mode] [group]
mk() {
	$eo rm -f $1
	$eo mknod $1 $2 $3 $4
	$eo chmod ${5-666} $1
	test -n "$6" && $eo chgrp $6 $1
	return 0
}

for arg
do

unit=`expr $arg : '[a-z][a-z]*\([0-9][0-9]*\)'`
[ "$unit" ] || unit=0

case $arg in

all)
	sh $0 std fd pty0
	sh $0 bwtwo0 cgtwo0 cgfour0
	sh $0 sd0 sd1 sd2 sd3 sd4 sd5 sd6
	sh $0 cd0 cd1 st0 st1 st2
	sh $0 xd0 xd1 xd2 xd3
	sh $0 xy0 xy1 xy2 xy3
	sh $0 bpf0 bpf1 bpf2 bpf3
	sh $0 tun0 tun1
	sh $0 lkm random
	sh $0 local
	;;

std)
	mk console	c 0 0 622
	mk kd		c 1 0 622
	mk tty		c 2 0

	mk mem		c 3 0 640 kmem
	mk kmem		c 3 1 640 kmem
	mk null		c 3 2
	mk eeprom	c 3 11 640 kmem
	mk zero		c 3 12
	mk leds		c 3 13
	mk drum		c 7 0 640 kmem

	mk ttya		c 12 0
	mk ttyb		c 12 1
	mk mouse	c 13 0
	mk klog		c 16 0 600
	mk fb		c 22 0
	mk kbd		c 29 0
	mk stdin	c 23 0
	mk stdout	c 23 1
	mk stderr	c 23 2
	;;

fd)
	rm -f fd/*
	mkdir fd > /dev/null 2>&1
	n=0
	while [ $n -lt 64 ]; do
		mk fd/$n c 23 $n 666
		n=$(($n + 1))
	done
	chown -R root.wheel fd
	chmod 755 fd
	;;

bpf*)
	mk bpf$unit c 36 $unit 600
	;;

tun*)
	mk tun$unit c 24 $unit 600
	;;

pty*)
	class=${arg#pty}
	case $unit in
	0)      name=p;;
	1)      name=q;;
	2)      name=r;;
	3)      name=s;;
	4)      name=t;;
	5)      name=u;;
	6)      name=v;;
	7)      name=w;;
	8)      name=x;;
	9)      name=y;;
	10)     name=z;;
	11)     name=P;;
	12)     name=Q;;
	13)     name=R;;
	14)     name=S;;
	15)     name=T;;
	*)      echo "$0: $i: pty unit must be between 0 and 15"
	        continue ;;
	esac
	rm -f tty$name[0-9a-f] pty$name[0-9a-f]
	for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
	do
		case $j in
		[0-9])  jn=$j ;;
		a)      jn=10 ;;
		b)      jn=11 ;;
		c)      jn=12 ;;
		d)      jn=13 ;;
		e)      jn=14 ;;
		f)      jn=15 ;;
		esac
		unit=$(($class * 16 + $jn))
		mknod tty$name$j c 20 $unit
		mknod pty$name$j c 21 $unit
	done
        chgrp wheel tty$name? pty$name?
        chmod 666 tty$name? pty$name?
	;;

cd*|sd*|xd*|xy*|vnd*|ccd*)
	case $arg in
	  cd*) name=cd; blk=18; chr=58;;
	  sd*) name=sd; blk=7; chr=17;;
	  xd*) name=xd; blk=10; chr=42;;
	  xy*) name=xy; blk=3; chr=9 ;;
	  vnd*) name=vnd; blk=5; chr=19;;
	  ccd*) name=ccd; blk=9; chr=33;;
	esac
	case $unit in
	  [0-7]) offset=$(($unit * 8));;
	  *) echo bad unit for $name in: $arg;;
	esac
	for part in a.0 b.1 c.2 d.3 # e.4 f.5 g.6 h.7
	do
	(
		tmp="$IFS" ; IFS="$IFS."
		set -- $part
		IFS="$tmp" ; unset tmp
		minor=$(($offset + $2))
#		mk  $name$unit$1 b $blk $minor 640 operator
		mk r$name$unit$1 c $chr $minor 640 operator
	)
	done
	;;

st*)
	name=st; blk=11; chr=18;
	mk   r$name$unit c $chr $(($unit * 16 + 0)) 660 operator
	mk  nr$name$unit c $chr $(($unit * 16 + 1)) 660 operator
	mk  er$name$unit c $chr $(($unit * 16 + 2)) 660 operator
	mk enr$name$unit c $chr $(($unit * 16 + 3)) 660 operator
	;;

bwtwo*)
	mk bwtwo$unit c 27 $unit
	;;

cgtwo*)
	mk cgtwo$unit c 31 $unit
	;;

cgfour*)
	mk cgfour$unit c 39 $unit
	;;

md*)
	name=md; blk=13; chr=52;
	mk  md${unit}  b $blk $((($unit +  0) * 8)) 640 operator
	mk  md${unit}c b $blk $((($unit + 16) * 8)) 640 operator
#	mk rmd${unit}  c $chr $((($unit + 16) * 8)) 640 operator
	;;

lkm)
	mk lkm c 72 0 640 kmem
	;;

random)
	mk  random c 80 0 444
	mk urandom c 80 1
	;;

local)
	umask 0
	sh $0.local all
	umask 77
	;;
*)
	echo $arg: unknown device
	;;

esac
done

@


1.1
log
@Well... it turns out that the ramdisk root runs out of inodes,
but it doesn't need the block devices nor most partitions, so
this can use a customized MAKEDEV to avoid making those.
(I'd rather not enlarge the ramdisk image right now.)
@
text
@d3 1
a3 1
#	$NetBSD: MAKEDEV,v 1.16.2.4 1997/12/14 00:49:39 mellon Exp $
d205 2
a206 2
		mk  $name$unit$1 b $blk $minor 640 operator
#		mk r$name$unit$1 c $chr $minor 640 operator
@
