Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/etc.hp300 Update MD entries for DCA, DCM and APCI serial...



details:   https://anonhg.NetBSD.org/src/rev/e6865d758c87
branches:  trunk
changeset: 555584:e6865d758c87
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Nov 22 17:20:08 2003 +0000

description:
Update MD entries for DCA, DCM and APCI serial ports to migrate MI com(4):
- use ttyC[0123] for DCA and APCI with MI com(4)
- use ttyM[0-f] for DCM instead of tty0[0-f] to avoid confusion with MI com(4)
- create the foloowing symlnks to compatibility:
 tty0  -> ttyC0 (for DCA)
 ttya0 -> ttyC1 (for APCI)
 ttya1 -> ttyC2 (for APCI)
 ttya2 -> ttyC3 (for APCI)
 tty0? -> ttyM? (for DCM)
- note the above symlinks should be removed after the next release

As per discussion on recent port-hp300 (ok'ed by thorpej).

diffstat:

 etc/etc.hp300/MAKEDEV.conf |  134 +++++++++++++++++++++++++++++---------------
 1 files changed, 88 insertions(+), 46 deletions(-)

diffs (159 lines):

diff -r c8e36e599102 -r e6865d758c87 etc/etc.hp300/MAKEDEV.conf
--- a/etc/etc.hp300/MAKEDEV.conf        Sat Nov 22 17:17:55 2003 +0000
+++ b/etc/etc.hp300/MAKEDEV.conf        Sat Nov 22 17:20:08 2003 +0000
@@ -1,12 +1,18 @@
-#      $NetBSD: MAKEDEV.conf,v 1.5 2003/11/01 19:02:54 he Exp $
+#      $NetBSD: MAKEDEV.conf,v 1.6 2003/11/22 17:20:08 tsutsui Exp $
 
 all_md)
        makedev ct0 ct1 rd0 rd1 rd2
 #      makedev wscons # should be after 'std'
        makedev sd0 sd1 sd2 cd0 cd1 st0 st1 ch0
-       makedev hil grf0 ite0 dca0 dcm0 dcm1 dcm2 dcm3 apci0
+       makedev hil grf0 ite0
+       makedev ttyC0 ttyC1 ttyC2 ttyC3
+       makedev ttyM0 ttyM1 ttyM2 ttyM3 ttyM4 ttyM5 ttyM6 ttyM7
+       makedev ttyM8 ttyM9 ttyMa ttyMb ttyMc ttyMd ttyMe ttyMf
        makedev scsibus0 scsibus1 scsibus2 scsibus3
        makedev ss0 uk0 uk1
+# Create symlinks for compatibility with old devices.
+# These entries should be removed after 2.0-release.
+       makedev dca0 dcm0 dcm1 dcm2 dcm3 apci0
        ;;
 
 ct*)
@@ -53,50 +59,6 @@
        esac
        ;;
 
-dca*)
-       # XXX What about dca cards?
-       unit=${i#dca}
-       case $unit in
-       0)
-               rm -f tty0
-               mknod tty0 c 12 0
-               ;;
-       *)
-               echo bad unit for dca in: $i
-               ;;
-       esac
-       ;;
-
-dcm*)
-       unit=${i#dcm}
-       case $unit in
-       0|1|2|3)
-               eval `echo $unit | awk ' { unit = $1; u = 4 * $1 } END {
-               for (i = 0; i < 4; i++)
-               printf("rm -f tty0%x; mknod tty0%x c 15 %d; ",u+i,u+i,u+i); }'`
-               ;;
-       *)
-               echo bad unit for dcm in: $i
-               ;;
-       esac
-       ;;
-
-apci*)
-       # There exists only one Frodo ASIC per HP9000/400 SPU.
-       unit=${i#apci}
-       case $unit in
-       0)
-               for i in 0 1 2 3; do
-                       rm -f ttya${i};
-                       mknod ttya${i} c 31 ${i}
-               done
-               ;;
-       *)
-               echo bad unit for apci in: $i
-               ;;
-       esac
-       ;;
-
 hil)
        for unit in 0 1 2 3 4 5 6 7
        do
@@ -135,3 +97,83 @@
        name=rd; unit=${i#rd}; blk=2; chr=9
        %MKDISK% $name $unit $blk $chr
        ;;
+
+ttyM*)
+       unit=${i#????}
+       case $unit in
+       [0-9])  i=$unit ;;
+       a)      i=10 ;;
+       b)      i=11 ;;
+       c)      i=12 ;;
+       d)      i=13 ;;
+       e)      i=14 ;;
+       f)      i=15 ;;
+       *)      i=-1 ;;
+       esac
+       if [ $i = -1 ]
+       then
+               echo bad unit for ttyM in: $unit
+               break
+       fi
+       rm -f ttyM$unit
+       mknod ttyM$unit c 15 $i
+       chown uucp ttyM$unit
+       ;;
+
+# Create symlinks for compatibility with old devices.
+# The following entries should be removed after 2.0-release.
+dca*)
+       # old MAKEDEV creates only tty0 for dca
+       unit=${i#dca}
+       case $unit in
+       0)
+               rm -f tty0
+               ln -fs ttyC0 tty0
+               ;;
+       *)
+               echo bad unit for dca in: $i
+               ;;
+       esac
+       ;;
+
+dcm*)
+       unit=${i#dcm}
+       case $unit in
+       0|1|2|3)
+               for n in 0 1 2 3; do
+                       in=$(($unit * 4 + $n))
+                       case $in in
+                       [0-9])  i=$in ;;
+                       10)     i=a ;;
+                       11)     i=b ;;
+                       12)     i=c ;;
+                       13)     i=d ;;
+                       14)     i=e ;;
+                       15)     i=f ;;
+                       esac
+                       rm -f tty0${i};
+                       ln -sf ttyM${i} tty0${i}
+               done
+               ;;
+       *)
+               echo bad unit for dcm in: $i
+               ;;
+       esac
+       ;;
+
+apci*)
+       # There exists only one Frodo ASIC per HP9000/400 SPU.
+       unit=${i#apci}
+       case $unit in
+       0)
+               for i in 0 1 2; do
+                       rm -f ttya${i};
+                       ln -sf ttyC$(($i + 1)) ttya${i}
+               done
+               ;;
+       *)
+               echo bad unit for apci in: $i
+               ;;
+       esac
+       ;;
+# end of entries for compatibility with old devices



Home | Main Index | Thread Index | Old Index