Results 1 to 2 of 2
Hey guys. I am looking to play around with some kernel modules for some MPT drivers to see if I can slightly alter their functionality, just to try and learn ...
- 08-01-2011 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 8
recompiling module without recompiling kernel
Hey guys. I am looking to play around with some kernel modules for some MPT drivers to see if I can slightly alter their functionality, just to try and learn a bit more about them.
I am facing a bit of a problem straight out of the gate though, and I am unable to recompile these modules without recompiling the whole kernel, which is a 2+ hour job for my super slow PC
So does anyone know how to compile specific module without recompiling a whole Kernel?
Extra info that might help:
The module I am playing around with is called mptbase, located in /usr/src/linux-2.6.22/drivers/message/fusion/ and the related file in this directory are mptbase.o, mptbase.ko (the compiled module), mptbase.c and mptbase.h.
I tried using a guide that suggested the following makefile...
I placed this makefile in a folder on my desktop and ran it but it errored all over the place with the following output...Code:obj-m = mptbase.o all: make -C /lib/modules/2.6.22-3-686/build M=$(PWD) module clean: make -C /lib/modules/2.6.22-3-686/build M=$(PWD) clean
I have also tried running the makefile in the modules directory but that errored everywhere too.Code:make[1]: entering directory `usr/src/linux-2.6.22` make[1]: *** No rule to make target `module`. Stop. make[1]: Leaving directory `/usr/src/linux-2.6.22` make: *** [all] Error 2
Thanks for reading
Last edited by aatwo; 08-01-2011 at 12:14 PM.
- 08-05-2011 #2Just Joined!
- Join Date
- Jul 2011
- Posts
- 16
you should say 'make -C /lib/modules/2.6.22-3-686/build M=$(PWD) modules', it is modules not module.
First copy the mtpbase.c and mtpbase.h to a directory and write the above make file in that directory and run make.Last edited by oz; 08-09-2011 at 03:38 PM. Reason: removed spam redirect


Reply With Quote
