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........
errors on loading the module
Sep 13, 2007
12 Replies
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
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............
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 argumentb) Google for "invalid module format"
Juergen
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
$ man modprobe $ man insmod $ man lsmod $ man rmmod
JB
To load the module from the module compile directory run: insmod .ko
To see wether it has loaded up use : lsmod | grep
That'll show you any drivers matching .
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
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.
hi ,
- 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.
- 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
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
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.
same........
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
^^^^^^^^^^^^^^^^^^^^^^^
Arrgh. You tried it all the time at your host.
Juergen
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required