Compiling a module separately without compiling entire kernel
I just compiled a 2.6.26 kernel and installed on my Debian etch system.
Now I just realized that I need one more module in the kernel. I can get the module by copying a file called testlpp.c in the usr/src/linux/drivers/char/ directory and then compiling it. The module is called LPPTEST. Basically there is the PREEMPT_RT patch that gives this module. How can I just compile this module and install it without compiling the entire kernel? I have copied the file testlpp.c in the drivers/char/ directory. Thanks |
Tried 'make M=drivers/char/'?
|
Quote:
I have uploaded the file lpptest.c here. Thanks. |
Put your driver source in a separate directory, including any .h files that go with it (usually you won't get away with just a .c file) and make it with this makefile (which you can copy into a file named Makefile).
Code:
obj-m := lpptest.o After making it, just copy it into the directory you want it in, then you can insert it into the kernel. |
Quote:
Thanks for your input. Does the line Code:
KDIR := /lib/modules/$(shell uname -r)/build |
Of course.
|
Quote:
Code:
debian:/usr/src/lpptest# make I have uploaded the irq.h file here. |
Will the module load into the kernel? Try insmod.
|
Quote:
|
All times are GMT -5. The time now is 01:57 AM. |