On Sun, 9 Jun 2002, John Levon wrote:
> Is there any good example code for compiling a kernel module
> externally, that works for modversions etc. on 2.2, 2.4, and 2.5,
> and does the right thing (including Rules.make) ?
Well, you need the source for the kernel you're building the module for,
it needs to be configured and "make dep" must have been run (for module
versions).
(You normally can find it by looking into /lib/modules/`uname -r`/kernel
for the currently running kernel)
Put your module source in some directory, and add a Makefile like
obj-m := my_module.o
include $(TOPDIR)/Rules.make
cd into the kernel source and run
make SUBDIRS=/path/to/your/module modules
--Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:18 EST