Exyaristo gia to module

Aleksandros Paleos apalaios at cs.teiath.gr
Thu Apr 17 08:23:01 EEST 2003


Alla peste mou sto praktiko kommati...ti tha prepei na kano gia na doulepsei 
telika to module mou?

Ksanagrafo ton kodika kai oti allo mporei na theorithei os xrisimo
#define MODULE
#include <linux/module.h>

int init_module(void)
                {
                printk("<1>Hello world\n");return 0;
                }
void cleanup_module(void)
                {
                printk("<1>Goodbye cruel world\n");
                }


sti synexeia kano gcc -c hello.c
kai
insmod ./hello.o
pairno to parakato minima lathous....ti prepei na kano?

./hello.o: kernel-module version mismatch
        ./hello.o was compiled for kernel version 2.4.19
        while this kernel is version 2.4.19-4GB.


to uname deixnei
linux:/home/alaios/Documents/leitourgika # uname -r
2.4.19-4GB

Gia ta alla 2 pou rotises opos blepeis einai directories
linux:/usr/include # file linux
linux: directory
linux:/usr/include # file asm
asm: directory




-- 
Παλαιος Αλεξανδρος
Φοιτητης ΤΕΙ Πληροφορικης Αθηνας



More information about the Linux-greek-users mailing list