All of lore.kernel.org
 help / color / mirror / Atom feed
* multiple dependent out-of-tree modules
@ 2011-08-19  1:40 Jorgyano Bruno
  2011-08-19  4:59 ` Vladimir Murzin
  2011-08-19  5:03 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Jorgyano Bruno @ 2011-08-19  1:40 UTC (permalink / raw)
  To: kernelnewbies

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110818/1b7b9a8b/attachment.html 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* multiple dependent out-of-tree modules
  2011-08-19  1:40 multiple dependent out-of-tree modules Jorgyano Bruno
@ 2011-08-19  4:59 ` Vladimir Murzin
  2011-08-19  5:03 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Vladimir Murzin @ 2011-08-19  4:59 UTC (permalink / raw)
  To: kernelnewbies

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 at 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* multiple dependent out-of-tree modules
  2011-08-19  1:40 multiple dependent out-of-tree modules Jorgyano Bruno
  2011-08-19  4:59 ` Vladimir Murzin
@ 2011-08-19  5:03 ` Greg KH
  2011-08-20  0:31   ` Jorgyano Bruno
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2011-08-19  5:03 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* multiple dependent out-of-tree modules
  2011-08-19  5:03 ` Greg KH
@ 2011-08-20  0:31   ` Jorgyano Bruno
  0 siblings, 0 replies; 4+ messages in thread
From: Jorgyano Bruno @ 2011-08-20  0:31 UTC (permalink / raw)
  To: kernelnewbies

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110819/1a884f62/attachment-0001.html 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-20  0:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19  1:40 multiple dependent out-of-tree modules Jorgyano Bruno
2011-08-19  4:59 ` Vladimir Murzin
2011-08-19  5:03 ` Greg KH
2011-08-20  0:31   ` Jorgyano Bruno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.