hellow
i tried to compile a simple module
in first i printed
gcc -c hello.c
(created hello.o)
and then
insmod hello.o
(i tried also insmod -f hello.o)
but its printed me an error
hello.o: couldnt find the kernel version the module was compile for?
is anyone know a solution?
series on lwn.net
You may be interested in: http://lwn.net/Articles/driver-porting/
module
i didnt saw there anything that could help me
where's the code
don't know what the problem is without seeing some code.
this is the code
/* hello-1.c - The simplest kernel module.
*/
#include /* Needed by all modules */
#include /* Needed for KERN_ALERT */
int init_module(void)
{
printk("<1>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_ALERT "Goodbye world 1.\n");
}
use kernel build system
You must use the kernel build system.
Have a look at http://www.captain.at/programming/kernel-2.6/
- Ratnadeep
http://ratnadeep.talk.to