hi everybody,
I tried to create a new module as given in
http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html, hello-1.c.
Code:
/*
* hello-1.c - The simplest kernel module.
*/
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");
/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}
and then created the Makefile as
Code:
obj-m += hello-1.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
and then make that... but the following errors are coming:
make -C /lib/modules/2.6.38.8-35.fc15.i686/build M=/home/rajaram modules
make: *** /lib/modules/2.6.38.8-35.fc15.i686/build: No such file or directory. Stop.
make: *** [all] Error 2
please help me as soon as possible
thanks in advance,
shakthi