i have some trouble compiling a module.. i'm using kernel 2.6 and am trying to compile the following file named hello.c:
----------------------------------------------------------------
Code:
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk("<1>Hello world 1.\n");
return 0;
}
void cleanup_module(void)
{
printk("Goodbye world 1.\n");
}
----------------------------------------------------------------
to compile it i'm doing like they say in the kernel source code documentation, i have the following Makefile:
----------------------------------------------------------------
obj-m := hello.o
----------------------------------------------------------------
and use this comando to compile it:
make -C /usr/src/linux-`uname -r` SUBDIRS=$PWD modules
it gives tons of errors, but the first its comlaining about not beeing able to find the module.h file included...
i tryied to include them specifying a full path but nothing worked...
anyone has a solution?? i would be very very very thankfull