File:  [NetBSD Developer Wiki] / wikisrc / users / rkujawa / notes.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Mon Jul 30 00:46:56 2012 UTC (9 years, 1 month ago) by rkujawa
Branches: MAIN
CVS tags: HEAD
Add my notes on using the NetBSD. Hopefully the will be helpful for users.

    1: # Using multipie wsdisplay devices
    2: 
    3: Using a machine with single graphics card is trivial and well documented.
    4: However, once second graphics card is installed, additional wsdisplay device
    5: is detected by the kernel. But how to use it? By default screen will be
    6: added only on device used as a console:
    7: 
    8: 	$ dmesg | grep ^ws
    9: 	wsdisplay1 at tdvfb0 kbdmux 1
   10: 	wsmux1: connecting to wsdisplay1
   11: 	wsdisplay0 at r128fb0 kbdmux 1: console (default, vt100 emulation)
   12: 	wsmux1: connecting to wsdisplay0
   13: 	wskbd0 at ukbd0: console keyboard, using wsdisplay0
   14: 	wsmouse0 at ums0 mux 0
   15: 
   16: In the above example r128fb (wsdisplay0) is used as console.
   17: 
   18: All wsdisplay devices are accessed through <code>/dev/ttyE*</code> files.
   19: Standard installation has only files for a single wsdisplay!
   20: 
   21: First you need to determine which major number is used for wsdisplay:
   22: 
   23: 	$ mknod -l wsdisplay
   24: 	wsdisplay character major 35
   25: 
   26: Device minor numbers for single wsdisplay are 8-bit. So wsdisplay0 occupies
   27: range 0 to 254:
   28: 
   29: 	$ ls -l /dev/ttyE*
   30: 	crw-------  1 root  tty    35,   0 Oct  3 00:17 /dev/ttyE0
   31: 	crw-------  1 root  wheel  35,   1 Jul 15  2012 /dev/ttyE1
   32: 	crw-------  1 root  wheel  35,   2 Jul 15  2012 /dev/ttyE2
   33: 	crw-------  1 root  wheel  35,   3 Jul 15  2012 /dev/ttyE3
   34: 	crw-------  1 root  wheel  35,   4 Jul 15  2012 /dev/ttyE4
   35: 	crw-------  1 root  wheel  35,   5 Jul 15  2012 /dev/ttyE5
   36: 	crw-------  1 root  wheel  35,   6 Jul 15  2012 /dev/ttyE6
   37: 	crw-------  1 root  wheel  35,   7 Jul 15  2012 /dev/ttyE7
   38: 	crw-------  1 root  wheel  35, 255 Jul 15  2012 /dev/ttyEcfg
   39: 	crw-------  1 root  wheel  35, 254 Jul 15  2012 /dev/ttyEstat
   40: 
   41: First screen on wsdisplay1 would have minor 256, second would have minor 257,
   42: while cfg device would have 511. So let's create the needed device files:
   43: 
   44: 	# mknod /dev/ttyFcfg c 35 511
   45: 	# mknod /dev/ttyF0 c 35 256
   46: 
   47: Now adding a new screen on wsdisplay1 is as easy as:
   48: 
   49: 	# wsconscfg -f /dev/ttyFcfg 0 
   50: 
   51: Keep in mind that screens have separate numbers per wsdisplay device (so you
   52: will have two screens 0 now).
   53: 
   54: 	# dmesg | tail -n1
   55: 	wsdisplay1: screen 0 added (default)
   56: 
   57: Now that the screen is allocated, you can use it.
   58: 
   59: This information should go into man pages at some point, but currently I don't 
   60: know how to do it in a non-confusing way... Thanks to uwe@ for explaining how 
   61: ttyEcfg are used. 
   62: 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb