[Ilugc] How to compile module

Ashish Verma ashishverma1984 at gmail.com
Fri Dec 12 13:26:00 IST 2008


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 <ssantosh at fossix.org> 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-request at ae.iitm.ac.in with "unsubscribe
> <password> <address>"
> in the subject or body of the message.
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>


More information about the ilugc mailing list