cleaned up, added support for various devices. hacked, from patch 135
This commit is contained in:
parent
5220c82b50
commit
14f7e1974f
@ -22,6 +22,7 @@
|
||||
# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
|
||||
#
|
||||
# Device "make" file. Valid arguments:
|
||||
# all makes all known devices, standard number of units (or close)
|
||||
# std standard devices
|
||||
# local configuration specific devices
|
||||
#
|
||||
@ -43,6 +44,7 @@
|
||||
#
|
||||
# Terminal ports:
|
||||
# com* standard PC COM ports
|
||||
# tty* alias for PC COM ports, this is what the system really wants
|
||||
#
|
||||
# Pseudo terminals:
|
||||
# pty* set of 16 master and slave pseudo terminals
|
||||
@ -55,6 +57,8 @@
|
||||
#
|
||||
# Special purpose devices:
|
||||
# bpf* packet filter
|
||||
# speaker pc speaker
|
||||
# dcf* dcf clock
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin/:/usr/bin
|
||||
@ -63,12 +67,16 @@ for i
|
||||
do
|
||||
case $i in
|
||||
|
||||
all)
|
||||
sh MAKEDEV std wt0 fd0 fd1 wd0 wd1 sd0 sd1 tty0 tty1 pty0 st0
|
||||
sh MAKEDEV ch0 cd0 lpt0 lpt1 lpt2 lpa0 lpa1 lpa2 speaker
|
||||
|
||||
std)
|
||||
rm -f console drum mem kmem null tty klog stdin stdout stderr
|
||||
mknod console c 0 0
|
||||
mknod drum c 4 0 ; chmod 640 drum ; chgrp kmem drum
|
||||
mknod kmem c 2 1 ; chmod 640 kmem ; chgrp kmem kmem
|
||||
mknod mem c 2 0 ; chmod 640 mem ; chgrp kmem mem
|
||||
mknod mem c 2 0 ; chmod 640 mem ; chgrp kmem mem
|
||||
mknod null c 2 2 ; chmod 666 null
|
||||
mknod tty c 1 0 ; chmod 666 tty
|
||||
mknod klog c 7 0 ; chmod 600 klog
|
||||
@ -88,18 +96,19 @@ std)
|
||||
|
||||
wt*)
|
||||
umask 2
|
||||
mknod wt0 b 3 0
|
||||
mknod rwt0 c 10 0
|
||||
rm -f wt0 rwt0
|
||||
mknod wt0 b 3 0; chown root.operator wt0
|
||||
mknod rwt0 c 10 0; chown root.operator rwt0
|
||||
umask 77
|
||||
;;
|
||||
|
||||
fd*|wd*|as*|sd*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
case $i in
|
||||
# as*) name=as; blk=4; chr=13;;
|
||||
fd*) name=fd; blk=2; chr=9;;
|
||||
wd*) name=wd; blk=0; chr=3;;
|
||||
as*) name=as; blk=4; chr=13;;
|
||||
sd*) name=sd; blk=4; chr=13;;
|
||||
wd*) name=wd; blk=0; chr=3;;
|
||||
esac
|
||||
rm -f $name$unit? r$name$unit?
|
||||
case $unit in
|
||||
@ -130,10 +139,12 @@ fd*|wd*|as*|sd*)
|
||||
umask 77
|
||||
;;
|
||||
|
||||
com*)
|
||||
com*|tty*)
|
||||
unit=`expr $i : 'com\(.*\)'`
|
||||
rm -f com$unit
|
||||
mknod com$unit c 8 $unit
|
||||
rm -f com$unit tty0$unit
|
||||
mknod tty0$unit c 8 $unit
|
||||
ln -s tty0$unit com$unit
|
||||
chown uucp.wheel tty0$unit
|
||||
;;
|
||||
|
||||
pty*)
|
||||
@ -152,9 +163,9 @@ pty*)
|
||||
umask 0
|
||||
eval `echo $offset $name | awk ' { b=$1; n=$2 } END {
|
||||
for (i = 0; i < 16; i++)
|
||||
printf("mknod tty%s%x c 5 %d; \
|
||||
mknod pty%s%x c 6 %d; ", \
|
||||
n, i, b+i, n, i, b+i); }'`
|
||||
printf("rm -f tty%s%x; mknod tty%s%x c 5 %d; \
|
||||
rm -f pty%s%x; mknod pty%s%x c 6 %d; ", \
|
||||
n, i, n, i, b+i, n, i, b+i); }'`
|
||||
umask 77
|
||||
if [ $class = 1 ]; then
|
||||
mv ttyqf ttyv0; mv ptyqf ptyv0
|
||||
@ -241,6 +252,7 @@ lpt*)
|
||||
unit=`expr $i : 'lpt\(.*\)'`
|
||||
rm -f lpt$unit
|
||||
mknod lpt$unit c 16 $unit
|
||||
chown root.wheel lpt$unit
|
||||
;;
|
||||
|
||||
# Note: the stock pccons driver does not have a minor for the keyboard
|
||||
@ -254,18 +266,36 @@ vga|vgaco|kbdco)
|
||||
esac
|
||||
rm -f ${name}
|
||||
mknod ${name} c ${chr} ${minor}
|
||||
chown root.wheel $name
|
||||
;;
|
||||
|
||||
bpf*)
|
||||
unit=`expr $i : 'bpf\(.*\)'`
|
||||
rm -f bpf$unit
|
||||
mknod bpf$unit c 23 $unit
|
||||
chown root.wheel bpf$unit
|
||||
;;
|
||||
|
||||
dcf*)
|
||||
unit=`expr $i : 'dcf\(.*\)'`
|
||||
rm -f dcf$unit
|
||||
mknod dcf$unit c 24 $unit
|
||||
chown root.wheel dcf$unit
|
||||
;;
|
||||
|
||||
lpa*)
|
||||
unit=`expr $i : 'lpa\(.*\)'`
|
||||
rm -f lpa$unit
|
||||
mknod lpa$unit c 25 $unit
|
||||
chr=25
|
||||
rm -f lpa$unit lpa${unit}p
|
||||
mknod lpa${unit} c $chr `expr $unit + 0`
|
||||
mknod lpa${unit}p c $chr `expr $unit + 32`
|
||||
chown root.wheel lpa${unit} lpa${unit}p
|
||||
;;
|
||||
|
||||
speaker)
|
||||
rm -f speaker
|
||||
mknod speaker c 27 0
|
||||
chown root.wheel speaker
|
||||
;;
|
||||
|
||||
local)
|
||||
|
Loading…
Reference in New Issue
Block a user