errors on loading the module

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
hi
i compiled the device driver program bfin_adv7393fb.c and the .ko
and .o files are generated.after that while loading the module using
insmod "bfin_adv7393fb.ko" it gives the following errors:::::::
 insmod: error inserting "bfin_adv7393fb.ko"-1 invalid module format
help me to solve this........


Re: errors on loading the module
Quoted text here. Click to load it

What revision is your compile kernel (the one you are using to compile the
module), what revision is your runtime kernel (the one that runs on your
target)? Are they different? If "yes", that can't work (most of the time).

"invalid module format" sounds like you try to load a 2.6 kernel module into
a running 2.4 kernel...

Try to boot your new kernel you built to create the adv module. Then try to
load the module again.

Juergen


Re: errors on loading the module
Quoted text here. Click to load it

thanks for ur reply sir.........
our compile kernel and the runtime kernel are both the same........
i could not find why the error has occured...........guide me in this
regard............


Re: errors on loading the module
Quoted text here. Click to load it

a) Please post the output here:

 1) $ cat /proc/version (run it on your target)

 2) Run your cross compiler with "--version" as the only argument

b) Google for "invalid module format"

Juergen

Re: errors on loading the module
Quoted text here. Click to load it

hi all .
i have compiled the program . .ko ,.o ,.mod.o,.mod.c files are
created .my doubt is how can i know my program is loaded in kernel.
can u  guide me


Re: errors on loading the module

Quoted text here. Click to load it

$ man modprobe
$ man insmod
$ man lsmod
$ man rmmod

JB



Re: errors on loading the module
Quoted text here. Click to load it

To load the module from the module compile directory run:
insmod <your.driver.name>.ko

To see wether it has loaded up use :
lsmod | grep <your.driver.name>

That'll show you any drivers matching <your.driver.name>.

BTW  dont call it a program, because that sounds like a user mode
application (instead of a kernel mode driver).  Call it a module,
kernel module or a driver.
Cheers
  Janaka


Re: errors on loading the module
Quoted text here. Click to load it

In addition to the above comments: To start off with use the "insmod"
command instead of "modprobe", because the latter command may try to
load any dependant modules.


Re: errors on loading the module
Quoted text here. Click to load it

hi ,
1.
i have tried  using modprobe comment ,i am getting below error
[root@localhost chumma]# modprobe bfin_adv7393fb.ko
FATAL: Module bfin_adv7393fb.ko not found.

2.
i tried using insmod also i am getting below error
[root@localhost chumma]# insmod bfin_adv7393fb.ko
insmod: error inserting 'bfin_adv7393fb.ko': -1 Invalid module format


Re: errors on loading the module
Quoted text here. Click to load it

a. Are you running the kernel you compile when you issue those
commands ?
b. Are you building these kernel drivers as "build in" or as
"modules" ?
c. What exactly do you mean by "my doubt is how can i know my program
is loaded in kernel." ? Are you asking whether the module is linked to
the kernel or are you asking whether the module has been loaded on the
kernel at runtime ?
d. Are you in the directory containing the .ko file ?
e. Try absolute path of the .ko file


Re: errors on loading the module
Quoted text here. Click to load it

tanks for ur reply , i am asking is the module is linked to the
kernel.if  it is yes how can i know that particular madule added in
the kernel.i am in correct path ,but i got some warnings in
compilation.


Re: errors on loading the module
Quoted text here. Click to load it
wrote:
Quoted text here. Click to load it
same........
Quoted text here. Click to load it

i got the solution ,i need to connect the tarket through the  serial
connector.then i can see my module is added in to the kernel
thank u all


Re: errors on loading the module

Quoted text here. Click to load it
     ^^^^^^^^^^^^^^^^^^^^^^^

Arrgh. You tried it all the time at your host.

Juergen

Site Timeline