0. Preparation.
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 ([EMAIL PROTECTED])
(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:

kernel-update-tool-0.9-10
kernel-docs-2.6.13-15
kernel-default-2.6.13-15
kernel-source-2.6.13-15
kernel-default-nongpl-2.6.13-15

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

rpm -qa make gcc

make-3.80-188
gcc-4.0.2_20050901-3


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 - 
without errors!

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.



On Thursday 03 November 2005 08:03, Jose Alberto wrote:
> I download pwc driver from http://www.saillard.org/linux/pwc/files/
> it's all the same any of the releases you try... but when i made "make"
> i get this in my terminal (i've got kernel sources installed)
>
> linux:/home/vaneka/Importante/Webcam/pwc-10.0.9-rc1 # make
> make -C /lib/modules/2.6.13-15-smp/source
> SUBDIRS=/home/vaneka/Importante/Webcam/pwc-10.0.9-rc1 modules
> make[1]: Entering directory `/usr/src/linux-2.6.13-15'
> Makefile:494: .config: No existe el fichero o el directorio (File or
> directory doesn't exists)
>
>   WARNING: Symbol version dump /usr/src/linux-2.6.13-15/Module.symvers
>            is missing; modules will have no dependencies and modversions.
>
>   CC [M]  /home/vaneka/Importante/Webcam/pwc-10.0.9-rc1/pwc-if.o
> /bin/sh: scripts/basic/fixdep: No existe el fichero o el directorio
> (File or directory doesn't exists)
> make[2]: *** [/home/vaneka/Importante/Webcam/pwc-10.0.9-rc1/pwc-if.o]
> Error 1
> make[1]: *** [_module_/home/vaneka/Importante/Webcam/pwc-10.0.9-rc1] Error
> 2 make[1]: Leaving directory `/usr/src/linux-2.6.13-15'
> make: *** [default] Error 2
> linux:/home/vaneka/Importante/Webcam/pwc-10.0.9-rc1 #
>
> I cannot install neither versions wich i was able to install in SuSE
> 9.3, 9.2, 9.1.... How can i solve this issue???
> Sorry if i make some mistake 'cause it's the first time i use a mailing
> list.
>
>
> ______________________________________________
> Renovamos el Correo Yahoo!
> Nuevos servicios, más seguridad
> http://correo.yahoo.es
> _______________________________________________
> pwc mailing list
> [email protected]
> http://lists.saillard.org/mailman/listinfo/pwc

-- 

Peter Van den Wildenbergh
meta-logica
_______________________________________________
pwc mailing list
[email protected]
http://lists.saillard.org/mailman/listinfo/pwc

Reply via email to