Re: Kernel Module Compilation Error

From: Sam Ravnborg
Date: Tue Aug 31 2004 - 08:04:21 EST


>
> hi,
> i am working in Fedora .
> Kernel =2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST
> 2003 i686 i686 i386 GNU/Linux
>
> my kernel module program is
> #include<linux/kernel.h>
> #include<linux/module.h>
> #include<linux/mm.h>
>
> extern *current;
> int init_module(void){
> return 0;
> }
> void cleanup_module(void){
> }

Use a kbuld makefile:
obj-m := myfile.o

and compile using:
make -C path/to/kernel/src SUBDIRS=`pwd` modules

Sam



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/