Linux Wacom Project HOWTO
12.7 - Building wacom driver On Fedora Core 3
Navigation:
MAIN UP PREV NEXT INDEX ALL
The following documentation for building wacom kernel modules and x.org
driver on Fedora Core 3 was written by Paul Duffy. If you have any problems
or questions, go ahead and post them to the list, or send email to me directly.
If I cannot provide a satisfactory answer, I'll forward your email on to Paul.
Copyright (C) 2005 Paul Duffy
Procedure for building linuxwacom package on Fedora Core 3 with 2.6 series
kernel. These instructions are current as of May 23, 2005.
There are several reasons why FC3 is different. The two main reasons
being:
- evdev, hid-core and mousedev are compiled into the kernel core so you can't
just recompile them as modules.
- the Fedora Core kernel is heavily patched, which I don't mind as it means my
Creative Live! Drive II works, but it does mean that compiling the kernel
from www.kernel.org may lose you some hardware support.
Additionally, Red Hat no longer supply a simple linux-source rpm so if you
want the official kernel source for Fedora Core 3 you're going to have to use
the source RPM.
At this stage, I am assuming that you have a fully updated system and are
using kernel 2.6.11-1.14_FC3
What you will need:
At this stage you're going to need all of the development packages required to
compile the kernel (gcc, automake, etc) and the xorg-x11-sdk package
installed (under Development >> X Software Development). If you're unsure
where this all is, you can select the hat menu in KDE or Gnome and you want
to select System Settings >> Add/Remove Applications.
If you're unsure as to exactly what you need to install, install everything
(except gcc-java, it causes problems with Sun or IBM java installs) assuming
you have the hard drive space.
Also the vast majority of this will require you to be in SuperUser mode so you
might as well 'su' from the start; not normally advice I'd be giving anyone
but it's kinda necessary in this case.
You have two choices for the first step; you can either download the kernel
SRPM from one of the mirrors at
http://fedora.redhat.com/download/mirrors.html where you can find the correct
package as updates/3/SRPMS/kernel-2.6.11-1.14_FC3.src.rpm and install it
with
rpm -ivh kernel-2.6.11-1.14_FC3.src.rpm
or you can use
up2date --get-source kernel
Either method should leave you with a lot of files in /usr/src/redhat/SOURCES
and the file /usr/src/redhat/SPECS/kernel-2.6.spec
At this stage, don't worry about all the files starting linux-2.6.9... the
main file you are looking for is linux-2.6.11.tar.bz2. As long as that's
there you should be fine.
Now, to actually get all the kernel sources setup in a compilable form you
need to run the command
rpmbuild -bp --target= /usr/src/redhat/SPECS/kernel-2.6.spec
If you don't know what is, run the command
uname -m
and it should tell you.
Of course, it should be noted at this point that if my architecture is i686
and I select that, what will actually be installed is the source
configuration for i386 and above so if you're still not sure but you know you
can run Windows then --target=i386 is a safe default.
After everything has been setup the rpmbuild will have applied all the
standard patches and setup a default configuration so the only reason to run
'make config', or 'make xconfig', is to change something from the default.
Having said this, I like to run 'make xconfig' to alter the selected chip the
kernel is going to compile for as it defaults to compiling for i386 whereas
anyone with a reasonably recent chip (Athlon, Pentium III even) is going to
want something a bit more advanced.
So, the first thing you want to do, if you want most add-on modules to find
the kernel source without adding a really long command-line parameter, is to
add a symbolic link to the source directory.
cd /usr/src
ln -s redhat/BUILD/kernel-2.6.11/linux-2.6.11 linux
So now everything can find the current kernel source in /usr/src/linux
cd linux
make xconfig
select 'Processor type and features' and change 'Processor family' from 386 to
whatever it is you're running.
If you make a mistake and you don't know what you've done you can always close
the program and select 'Discard changes' and start again.
Otherwise, click on the floppy disk icon to save and exit safe in the
knowledge that you're not compiling for a CPU that doesn't even have a
floating point unit.
OK, so by now you should have the basic kernel source setup and available
in /usr/src/linux and, due to the setup of the default kernel, we can't just
recompile a few modules, we have to recompile the whole kernel.
So at this stage, we're just about where we'd like to be if we wanted to
compile the kernel as it is, with no support for the Intuos3 or any of the
Cintix range but if you've got an AthlonXP or a Pentium 4 you might get a
little bit more performance out of it.
We now want to be getting the latest linuxwacom-0.6.8.tar.bz2 You may want to
setup your own arrangement for wherever you want it but your home directory
should be fine and...
tar jxvf linuxwacom-0.6.8.tar.bz2
cd linuxwacom-0.6.8
...and you're in the source directory for the code that enables proper Wacom
support.
Now we need to copy just four files, usbmouse.c has been deprecated in favour
of hid-core.c and can be safely ignored, also we don't need to do anything to
input.c. Now we copy all the necessary source files.
cd src/2.6.11
cp evdev.c mousedev.c /usr/src/linux/drivers/input/
cp hid-core.c wacom.c /usr/src/linux/drivers/usb/input/
Now, with the manual patching done everything should work and, unless I've
somehow missed a stage, everything should compile just fine.
cd /usr/src/linux
make all
Now, this is going to take a while, especially if your system's a bit aold
like mine so now would be a good time to get some tea, coffee, go down the
corner shop or have lunch.
Assuming there have been no errors, everything should now be compiled.
make modules_install
make install
You need to install the modules first or 'make install' will quit, complaining
about there being no '/lib/modules/2.6.11-prep' and sulk in the corner.
After all this, there's still one last thing you need to do and that's make
this new kernel the default on boot. You will need to
edit /boot/grub/menu.lst and change the 'default' value from 1 to 0.
Those of you with nVidia and other such graphics cards who like their 3D
acceleration will need to reinstall the drivers before X Windows will work.
As it is, on reboot you will need to change the boot parameters. When Grub
comes up, press a to alter the boot parameters. It is advisable at this stage
to remove 'rhgb' as, one of the effects of running the Red Hat Graphical Boot
is that if you want a change in the xorg.conf file to take effect you have to
reboot the entire system and this just gets to be a PITA when you're trying
to configure something. Then add '3' (without quotes) to the end of the line
to make FC3 boot to the command line.
Right, so by now we should have the kernel set up to recognise whatever tablet
you have properly. We can check this.
cat /proc/bus/usb/devices
should give you a readout of every device on your usb system and we're looking
for the line which includes Vendor=056a
With my Intuos 3 I have ProdID 00b1, manufacturer is listed as 'Tablet' and
Product is listed as PTZ-630 although this may differ depending on which
tablet you have and what size it is.
The most important line is the one beginning with I: which should end with
'Driver=wacom'.
If this is that case, congratulations, your kernel is now fully set up to
recgonise your tablet :o)
Now, to get it running with X Windows we need to update the wacom_drv driver
and this, in itself is going to be different as the configuration script will
not know where to find your x11 SDK and so will efuse to compile the driver.
The xorg SDK in the case of FC3 is located in /usr/X11R6/lib/Server and we can
tell the configuration script this
./configure --with-xorg-sdk=/usr/X11R6/lib/Server
should do the trick and
make install
should compile and install the module in the appropriate place.
After all this is done, now all you need to do is setup the configuration
in /etc/X11 xorg.conf
The ServerLayout section is at the start of the configuration file and, as an
example, mine looks like this:
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "eraser" "SendCoreEvents"
InputDevice "stylus" "SendCoreEvents"
EndSection
Where Mouse3 and Mouse5 are the identifiers for the pen and eraser.
My InputDevice sections look like this:
Section "InputDevice"
Identifier "eraser"
Driver "wacom"
# Option "TopX" "0"
# Option "TopY" "0"
# Option "BottomX" "1600"
# Option "BottomY" "1200"
Option "Device" "/dev/input/event3"
Option "Type" "eraser"
Option "USB" "On"
EndSection
Section "InputDevice"
Identifier "stylus"
Driver "wacom"
# Option "TopX" "0"
# Option "TopY" "0"
# Option "BottomX" "1600"
# Option "BottomY" "1200"
Option "Device" "/dev/input/event3"
Option "Type" "stylus"
Option "USB" "On"
EndSection
It's important to note, at this point, that the TopX/Y and BottomX/Y options
are not actually necessary unless you have problem with the detection of the
tablet as all the lpi information is included in the source code for the
wacom module so it's perfectly safe to leave these out if you don't know what
the values should be.
Also note, that at this stage I still don't have /dev/input/wacom and the
tablet appears on /dev/input/event3
If you're unsure as to which device your tablet is using, then wacdump should
be able to find it. It is, to be honest, a bit trial and error but you'll
know when you've found it as the readout will look like this:
wacdump v0.5.2
MODEL=Wacom Intuos3 6x8 ROM=1.0-2
CLS=USB VNDR=Wacom DEV=Intuos3 SUB=PTZ-630
TOOLTYPE=NONE IN_PROX=+00000 (+00000 .. +00000)
BUTTON=+00000 (+00000 .. +00000) POS_X=+00000 (+00000 .. +40640)
POS_Y=+00000 (+00000 .. +30480) ROT_Z=+00000 (-00900 .. +00899)
DISTANCE=+00000 (+00000 .. +00015) PRESSURE=+00000 (+00000 .. +01023)
TILT_X=+00000 (+00000 .. +00127) TILT_Y=+00000 (+00000 .. +00127)
ABSWHEEL=+00000 (+00000 .. +01023) RELWHEEL=+00000 (-00001 .. +00001)
THROTTLE=+00000 (-01023 .. +01023)
LEFT= MIDDLE= RIGHT= EXTRA=
SIDE= TOUCH= STYLUS= STYLUS2=
Once you've setup all the configuration with the correct input device execute
init 5; exit
and you should find yourself in X with a fully working graphics tablet.
Instructions for configuring GIMP 2.2 are the same as in the official HowTo.
Good luck.
regards, Paul
Navigation:
MAIN UP PREV NEXT INDEX ALL