multiple dependent out-of-tree modules
Hello guys! I'm working with three out-of-tree kernel modules, one of them export symbols used by the others. At compile time, MODPOST warns about undefined symbols, which are defined on the first module and used in the second and third modules. When I try to load the modules* "insmod" *returns the error "Unknown Symbol in module" for those symbols warned by MODPOST. How can I to compile several out-of-tree modules which depends on one another and make to the dependant modules look for the needed symbols on the directories of the modules which have the symbols? I have found a similar question here http://www.spinics.net/lists/newbies/msg22926.html, but unanswered. ------------------------- Jorgyano
On Fri, Aug 19, 2011 at 5:40 AM, Jorgyano Bruno <jorgyano@gmail.com> wrote:
Hello guys! I'm working with three out-of-tree kernel modules, one of them export symbols used by the others. At compile time, MODPOST warns about undefined symbols, which are defined on the first module and used in the second and third modules. When I try to load the modules "insmod" returns the error "Unknown Symbol in module" for those symbols warned by MODPOST. How can I to compile several out-of-tree modules which depends on one another and make to the dependant modules look for the needed symbols on the directories of the modules which have the symbols? I have found a similar question here http://www.spinics.net/lists/newbies/msg22926.html, but unanswered.
------------------------- Jorgyano
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Jorgyano, insmod doesn't concern on modules decencies. Because of that you have to load modules in the appropriate order by hand. You can automate that with script. Actually, such sort automation has been already done - it is modprobe utility (see man modprobe for details) . The main idea of MODPOST step is generating modules dependency. It is quite simple text file, so you can edit it by hand. AFAIR there was issue with MODPOST when cross compiling was used. P.S. Sorry for my weak English.
On Thu, Aug 18, 2011 at 10:40:12PM -0300, Jorgyano Bruno wrote:
Hello guys!
I'm working with three out-of-tree kernel modules, one of them export symbols used by the others. At compile time, MODPOST warns about undefined symbols, which are defined on the first module and used in the second and third modules. When I try to load the modules "insmod" returns the error "Unknown Symbol in module" for those symbols warned by MODPOST.
How can I to compile several out-of-tree modules which depends on one another and make to the dependant modules look for the needed symbols on the directories of the modules which have the symbols?
Use modprobe, not insmod, and you will be fine. greg k-h
Hello guys!! Thanks for the answers! You are right Vladmir, if I edit the Module.symvers file of the dependent modues and put the symbols the it need, from the other module Module.symvers file it works well. I have tried modprobe with modules in kernel tree and works well, but I could not do the same with out-of tree modules, I think that is just a configuration issue of modprobe. On Fri, Aug 19, 2011 at 2:03 AM, Greg KH <greg@kroah.com> wrote:
On Thu, Aug 18, 2011 at 10:40:12PM -0300, Jorgyano Bruno wrote:
Hello guys!
I'm working with three out-of-tree kernel modules, one of them export symbols used by the others. At compile time, MODPOST warns about undefined symbols, which are defined on the first module and used in the second and third modules. When I try to load the modules "insmod" returns the error "Unknown Symbol
in
module" for those symbols warned by MODPOST.
How can I to compile several out-of-tree modules which depends on one another and make to the dependant modules look for the needed symbols on the directories of the modules which have the symbols?
Use modprobe, not insmod, and you will be fine.
greg k-h
Thanks for the answers!! -- Jorgyano Bruno de Oliveira Vieira cell: +55 (41) 8890 6774
participants (3)
-
Greg KH -
Jorgyano Bruno -
Vladimir Murzin