LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Building kernel modules problems (https://www.linuxquestions.org/questions/fedora-35/building-kernel-modules-problems-511537/)

drystan2005 12-18-2006 03:29 AM

Building kernel modules problems
 
Hiya I am trying to build a Kernel driver for a WinTV nova card but am getting this output from thr build process !

[root@localhost v4l-dvb-20060717.tar.gz_FILES]# make
make -C /home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l
make[1]: Entering directory `/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l'
scripts/make_makefile.pl /lib/modules/2.6.18-1.2849.fc6/build
File not found: /lib/modules/2.6.18-1.2849.fc6/build/include/linux/config.h at ./scripts/make_kconfig.pl line 27.
make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'. Stop.
make[1]: Leaving directory `/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l'
make: *** [all] Error 2
[root@localhost v4l-dvb-20060717.tar.gz_FILES]#

Linux localhost.localdomain 2.6.18-1.2849.fc6 #1 SMP Fri Nov 10 12:34:46 EST 2006 x86_64 x86_64 x86_64 GNU/Linux

The kernel devlop package is installed so I am at a loss about this I have the same error from madwifi package as well

Many Thanks

Andrew Benton 12-18-2006 04:17 AM

Quote:

File not found: /lib/modules/2.6.18-1.2849.fc6/build/include/linux/config.h
Copy your kernel .config into the kernel source and run make

drystan2005 12-18-2006 07:39 AM

ok I copied the kernel config from the /boot dir to /usr/src/kernels/2.6.18-1.2849.fc6-x86_64 and reran 'make'

make -C /lib/modules/2.6.18-1.2849.fc6/build SUBDIRS=/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l modules
make[2]: Entering directory `/usr/src/kernels/2.6.18-1.2849.fc6-x86_64'
CC [M] /home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.o
In file included from /home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/compat.h:13,
from /home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttvp.h:28,
from /home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.c:37:
/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/config-compat.h:4:26: error: linux/config.h: No such file or directory
/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.c: In function 'bttv_register_video':
/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.c:3964: error: void value not ignored as it ought to be
/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.c: In function 'bttv_probe':
/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.c:4074: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.c:4086: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
make[3]: *** [/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/bttv-driver.o] Error 1
make[2]: *** [_module_/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.18-1.2849.fc6-x86_64'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l'
make: *** [all] Error 2

still some problems what is this config.h file for ?

Andrew Benton 12-18-2006 09:37 AM

Quote:

Originally Posted by drystan2005
still some problems what is this config.h file for ?

It contains more or less the same info as the .config file you copied from /boot.
Quote:

/home/mythTV/Desktop/v4l-dvb-20060717.tar.gz_FILES/v4l/config-compat.h:4:26: error: linux/config.h: No such file or directory
Your new error message makes no sense to me, it looks like whatever you're trying to compile expects the kernel's config.h file to be installed in /usr/include/linux, which is bonkers. Which WinTV nova card have you got? What chipset does it have, or. to put that another way, what does lspci say about it?

jcliburn 12-22-2006 09:08 PM

Create an empty config.h file in <kernel-source-dir>/include/linux. Just

touch /usr/src/kernels/2.6.18-1.2849.fc6-x86_64/include/linux/config.h

Then retry your make.


All times are GMT -5. The time now is 08:41 AM.