Messages in this thread | | | From | Anil Kumar S R <> | Subject | Re: Compiling device drivers | Date | Thu, 2 Dec 1999 17:30:37 +0530 |
| |
Hi, 1. Use #insmod -f driver.o This is used to force the module insertion even if there is a kernel version mismatch.
2. The best way would be, In the Makefile for the driver at the version dependencies include the header file /linux/version.h So while compilation it will take whatever kernel version is available in /linux/version.h In /linux/Version.h #define UTS_RELEASE "version Num" In /linux/module.h #ifndef __NO_VERSION__ "kernel_version=" UTS_RELEASE; #endif
and finally as linux/module.h is included in your driver it will take the version whatever is in /linux/version.h
3.(not sure) Try In the driver code itself #define __NO_VERSION__ char kernel_version [] = UTS_RELEASE; #endif
bye Anil
On 2 Dec 1999, S . Arun wrote:
> > Hi folks! > > I would like to know how to set the kernel version number when compiling a > device driver. I get the following error when I try to insert the module: > > # insmod driver.o > driver.o: couldn't find the kernel version the module was compiled for > > Can anybody please help > > Thanks in advance > S. Arun > > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.rutgers.edu > Please read the FAQ at http://www.tux.org/lkml/ > > >
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |