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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-01-2011 #1
- Join Date
- Dec 2006
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...
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
make: entering directory `usr/src/linux-2.6.22` make: *** No rule to make target `module`. Stop. make: Leaving directory `/usr/src/linux-2.6.22` make: *** [all] Error 2
Thanks for reading
Last edited by aatwo; 08-01-2011 at 01:14 PM.
- 08-05-2011 #2
- Join Date
- Jul 2011
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 04:38 PM. Reason: removed spam redirect