boitheia me module
Aggelos Economopoulos
aoiko at cc.ece.ntua.gr
Sat Apr 12 17:53:01 EEST 2003
On Saturday 12 April 2003 13:15, Aleksandros Paleos wrote:
> Kalispera exo grapsei ton parakato kodika
> #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?
i) na diabaseis to K&R II (The C Programming Language, Second Edition) kai
entopise diafores sth stoixish me ton diko sou, erm, ..., <gkoux>, kwdika.
enalaktika, koita se opoiodhpote .c file katw apo to p.x. linux/mm/
ii) diabase ta prwta kefalaia tou LDD2 (http://www.xml.com/ldd/chapter/book/).
epanelabe mexri na eisai se 8esh na antilhf8eis monos sou ti den exeis kanei
swsta ston parapanw kwdika kai sto compilation tou.
>
> ./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.
>
> Eyxaristo Poly
> --
> Παλαιος Αλεξανδρος
> Φοιτητης ΤΕΙ Πληροφορικης Αθηνας
More information about the Linux-greek-users
mailing list