Guest User

Untitled

a guest
Apr 2nd, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. #
  2. #!/bin/csh
  3.  
  4. echo "EXAR Multiport Make Node Utility for Exar's PCI Family of UARTs"
  5. set MAXPORTS = 32
  6.  
  7. echo -n "Please input Device Major Number (Default = 30)"
  8. set MAJOR = $<
  9. if ($MAJOR == "") set MAJOR = 30
  10.  
  11. echo -n "Please input Callout Device Major Number (Default = 35)"
  12. set CUMAJOR = $<
  13. if ($CUMAJOR == "") set CUMAJOR = 30
  14.  
  15. echo -n "Please input total number of ports (UART channels) for all boards (Default = 8) "
  16. set PORTS = $<
  17. if (($PORTS == "") || ($PORTS > $MAXPORTS)) set PORTS = 8
  18.  
  19. rm -f /dev/exar
  20. echo "Creating new nodes for ports from Exar Board(s)"
  21. mknod /dev/exar c $MAJOR 32
  22. chmod a+wx /dev/exar
  23.  
  24. echo `ls -al /dev | grep exar`
  25. set port = 0
  26. while ( ($port < $PORTS) )
  27. rm -f /dev/ttyM$port
  28. rm -f /dev/cum$port
  29.  
  30. echo /dev/ttyM$port /dev/cum$port $port
  31. mknod /dev/ttyM$port c $MAJOR $port
  32. mknod /dev/cum$port c $CUMAJOR $port
  33.  
  34. chmod a+wx /dev/ttyM$port
  35. chmod a+wx /dev/cum$port
  36.  
  37. @ port = ($port + 1)
  38.  
  39. end
Advertisement
Add Comment
Please, Sign In to add comment