Hi All,
I wanted to get started with writing kernel modules, I found the following link:
http://www.linuxtopia.org/online_boo..._2.6/x121.html which gives a sample program and a Makefile for the same.
When i type make hello-1, I get the following error:
make hello-1
cc hello-1.c -o hello-1
hello-1.c:4:60: error: linux/module.h: No such file or directory
hello-1.c: In function ‘init_module’:
hello-1.c:9: error: ‘KERN_INFO’ undeclared (first use in this function)
hello-1.c:9: error: (Each undeclared identifier is reported only once
hello-1.c:9: error: for each function it appears in.)
hello-1.c: In function ‘cleanup_module’:
hello-1.c:19: error: ‘KERN_INFO’ undeclared (first use in this function)
make: *** [hello-1] Error 1,
Now if I put module.h into /usr/src/linux, it inturn depends of three other headers.
My kernel version is:2.6.24-19-generic
Please, Can anybody guide/help me.
Thanks in advance.