MAKEDEV goo for Cyclades-Z multi-port serial.
This commit is contained in:
parent
56512515f8
commit
41b9e77eff
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -
|
||||
#
|
||||
# $NetBSD: MAKEDEV,v 1.111 2000/05/07 19:15:21 veego Exp $
|
||||
# $NetBSD: MAKEDEV,v 1.112 2000/05/17 18:14:10 thorpej Exp $
|
||||
#
|
||||
# Copyright (c) 1990 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
|
@ -72,6 +72,8 @@
|
|||
# Terminal ports:
|
||||
# com* standard PC COM ports (XXX)
|
||||
# tty* alias for PC COM ports, this is what the system really wants
|
||||
# ttyCZ* Cyclades-Z multiport serial boards. Each "unit"
|
||||
# makes 64 ports.
|
||||
#
|
||||
# Pseudo terminals:
|
||||
# pty* set of 16 master and slave pseudo terminals
|
||||
|
@ -148,6 +150,7 @@ all)
|
|||
sh $0 ca0 ca1 ca2 ca3
|
||||
sh $0 lm0
|
||||
sh $0 bktr0
|
||||
sh $0 ttyCZ0
|
||||
;;
|
||||
|
||||
audio)
|
||||
|
@ -411,6 +414,30 @@ ca*|ccd*|fd*|sd*|vnd*|wd*|raid*)
|
|||
chmod 640 $name$unit? r$name$unit?
|
||||
;;
|
||||
|
||||
ttyCZ*)
|
||||
unit=${i#ttyCZ}
|
||||
major=73
|
||||
minor=$(($unit * 64))
|
||||
eminor=$(($minor + 64))
|
||||
while [ $minor -lt $eminor ]; do
|
||||
if [ $minor -lt 10 ]; then
|
||||
nminor=000$minor
|
||||
elif [ $minor -lt 100 ]; then
|
||||
nminor=00$minor
|
||||
elif [ $minor -lt 1000 ]; then
|
||||
nminor=0$minor
|
||||
else
|
||||
nminor=$minor
|
||||
fi
|
||||
rm -f ttyCZ$nminor dtyCZ$nminor
|
||||
mknod ttyCZ$nminor c $major $(($minor + $dialin ))
|
||||
mknod dtyCZ$nminor c $major $(($minor + $dialout ))
|
||||
chown uucp.wheel ttyCZ$nminor dtyCZ$nminor
|
||||
chmod 600 ttyCZ$nminor dtyCZ$nminor
|
||||
minor=$(($minor + 1))
|
||||
done
|
||||
;;
|
||||
|
||||
com*|tty*) # (XXX -- com should die)
|
||||
ounit=${i#???}
|
||||
ounit=$(($ounit + 0))
|
||||
|
|
Loading…
Reference in New Issue