Module deps when building stacked module outside of kernel source tree

Module deps when building stacked module outside of kernel source tree

Post by Jeffrey Bait » Sat, 15 Jun 2002 10:40:14



Hi all:

My company is using an FTDI-based robot control board. I have modified
exported symbols to avoid clashes, changed some clock divisors, and
now am trying to get ftdi_sio to compile outside of the kernel source
tree. I have succeeded in the case that the host has built their
kernel from source (in this scenario I am able to compile with module
versioning).

However, in the case that the machine has the kernel installed the
_wrong_ way (i.e. Red Hat 7.2 kernel _without_ a kernel source
package), I find that I must turn off module versioning since it
requires versioning info from kernel includes.

For test purposes, here I turn off versioning.  Even with kernels
compiled properly from source, everything seems to work OK except in
the case that I attempt to calculate module dependencies:

    /sbin/depmod -ae -F /boot/System.map
    depmod: *** Unresolved symbols in
+/lib/modules/2.4.9-34/kernel/drivers/usb/serial/evolution_rcm.o
    depmod:      usb_serial_deregister                          
    depmod:      usb_serial_register  
    depmod:      usb_submit_urb    
    depmod:      usb_control_msg
    depmod:      usb_unlink_urb

These symbols are all exported by the usbserial.o module. Installing
the modified module after installing the usbserial module works
perfectly; nobody complains. The dependencies merely cannot be
calculated.

I'm curious if ya'll could offer any wisdom with respect to resolving
these symbols.

I find it odd that usb_serial_* are not mentioned in the System.map.
Perhaps this is because of module stacking -- these symbols
undoubtedly don't exist in the kernel symbol table until the usbserial
module is loaded. This seems horrbily inconvenient; perhaps someone
could fill me in as to why these symbols are not in there. usbserial
_does_ explicitly export them (but why don't they go where I think
they should?)

Thank you very much for your help and for your time. Please find the
modified code here:

https://intranet.idealab.com/public/startbox/users/baitisj/evolution_...

Regards,
Jeff Baitis

Evolution Robotics, Inc.
http://www.evolution.com

 
 
 

Module deps when building stacked module outside of kernel source tree

Post by Joshua Jone » Sat, 15 Jun 2002 12:06:01



> However, in the case that the machine has the kernel installed the
> _wrong_ way (i.e. Red Hat 7.2 kernel _without_ a kernel source
> package), I find that I must turn off module versioning since it
> requires versioning info from kernel includes.

Are there not includes at /lib/modules/2.x.x/build/include  ?

--
   Joshua Jones                  ___________    * Debian/GNU *
   IBM NOS Technology Group      ___  /___(_)__________  _____  __
   mail: jonesjos(at)us.ibm.com  __  / __  /__  __ \  / / /_  |/_/
   web:  http://intmain.net      _  /___  / _  / / / /_/ / _>  <
   =========================     /_____/_/  /_/ /_/\____/ _/_/|_|

 
 
 

Module deps when building stacked module outside of kernel source tree

Post by Jeffrey Bait » Sun, 16 Jun 2002 04:38:57



Quote:> Are there not includes at /lib/modules/2.x.x/build/include  ?

With Red Hat kernel source packages, /lib/modules/2.x.x/build is a
symbolic link to /usr/src/linux-2.x.x. Note also that including
modversions.h from /usr/include/linux/ is useless, as modversions is
kernel dependent (the file in /usr/include/linux just spews errors).

I chatted with the maintainer of the FTDI kernel module, and symbols
from stacked kernel modules are not included in System.map for this
reason: the kernel module dynamically allocates memory regions for
loaded modules, and an entry point to a dynamically loaded component
will change.

I guess what this boils down to is understanding why the
query_module() call made by depmod on usbserial fails to obtain the
needed dependency information.

Thank you for your thoughts!
-Jeff

 
 
 

1. Compiling individual kernel modules from the kernel source tree

Is there a way of compiling individual kernel modules from the kernel
source tree (i.e. modules that are contained in linux-2.x.xx.tar.gz)
without having to do make menuconfig ; make modules ; make
modules-install?  The reason I ask is I've compiled kernel 2.2.16 with
an assortment of modules, but I didn't compile the module for an
Ethernet card I'm about to install.  Doing the whole make process over
again seems a bit harsh.

Cheers,
--
Nicholas John Murison
~~~~~~~~~~~~~~~~~~~~~
Don't mess with penguins
Registered Linux User #153895   http://counter.li.org

2. solaris 9 certification upgrade

3. add module source to kernel tree

4. ISDN, IPPPD and a CISCO Router,... what a mess ?

5. Can't Build Kernel Module on V5.1A - no Module created

6. Searching daemon that support RPL

7. Opening a kernel module from another kernel module

8. Print problem

9. Ft. Worth - Linux Kernel Module Programmer - Unix kernel modules & Unix device drivers

10. Make modules copys source tree

11. conf.modules vs. modules.conf & modules.dep??

12. error building kernel module for cirrus graphic card - kernel 2.5.68

13. module deps