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...
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.
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 :)