Re: Module licence problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Antonio Mancina ha scritto:
Oldani Massimiliano ha scritto: [...CUT...]
Many thanks to Massimiliano for his answers, I'm writing the solution to my problem.

Thanks to my tries on another system, I had the confirmation that the problem was not due to some compiler, modutils, binutils or other stuff like that. After two days I've discovered a simple important rule in writing an external module makefile (many of you will find that obvious).

Suppose you have to build a module from more than one source file, the usual foo.c and bar.c. Suppose also that foo.c is the file which contains the module_init and module_exit functions.

In the makefile you write, when you get to the obj part, you shall avoid to write

obj-m:=foo.o
foo-objs:=bar.o

In other word, what stays after obj-m (that will be the name of the module, apart from a ko instead of an o) shall have a different name from the file which contains the module_init and exit (I thought I had to use just that file and filename). I had done exactly this error. So the following would be correct:

obj-m:=name.o
name-objs:=foo.o bar.o
with whatever name != foo.

Thanks again!
Bye,

--
Antonio Mancina
PhD Student @ Retis Lab
Scuola Superiore S.Anna - CNR
Pisa, Italy
a.mancina@xxxxxxxx



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux