Novell Home

Compiling Kernel Drivers for SUSE 10 By Example

Novell Cool Solutions: Feature
By Peter Van den Wildenbergh

Digg This - Slashdot This

Posted: 3 Nov 2005

Getting a Logitech Quickam (Zoom) working under SUSE Linux 10

License and Disclaimer

See for the full software and documentation license. Basically, you can copy, redistribute, or modify this "how to," provided that modified versions, if redistributed, are also covered by the OpenContent License. Please e-mail a copy of your modified document to pvdw <@> criticalcontrol <.> com. Use this document at your own risk; it comes with no warranty. See the OpenContent License mentioned above.


Intermediate Linux users and Linux newbies are often turned away from Linux because they can't get a particular driver to work.
If the driver isn't available in a .rpm, things can get complicated, read compiling from source...
On top of that a standard SUSE 10 install requires some upfront steps before a driver can be compiled without errors.


SUSE Linux 10 with kernel
I did only test the below explained procedure on a SUSE 10, but it should work on SUSE 9.x aswell (if you alter the kernel version numbers).


First make sure you have installed the kernel-sources, and the version of the sources is correct.
If you don't know what kernel version is currently installed on your SUSE try:

cat /proc/version

It should come back with something like:

Linux version 2.6.13-15-default (geeko@buildhost)
(gcc version 4.0.2 20050901 (prerelease) (SUSE Linux))
#1 Tue Sep 13 14:56:15 UTC 2005

telling you that you are using version 2.6.13-15-default.

To see if sources are installed you can either startup YaST (software management) or just type:

rpm -qa kernel*

On my system this returns:


Note the line kernel-source.
We also will need make and gcc, test for this the same way:

rpm -qa make gcc


If any of these packages are missing install them using YaST.

Now log in into a root console (superuser) and configure the compile environment to reflect your actual set up.

cd /usr/src/linux
make cloneconfig
make modules_prepare

That last statement should comeback with something like:

  CHK     /usr/src/linux-2.6.13-15/include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.

As with everything with Linux things can be donme in different ways.
The same as above can be achieved by executing the following as root:

cp /usr/src/linux-2.6.13-15-obj/i386/default/.config /usr/src/linux/.config
cp /usr/src/linux-2.6.13-15-obj/i386/default/scripts/mod/modpost /usr/src/linux/scripts/modpost
cp /usr/src/linux-2.6.13-15-obj/i386/default/scripts/genksyms/genksyms /usr/src/linux/scripts/genksyms/genksyms
cp /usr/src/linux-2.6.13-15-obj/i386/default/scripts/basic/fixdep /usr/src/linux/scripts/basic/fixdep
cp /usr/src/linux-2.6.13-15-obj/i386/default/scripts/mod/modpost /usr/src/linux/scripts/mod/modpost

If you don't do these steps chances are big you get a
/bin/sh scripts/basic/fixdep: File not found 

error when trying to compile the driver(s) you need.

To make things complete, you also need to put Module.symvers into the right place.

cp /boot/symvers-2.6.13-15-i386-default.gz /usr/src/linux
mv symvers-2.6.13-15-i386-default.gz Module.symvers.gz
gunzip /usr/src/linux/Module.symvers.gz
make modules_prepare
Whatever approach you use, you are now ready to compile a kernel module.

Note: If you run a YaST update and a new kernel gets installed you might want to download the new kernel sources too, and adjust your compile environment, and recompile the driver(s).

Example: Getting a Logitech Quickam (Zoom) working under SUSE Linux 10

cd /usr/local/src

(take a peek in to see the current release of this driver)

tar xjf pwc-10.0.9-rc1.tar.bz2

cd pwc-10.0.9-rc1
make install
modprobe pwc

Done! Fire up XawTV and start playing.


Additional Documentation Sources:


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© 2014 Novell