Hello ,
In your working directory ( where your module code [module.c] exists )
, create a file called Makefile as follows
#Makefile
KDIR=/lib/modules/`uname -r`/build
kbuild:
make -C $(KDIR) M=`pwd`
clean:
make -C $(KDIR) M=`pwd` clean
and a file called Kbuild like this:
#Kbuild
EXTRA_CFLAGS=-g
obj-m = modul.o
Now run make , to have your module compiled and run insmod to have
your module inserted.
See [1] for detailed information about linux kernel makefiles, and [2]
for information regarding building your own modules.
Hope this help,
Dan.
[1]http://lxr.linux.no/linux+v2.6.24.2/Documentation/kbuild/makefiles.txt
[2]http://lxr.linux.no/linux+v2.6.24.2/Documentation/kbuild/modules.txt
On Fri, Oct 3, 2008 at 1:45 PM, abhish agarwal <[EMAIL PROTECTED]> wrote:
> hello friends,
> I am new to kernel programming. I have started device driver coding but
> problem is i don't know how to install new module in existing code.I have
> ubuntu on my system and kernel version is 2.6.24 .I google it also but they
> something about make file and all but they don't say where to place that
> make file.
> Please tell me the steps involved in this process.
>
> Thanks
> Abhish
>
> ________________________________
> Add more friends to your messenger and enjoy! Invite them now.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ