Re: to find out Unresolved symbel when I insert device driver?
Jens.Toerring_at_physik.fu-berlin.de
Date: 01/29/04
- Next message: Johan Kullstam: "Re: Kernel 2.6.x mouse and KVM help needed"
- Previous message: Cristian Wilckens: "Implementing messages using pthreads"
- In reply to: somez72: "to find out Unresolved symbel when I insert device driver?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Jan 2004 13:48:03 GMT
somez72 <somez72@chollian.net> wrote:
> I have a device driver module souce.
> 1) in red hat 9.0. ( kernel version 2.4.20 ), module compile is OK and it
> seems like working
> well.(produced xxyy_module.o )
> just when I issue insmod xxyy_module.o , I got warning.
> "Warning: loading xxyy_moudule.o will taint the kernel: no license"
> "See http://www.tux.org/lkml/#export-tained for information about tained
> modules"
> "Module xxyy_module.o loaded, with warnings"
That's because you don't specify explicitely in the module that it's
either under the GPL or a similar free license. There are some binary
only modules (which obviously aren't under the GPL)and you get this
warning to make it clear to you that you know you're using which is
considered to be legally to be at least in a grey area and that you
won't get any help when there are problems with the kernel while that
module is loaded. You can easily get around the warning by a including
lines like
#if defined MODULE_LICENSE
MODULE_LICENSE( "GPL" );
#endif
Of course then the module must be under the GPL license!
> 2) in my new installed kernel ( kernel version 2.4.18), compile is
> OK(produced xxyy_module.o)
> but when I issue insmode xxy_module.o , I got error message as follows.
> "xxyy_module.o: unresolved symbol register_chrdev_Re70f806e"
> "xxyy_module.o: unresolved sysbol irq_stat_Rc0ba6f96"
> I want to export "register_chrdev_Re70f806e and irq_stat_Rc0ba6f96 "
> function,
> for exporting, I searched all kernel tree ( in above kernel 2.4.20) to
> find out prototype of two functions.
> ( grep -rn register_chrdev_Re70f806e / && grep -rn irq_stat_Rc0ba6f96 / ).
> I searched every direcotory under / , and I just found a number of Binary
> file matches
> (for example : /lib/modules/kernel/drives/pcmcia/ps.o ...... )
> I cant't find function prototype of it,
> Could someone help?, How can I find out prototype of that unresolved
> funtions.
I have had exactly the same problem (but with the RH9.0 2.4.20 kernel
sources). I found that it's due to the kernel headers distributed with
RedHat 9.0 being seriously broken - some of the functions are declared
for a kernel with versioning, while others are for a kernel without
versioning (register_chrdev() and unregister_chrdev() being one of the
examples). You will have to recreate the kernel headers from scratch.
1. Save the '.config' file in the main source directory somewhere else
2. Do a "make mproper"
3. Copy back the '.config' file into the main source directory
4. Reconfigure the kernel using e.g. "make oldconfig"
5. Do a "make dep"
Now you should have a clean set of kernel include files, which you now
can use to compile your module. Afterwards the problem should have gone
away.
Regards, Jens
-- \ Jens Thoms Toerring ___ Jens.Toerring@physik.fu-berlin.de \__________________________ http://www.physik.fu-berlin.de/~toerring
- Next message: Johan Kullstam: "Re: Kernel 2.6.x mouse and KVM help needed"
- Previous message: Cristian Wilckens: "Implementing messages using pthreads"
- In reply to: somez72: "to find out Unresolved symbel when I insert device driver?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|