Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- #!/bin/csh
- echo "EXAR Multiport Make Node Utility for Exar's PCI Family of UARTs"
- set MAXPORTS = 32
- echo -n "Please input Device Major Number (Default = 30)"
- set MAJOR = $<
- if ($MAJOR == "") set MAJOR = 30
- echo -n "Please input Callout Device Major Number (Default = 35)"
- set CUMAJOR = $<
- if ($CUMAJOR == "") set CUMAJOR = 30
- echo -n "Please input total number of ports (UART channels) for all boards (Default = 8) "
- set PORTS = $<
- if (($PORTS == "") || ($PORTS > $MAXPORTS)) set PORTS = 8
- rm -f /dev/exar
- echo "Creating new nodes for ports from Exar Board(s)"
- mknod /dev/exar c $MAJOR 32
- chmod a+wx /dev/exar
- echo `ls -al /dev | grep exar`
- set port = 0
- while ( ($port < $PORTS) )
- rm -f /dev/ttyM$port
- rm -f /dev/cum$port
- echo /dev/ttyM$port /dev/cum$port $port
- mknod /dev/ttyM$port c $MAJOR $port
- mknod /dev/cum$port c $CUMAJOR $port
- chmod a+wx /dev/ttyM$port
- chmod a+wx /dev/cum$port
- @ port = ($port + 1)
- end
Advertisement
Add Comment
Please, Sign In to add comment