AnsweredAssumed Answered

Dynamic compile driver  using other function

Question asked by zcyhansen on May 3, 2013
Latest reply on May 3, 2013 by zcyhansen

now I am compileing the driver on Drivers/char/bfin_simple_timer.c 

using  uClinux-dist-2008R1.5-RC3/linux-2.6.x  

the kernel is 2.6.22.19 

but my target board is compiled by others ,   and I just know its kernel is 2.6.22.19

 

the follow is what I done:

First  I compile the   uClinux-dist-2008R1.5-RC3 on my computer using cross compile. after that ,I compile a  simple driver (helloworld). and copy to the target board , then using

insmod helloworld.ko

it run correctly!

 

Second   I  compile the bfin_simple_timer.c  and  there is no error !  the ko file was built.  so I copy the ko file to the target board. and using the

command:  insmod  dirver.ko    (I change the name)

however , this time , it reply:

insmod: cannot insert 'drive.ko': Unknown symbol in module (-1): No such file or directory

 

and i look at the log it said:

Jan  1 04:15:31 leanxcam user.warn kernel: pwm: Unknown symbol _enable_gptimers

Jan  1 04:15:31 leanxcam user.warn kernel: pwm: Unknown symbol _get_gptimer_status

Jan  1 04:15:31 leanxcam user.warn kernel: pwm: Unknown symbol _disable_gptimers

Jan  1 04:15:31 leanxcam user.warn kernel: pwm: Unknown symbol _set_gptimer_pwidth

Jan  1 04:15:31 leanxcam user.warn kernel: pwm: Unknown symbol _set_gptimer_config

Jan  1 04:15:31 leanxcam user.warn kernel: pwm: Unknown symbol _set_gptimer_status

Jan  1 04:15:31 leanxcam user.warn kernel: pwm: Unknown symbol _set_gptimer_period

 

I think the problem is that ,  the kernel of the target board  does not include the part of gptimer.   ?? 

I  want to ask :1> should I need to compile the kernel and burn the nwe image to the target?

                      2> what else problem happening?

                     3> if a new driver, which using some function of the kernel , inserted to target kernel but the target kernel does not include this functions,  what will happen?

Outcomes