On Wed, Jun 17, 2009 at 2:55 PM, JohnQ <[email protected]> wrote: > >>On Tue, May 05, 2009 at 02:42:18PM +0200, Moritz Horstmann wrote: > >>> And this is what dmesg says when I try to load the dvb-core module on > >>> the NAS: > >>> > >>> dvb_core: Unknown symbol class_destroy > >>> dvb_core: Unknown symbol class_create > >>> dvb_core: Unknown symbol class_device_create > >>> dvb_core: Unknown symbol class_device_destroy > >> > >>These functions are not present in that kernel release. You can look in > >>the git tree for what was done before they were present if you are > >>really crazy enough to wish to backport something to a kernel release > >>that is so many years old it's not even funny... > >> > >>Good luck, you will need it, > >> > >>greg k-h > > Hi... I'd appreciate a bit of advice about this. I'm having the same trouble > only with a 2.6.18 kernel which should have class_create, etc. Here's the > kernel info... > > Linux 2.6.18-128.1.6.el5.centos.plus #1 SMP x86_64 x86_64 x86_64 GNU/Linux > > I'm assuming something's not included in the kernel itself, so that when I do > "insmod <mydriver.ko>" it fails with the messages below. The advice I'd like > to get is this... what is missing from the kernel that needs to be included? > I would have thought that "class_create" and the other device driver basics > would have been fundamental and included by default in any kernel... so I'm > confused on what to look for and how to determine if it's missing or not. > > Jun 16 18:11:14 vm01-08 kernel: SkaDriver: Unknown symbol class_destroy > Jun 16 18:11:14 vm01-08 kernel: SkaDriver: Unknown symbol class_create > Jun 16 18:11:14 vm01-08 kernel: SkaDriver: Unknown symbol class_device_create > Jun 16 18:11:14 vm01-08 kernel: SkaDriver: Unknown symbol class_device_destroy > > Any advice appreciated... :) > > Thanks, > > John Q. > > > > > Actually, thanks to hnaz on the kernelnewbies IRC channel, I have the solution. The issue is that the functions aren't exported unless your kernel module declares it's GPL. Once I added this: MODULE_LICENSE("GPL");
underneath the various includes, my kernel module loaded fine. Obviously, you have to be ok with declaring your code GPL.........
