Several files need to be modified to make the kernel aware of wstablet: ------------------ sys/dev/DEVNAMES: wstablet MI wstabletdev MI Attribute ------------------ sys/conf/files: define wstabletdev {[mux = 0]} ------------------ sys/arch/i386/conf/majors.i386 device-major wstablet char 108 wstablet ======================================================================== To actually building the kernel: copy over any wscons files that have been updated: # cd /usr/src/sys/dev/wscons # cp /usr/gsoc/wscons/code/ ./ ------------------ config the kernel, then build: # cd ../../arch/i386/conf # config WSTABLET # cd ../compile/WSTABLET # make depend # make 2>fix_me or all at once: cd /usr/src/sys/arch/i386/conf && config WSTABLET && \ cd ../compile/WSTABLET && make depend && make 2>fix_me ------------------ now copy over the new kernel: # cp netbsd /wstablet_rX reboot and test! ======================================================================== to actually get output.. we need a character device in /dev thus.. we need to modify the /dev/MAKEDEV script we'll then need to run: cd /dev && ./MAKEDEV wstablet here's the MAKEDEV diff: Index: MAKEDEV =================================================================== RCS file: /cvsroot/netbsd-soc/wscons/tests/dev/MAKEDEV,v retrieving revision 1.1 diff -u -p -r1.1 MAKEDEV --- MAKEDEV 15 Aug 2008 00:17:38 -0000 1.1 +++ MAKEDEV 15 Aug 2008 00:22:38 -0000 @@ -667,9 +667,10 @@ ugen*) wscons) makedev ttyE0 ttyE1 ttyE2 ttyE3 ttyE4 ttyE5 ttyE6 ttyE7 makedev wsmouse0 wsmouse1 wsmouse2 wsmouse3 + makedev wstablet0 wstablet1 wstablet2 wstablet3 makedev wskbd0 wskbd1 wskbd2 wskbd3 makedev wsmux0 wsmux1 wsmux2 wsmux3 - makedev wsmouse wskbd + makedev wsmouse wstablet wskbd makedev ttyEcfg ttyEstat makedev wsfont ;; @@ -678,6 +679,10 @@ wsmouse) mkdev wsmouse c 65 0 ;; +wstablet) + mkdev wstablet c 65 0 + ;; + wskbd) mkdev wskbd c 65 1 ;; @@ -718,6 +723,10 @@ wsmouse*) mkdev wsmouse$unit c 49 $unit ;; +wstablet*) + unit=${i#wstablet} + mkdev wstablet$unit c 108 $unit + ;; wskbd*) unit=${i#wskbd} mkdev wskbd$unit c 48 $unit ======================================================================== if wstablet was compiled with WST_DEBUG enabled, values for x/y/etc (sent to wstablet_input) will be printed to the console. to see any of this, we need a read() on the device: tail -f /dev/wstablet will work well. Happy hacking!