[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

kernel-module version mismatch



hello,
	im trying to run the most simple linux modules and i get the
following error on saing: 

/sbin/insmod hello.o

 hello.o was compiled for kernel version 2.4.9-9
        while this kernel is version 2.4.18-14.

I also tried:
gcc -c hello.c -I /usr/src/linux-2.4.18-14/include
 with the same consequences 

And:
gcc -c -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4.18-14/include -o hello.o
hello.c
hello.c:1:1: warning: "MODULE" redefined
hello.c:1:1: warning: this is the location of the previous definition

again with the same consequence.

any suggestions?

the code looks like so:
#define MODULE
#include <linux/module.h>

int init_module (void) /* Loads a module in the kernel */
{
        printk("Hello kernel n");
        return 0;
}

void cleanup_module(void) /* Removes module from kernel */
{
        printk("GoodBye Kerneln");
}



*******************************************************************************

	Getting crazy on the waltzers but it's the life that I choose
				-- Dire Straits

*******************************************************************************






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]