Compiling linuxwacom

Information archived from http://azure.livejournal.com/30712.html

Download

http://prdownloads.sourceforge.net/linuxwacom/linuxwacom-0.8.2.tar.bz2

OpenBSD patch

Build

# bunzip2 linuxwacom-0.8.2.tar.bz2 && tar xvf linuxwacom-0.8.2.tar
# cd linuxwacom-0.8.2
# patch -p0 < patch-src_xdrv_xf86Wacom_c
# ./configure
# gmake && gmake install

Modifying the Running Kernel to Recognize the X41's Serial Tablet

Because the Wacom hardware in most Tablet PCs utilizes non-standard serial configurations, it is necessary to modify the OpenBSD kernel to detect the X41's Wacom Penabled tablet:

# mv /bsd /bsd.old
# config -o /bsd -e /bsd.old
OpenBSD 4.4 (GENERIC) #1021: Tue Aug 12 17:16:55 MDT 2008
  deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
Enter 'help' for information
ukc> change com
  227 com0 at isa0 port 0x3f8 size 0 iomem -1 iosiz 0 irq 4 drq -1 drq2 -1 flags 0x0
  change [n] y
  port [0x3f8] ? 0x200
  size [0] ?
  iomem [-1] ?
  iosiz [0] ?
  irq [4] ? 5
  drq [-1] ?
  drq2 [-1] ?
  flags [0] ?
  227 com0 changed
  227 com0 at isa0 port 0x200 size 0 iomem -1 iosiz 0 irq 5 drq -1 drq2 -1 flags 0x0
  228 com1 at isa0 port 0x2f8 size 0 iomem -1 iosiz 0 irq 3 drq -1 drq2 -1 flags 0x0
  change [n]
  229 com2 at isa0 port 0x3e8 size 0 iomem -1 iosiz 0 irq 5 drq -1 drq2 -1 flags 0x0
  change [n]
  230 com* at ast0 slave -1 flags 0x0
  change [n]
  231 com* at pcmcia* function -1 irq -1 flags 0x0
  change [n]
  232 com* at isapnp0 port -1 size 0 iomem -1 iosiz 0 irq -1 drq -1 flags 0x0
  change [n]
  233 com* at puc* port -1 flags 0x0
  change [n]
  234 com* at cardbus* dev -1 function -1 flags 0x0
  change [n]
ukc> quit
  Saving modified kernel.

Upon reboot your system should detect the com0 device:

com0 at isa0 port 0x200/8 irq 5: ns16550a, 16 byte fifo

Xorg Configuration

xorg.conf

Add the following to enable the stylus:

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "cursor" "SendCoreEvents"
        InputDevice    "stylus" "SendCoreEvents"
EndSection
Section "InputDevice"
      Driver        "wacom"
      Identifier    "cursor"
      Option        "Device"        "/dev/tty00"
      Option        "Type"          "cursor"    
      Option        "ForceDevice"   "ISDV4" 
      Option        "Mode"          "Absolute"
      Option        "TPCButton"     "on"      
      Option        "DebugLevel" "10"       # be very verbose
EndSection
Section "InputDevice"
      Driver        "wacom"
      Identifier    "stylus"
      Option        "Device"        "/dev/tty00"
      Option        "Type"          "stylus"    
      Option        "ForceDevice"   "ISDV4" 
      Option        "DebugLevel" "10"       # be very verbose
EndSection

xsession

Add the following to enable the tablet buttons:

xmodmap -e "keycode 206 = Down"
xmodmap -e "keycode 205 = Up"
xmodmap -e "keycode 200 = Return"
xmodmap -e "keycode 203 = Escape"