hi.. I m new to kernel programming..for my in-house project, I chose
to create a device driver for mouse for which I am required to
understand Kernel module programming..I tried to execute this small
module ..though it is getting complied but after trying hard with
insmod and makefile commands.. I am still not able to execute it..
Below is my program written on localhost in linux version 2.4.20-8
#define MODULE
#include <linux/module.h>
int init_module()
{
printk("init_module invokded\ n");
printk("the message is printed from the kernel space\n");
return 0;
}
void cleanup_module()
{printk("cleanup_module invoked\n");
printk("module is now going to be unloaded from kernel \n");
}
[student@localhost student]$ gcc -c simple.c
simple.c:6:8: warning: unknown escape sequence: '\040'
[student@localhost student]$ insmod simple.c
bash: insmod: command not found
Please help me out ... looking forward to your reply.
Thanx