Re: [Ilugc] How to compile module
Thanks Santosh and Satish. Regards, Ashish On Fri, Dec 12, 2008 at 1:34 PM, Satish Eerpini wrote: > Hi ashish , > > > they are the object files which were linked into the kernel module > file(.ko), you need not worry about them , they should actually be > gone if you run 'make clean' > > also for more info refer to LDD 3rd edition (Linux Device Drivers) , > it is all explained there , .. .you should be able to find free > versions of the book in PDF format on the web , .. > > > Thanks > Satish > > On 12/12/08, Ashish Verma wrote: > > Hi Santosh, > > > > The problem was in the make file. I had put pcnet32.c instead of .o. The > > module has now been compiled. Now I got 4 files > > > > pcnet32.ko - I placed in /lib/modules/2.6.25.14/kernel/drivers/net > > > > What should I do with the rest. What are these for? I found similar file > > types in the /usr/src/linux-2.6.25.14/(different folders) > > > > pcnet32.mod.c > > pcnet32.mod.o > > pcnet32.o > > > > Regards > > Ashish > > > > On Fri, Dec 12, 2008 at 12:39 PM, Santosh wrote: > > > >> Ashish Verma wrote: > >> > >>> Hi, > >>> > >>> I dont know why this is not working for me. I was able to compile the > >>> hello > >>> world module without errors. > >>> > >>> I got the below error: > >>> > >>> make -C "/lib/modules/2.6.25.14/build" M=/root modules > >>> make[1]: Entering directory '/usr/src/linux-2.6.25.14' > >>> scripts/Makefile.build:217: target '/root/pcnet32.c' doesn't match the > >>> target pattern > >>> Building modules, stage 2. > >>> MODPOST 0 modules > >>> make[1]: leaving directory '/usr/src/linux-2.6.25.14' > >>> I got the pcnet32.c file from > >>> /usr/src/linux-2.6.25.14/drivers/net/pcnet32.c. 2.6.25.14 is a compiled > >>> kernel. > >>> > >>> Why is it that pcnet32.c did not get compiled when the kernel was > >>> compiled? > >>> or when the modules were compiled? > >>> > >>> Regards, > >>> Ashish > >>> > >>> > >> I had a wrong idea, the actual error is with the makefile. Somewhere > >> regexps are used, which could not match the specified pattern. Thats the > >> problem. > >> > >> Thanks > >> Santosh > >> > >> ___ > >> To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe > >> " > >> in the subject or body of the message. > >> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > >> > > ___ > > To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with > > "unsubscribe " > > in the subject or body of the message. > > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > > > > > -- > http://satish.playdrupal.com > ___ > To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with > "unsubscribe " > in the subject or body of the message. > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > ___ To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
Re: [Ilugc] How to compile module
Hi ashish , they are the object files which were linked into the kernel module file(.ko), you need not worry about them , they should actually be gone if you run 'make clean' also for more info refer to LDD 3rd edition (Linux Device Drivers) , it is all explained there , .. .you should be able to find free versions of the book in PDF format on the web , .. Thanks Satish On 12/12/08, Ashish Verma wrote: > Hi Santosh, > > The problem was in the make file. I had put pcnet32.c instead of .o. The > module has now been compiled. Now I got 4 files > > pcnet32.ko - I placed in /lib/modules/2.6.25.14/kernel/drivers/net > > What should I do with the rest. What are these for? I found similar file > types in the /usr/src/linux-2.6.25.14/(different folders) > > pcnet32.mod.c > pcnet32.mod.o > pcnet32.o > > Regards > Ashish > > On Fri, Dec 12, 2008 at 12:39 PM, Santosh wrote: > >> Ashish Verma wrote: >> >>> Hi, >>> >>> I dont know why this is not working for me. I was able to compile the >>> hello >>> world module without errors. >>> >>> I got the below error: >>> >>> make -C "/lib/modules/2.6.25.14/build" M=/root modules >>> make[1]: Entering directory '/usr/src/linux-2.6.25.14' >>> scripts/Makefile.build:217: target '/root/pcnet32.c' doesn't match the >>> target pattern >>> Building modules, stage 2. >>> MODPOST 0 modules >>> make[1]: leaving directory '/usr/src/linux-2.6.25.14' >>> I got the pcnet32.c file from >>> /usr/src/linux-2.6.25.14/drivers/net/pcnet32.c. 2.6.25.14 is a compiled >>> kernel. >>> >>> Why is it that pcnet32.c did not get compiled when the kernel was >>> compiled? >>> or when the modules were compiled? >>> >>> Regards, >>> Ashish >>> >>> >> I had a wrong idea, the actual error is with the makefile. Somewhere >> regexps are used, which could not match the specified pattern. Thats the >> problem. >> >> Thanks >> Santosh >> >> ___ >> To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe >> " >> in the subject or body of the message. >> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc >> > ___ > To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with > "unsubscribe " > in the subject or body of the message. > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > -- http://satish.playdrupal.com ___ To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
Re: [Ilugc] How to compile module
Hi Santosh, The problem was in the make file. I had put pcnet32.c instead of .o. The module has now been compiled. Now I got 4 files pcnet32.ko - I placed in /lib/modules/2.6.25.14/kernel/drivers/net What should I do with the rest. What are these for? I found similar file types in the /usr/src/linux-2.6.25.14/(different folders) pcnet32.mod.c pcnet32.mod.o pcnet32.o Regards Ashish On Fri, Dec 12, 2008 at 12:39 PM, Santosh wrote: > Ashish Verma wrote: > >> Hi, >> >> I dont know why this is not working for me. I was able to compile the >> hello >> world module without errors. >> >> I got the below error: >> >> make -C "/lib/modules/2.6.25.14/build" M=/root modules >> make[1]: Entering directory '/usr/src/linux-2.6.25.14' >> scripts/Makefile.build:217: target '/root/pcnet32.c' doesn't match the >> target pattern >> Building modules, stage 2. >> MODPOST 0 modules >> make[1]: leaving directory '/usr/src/linux-2.6.25.14' >> I got the pcnet32.c file from >> /usr/src/linux-2.6.25.14/drivers/net/pcnet32.c. 2.6.25.14 is a compiled >> kernel. >> >> Why is it that pcnet32.c did not get compiled when the kernel was >> compiled? >> or when the modules were compiled? >> >> Regards, >> Ashish >> >> > I had a wrong idea, the actual error is with the makefile. Somewhere > regexps are used, which could not match the specified pattern. Thats the > problem. > > Thanks > Santosh > > ___ > To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe > " > in the subject or body of the message. > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > ___ To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
Re: [Ilugc] How to compile module
Ashish Verma wrote: Hi, I dont know why this is not working for me. I was able to compile the hello world module without errors. I got the below error: make -C "/lib/modules/2.6.25.14/build" M=/root modules make[1]: Entering directory '/usr/src/linux-2.6.25.14' scripts/Makefile.build:217: target '/root/pcnet32.c' doesn't match the target pattern Building modules, stage 2. MODPOST 0 modules make[1]: leaving directory '/usr/src/linux-2.6.25.14' I got the pcnet32.c file from /usr/src/linux-2.6.25.14/drivers/net/pcnet32.c. 2.6.25.14 is a compiled kernel. Why is it that pcnet32.c did not get compiled when the kernel was compiled? or when the modules were compiled? Regards, Ashish I had a wrong idea, the actual error is with the makefile. Somewhere regexps are used, which could not match the specified pattern. Thats the problem. Thanks Santosh ___ To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
Re: [Ilugc] How to compile module
Ashish Verma wrote: Hi, I dont know why this is not working for me. I was able to compile the hello world module without errors. I got the below error: make -C "/lib/modules/2.6.25.14/build" M=/root modules make[1]: Entering directory '/usr/src/linux-2.6.25.14' scripts/Makefile.build:217: target '/root/pcnet32.c' doesn't match the target pattern Building modules, stage 2. MODPOST 0 modules make[1]: leaving directory '/usr/src/linux-2.6.25.14' I got the pcnet32.c file from /usr/src/linux-2.6.25.14/drivers/net/pcnet32.c. 2.6.25.14 is a compiled kernel. Why is it that pcnet32.c did not get compiled when the kernel was compiled? or when the modules were compiled? Regards, Ashish I din't have the look at the latest menuconfig of the kernel. But, generally the module gets compiledf only when you select the appropriate option. All the modules won't be compiled by default. Another problem I can assume is that, pcnet32 must have been written only to be built internally into the kernel and not as a module. Any other thoughts? ___ To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
Re: [Ilugc] How to compile module
Hi, I dont know why this is not working for me. I was able to compile the hello world module without errors. I got the below error: make -C "/lib/modules/2.6.25.14/build" M=/root modules make[1]: Entering directory '/usr/src/linux-2.6.25.14' scripts/Makefile.build:217: target '/root/pcnet32.c' doesn't match the target pattern Building modules, stage 2. MODPOST 0 modules make[1]: leaving directory '/usr/src/linux-2.6.25.14' I got the pcnet32.c file from /usr/src/linux-2.6.25.14/drivers/net/pcnet32.c. 2.6.25.14 is a compiled kernel. Why is it that pcnet32.c did not get compiled when the kernel was compiled? or when the modules were compiled? Regards, Ashish On Thu, Dec 11, 2008 at 1:56 PM, kish wrote: > this helped me > > > http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html > -- kish > --- > Esse Quam Videri > krisk.wordpress.com > ___ > To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with > "unsubscribe " > in the subject or body of the message. > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > ___ To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
Re: [Ilugc] How to compile module
this helped me http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html -- kish --- Esse Quam Videri krisk.wordpress.com ___ To unsubscribe, email [EMAIL PROTECTED] with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
Re: [Ilugc] How to compile module
Ashish Verma wrote: Hi, I have a pcnet32.c file. I want to make a module out of it. What should I do. The below link requires me to make a make file. I don't know how to do that. Please advise. http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html Regards, Ashish ___ To unsubscribe, email [EMAIL PROTECTED] with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc Hi Ashish, Do you have a custom compiled kernel? If so then, it is not necessary to download headers. If not, you have to download the headers and write a makefile. The makefile is very simple. obj-m += all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean Then make modulename There is no specific directory to place your source, just compeile it and later you can insert. Thanks, Santosh ___ To unsubscribe, email [EMAIL PROTECTED] with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
[Ilugc] How to compile module
Hi, I have a pcnet32.c file. I want to make a module out of it. What should I do. The below link requires me to make a make file. I don't know how to do that. Please advise. http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html Regards, Ashish ___ To unsubscribe, email [EMAIL PROTECTED] with "unsubscribe " in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc