How to compile device driver code for linux kernel 2.4.21
hi,
i written simple code for device driver that is their in the book of Linux Programming by Neil Mathew. It is simple code comprising of init_module and cleanup_module and it prints messege in kernel space using printk().
when i compile code using
gcc -DMODVERSION -DMODULE ...... -o code.o -c code.c
it gives error saying does not find the kernel version for which the code is complied
i tried by simply gcc -c code.c
code gets compiled and creates code.o file but
when i try to insert this module in to the kernel it shows error messege saying code is compiled for linux 2.4.20 kernel and this is kernel 2.4.21 ..
Is their any different methode of code compilation for this kernel ?
also mounting of NTFS file system is also not working in my system..
i tried that by creating entries in /etc/fstab and by creating folder in /mnt directory..
I have RED HAT LINUX ES3 with kernel 2.4.21 in my system..
please help me.
|