NetBSD/etc/etc.vax/MAKEDEV.conf

255 lines
5.9 KiB
Plaintext

# $NetBSD: MAKEDEV.conf,v 1.3 2003/10/24 08:20:27 jdolecek Exp $
all_md)
makedev mt0 mt1 ts0 ts1 st0 st1 uk0 ss0 cd0 vt0
makedev ra0 ra1 ra2 ra3 hp0 hp1 hp2 hp3 sd0 sd1 sd2 sd3 rd0 rd1 rd2
makedev dz0 dl0 dhu0 rx0 rx1
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev std_vax
;;
std_vax)
rm -f floppy crl csa1 cas2 tu0 tu1 g0 g1 g2 g3
rm -f kUmem leds
mknod ttyg0 c 25 0
mknod ttyg1 c 25 1
mknod ttyg2 c 25 2
mknod ttyg3 c 25 3
mknod floppy c 8 0
mknod crl c 35 0
mknod csa1 c 51 0
mknod csa2 c 51 1
mknod tu0 b 8 0
mknod tu1 b 8 1
mknod kUmem c 3 3 ; chmod 600 kUmem
mknod leds c 3 13 ; chmod 666 leds
;;
ht*|tm*|mt*|ts*|ut*)
case $i in
ht*) name=ht; unit=${i#ht}; blk=1; chr=5 ;;
mt*) name=mt; unit=${i#mt}; blk=15; chr=38;;
tm*) name=tm; unit=${i#tm}; blk=5; chr=14;;
ts*) name=ts; unit=${i#ts}; blk=6; chr=16;;
ut*) name=ut; unit=${i#ut}; blk=10; chr=17;;
esac
case $unit in
[0-7])
four=$(($unit + 4)) ; eight=$(($unit + 8))
twelve=$(($unit + 12)) ; twenty=$(($unit + 20))
rm -f $name$unit $name$four $name$eight $name$twelve \
n$name$unit n$name$eight nr$name$unit nr$name$eight \
r$name$unit r$name$four r$name$eight r$name$twelve
mknod $name$unit b $blk $unit
mknod $name$four b $blk $four
mknod $name$eight b $blk $eight
mknod $name$twelve b $blk $twelve
mknod n$name$unit b $blk $four ;: sanity w/pdp11 v7
mknod n$name$eight b $blk $twelve ;: ditto
mknod nr$name$unit c $chr $four ;: sanity w/pdp11 v7
mknod nr$name$eight c $chr $twelve ;: ditto
mknod r$name$unit c $chr $unit
mknod r$name$four c $chr $four
mknod r$name$eight c $chr $eight
mknod r$name$twelve c $chr $twelve
chgrp operator $name$unit $name$four $name$eight $name$twelve \
n$name$unit n$name$eight nr$name$unit nr$name$eight \
r$name$unit r$name$four r$name$eight r$name$twelve
chmod 660 $name$unit $name$four $name$eight $name$twelve \
n$name$unit n$name$eight nr$name$unit nr$name$eight \
r$name$unit r$name$four r$name$eight r$name$twelve
if [ $i = ut ]
then
rm -f $name$twenty r$name$twenty
mknod $name$twenty b $blk $twenty
mknod r$name$twenty c $chr $twenty
chgrp operator $name$twenty r$name$twenty
chmod 660 $name$twenty r$name$twenty
fi
if [ ! -e rmt$eight ] # compatibility stuff
then
ln -fs $name$unit mt$unit
ln -fs $name$four mt$four
ln -fs $name$eight mt$eight
ln -fs $name$twelve mt$twelve
ln -fs n$name$unit nmt$unit
ln -fs n$name$eight nmt$eight
ln -fs nr$name$unit nrmt$unit
ln -fs nr$name$eight nrmt$eight
ln -fs r$name$unit rmt$unit
ln -fs r$name$four rmt$four
ln -fs r$name$eight rmt$eight
ln -fs r$name$twelve rmt$twelve
fi
;;
*)
echo bad unit for tape in: $1
;;
esac
;;
hp*|hk*|up*|ra[0-9]*|rl*|rb*|rd*|rx*)
umask 2
case $i in
hp*) name=hp; unit=${i#hp}; blk=0; chr=4;;
hk*) name=hk; unit=${i#hk}; blk=3; chr=11;;
up*) name=up; unit=${i#up}; blk=2; chr=13;;
ra*) name=ra; unit=${i#ra}; blk=9; chr=9;;
rb*) name=rb; unit=${i#rb}; blk=11; chr=23;;
rx*) name=rx; unit=${i#rx}; blk=12; chr=30;;
rl*) name=rl; unit=${i#rl}; blk=14; chr=32;;
rd*) name=rd; unit=${i#rd}; blk=19; chr=58;;
esac
%MKDISK% $name $unit $blk $chr
;;
uu*)
unit=${i#uu}
name=uu; blk=13
case $unit in
[0-3])
mknod ${name}${unit} b $blk $(($unit * 2 + 0))
mknod ${name}${unit}a b $blk $(($unit * 2 + 1))
;;
*)
echo bad unit for uu cassette in: $i
;;
esac
;;
dz*)
unit=${i#dz}
case $unit in
[0-7])
i=0
while [ $i -lt 8 ]; do
no=$(($unit * 8 + $i))
`printf "mknod tty%02d c 1 %d\n" $no $no`
i=$(($i + 1))
done
;;
*)
echo bad unit for dz in: $i
;;
esac
;;
dhu*|dh*|dmf*|dmz*|vt*)
case $i in
vt*) name=vt; major=68; count=8
unit=${i#vt}
case $unit in
0) ch=w ;;
*) echo bad unit for $name in: $i ;;
esac;;
dmz*) name=dmz; major=37; count=24
unit=${i#dmz}
case $unit in
0) ch=a ;; 1) ch=b ;; 2) ch=c ;; 3) ch=e ;; 4) ch=f ;;
*) echo bad unit for $name in: $i ;;
esac;;
dmf*) name=dmf; major=22; count=8
unit=${i#dmf}
case $unit in
0) ch=A ;; 1) ch=B ;; 2) ch=C ;; 3) ch=E ;;
4) ch=F ;; 5) ch=G ;; 6) ch=H ;; 7) ch=I ;;
*) echo bad unit for $name in: $i ;;
esac;;
dhu*) name=dhu; major=34; count=16
unit=${i#dhu}
case $unit in
0) ch=S ;; 1) ch=T ;; 2) ch=U ;; 3) ch=V ;;
4) ch=W ;; 5) ch=X ;; 6) ch=Y ;; 7) ch=Z ;;
*) echo bad unit for $name in: $i ;;
esac;;
dh*) name=dh; major=12; count=16
unit=${i#dh}
case $unit in
0) ch=h ;; 1) ch=i ;; 2) ch=j ;; 3) ch=k ;;
4) ch=l ;; 5) ch=m ;; 6) ch=n ;; 7) ch=o ;;
*) echo bad unit for $name in: $i ;;
esac;;
esac
i=0
while [ $i -lt $count ]; do
`printf "mknod tty%s%x c %d %d\n" \
$ch $i $major $(($unit * $count + $i))`
i=$(($i + 1))
done
;;
dl*)
unit=${i#dl}
major=66
`printf "mknod ttyJ%x c %d %d\n" $unit $major $unit`
;;
lp*|va*|vp*)
case $i in
lp*) name=lp; unit=${i#lp}; major=15;;
va*) name=va; unit=${i#va}; major=10;;
vp*) name=vp; unit=${i#vp}; major=6;;
esac
case $unit in
[0-7])
mknod $i c $major $unit
chmod 666 $i
;;
*)
echo bad unit for $name in: $i
;;
esac
;;
np*)
class=${i#np}
case $class in
0) offset=0 name=0;;
1) offset=16 name=1;;
2) offset=32 name=2;;
*) echo bad unit for np in: $i;;
esac
case $class in
0|1|2)
i=0
while [ $i -lt 4 ]; do
`printf "mknod np%02d c 39 %d\n" $(($offset + $i)) $(($offset + $i))`
i=$(($i + 1))
done
esac
;;
dn*|ik*|ps*|ad*|ct*)
case $i in
ct*) name=ct; unit=${i#ct}; chr=18;;
dn*) name=cu; unit=${i#dn}; chr=24;;
ps*) name=ps; unit=${i#ps}; chr=27;;
ad*) name=ad; unit=${i#ad}; chr=29;;
ik*) name=ik; unit=${i#ik}; chr=31;;
esac
case $unit in
[0-7])
umask 0
mknod ${name}${unit} c ${chr} ${unit}
umask 77
;;
*)
echo bad unit for ${name} in: $i
;;
esac
;;
qd*)
unit=${i#qd}
rm -f qd$unit
mknod qc$unit c 40 $(($unit * 4))
mknod qd$unit c 40 $(($unit * 4 + 2))
;;
qv0)
mknod qv0 c 40 0
mknod qvcons c 40 1
mknod mouse c 40 2
;;