Linux: kernel vermagic not corresponding

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Linux: kernel vermagic not corresponding

2,842件の閲覧回数
mirogliopaolo
Contributor II

Dear Sirs,

i tried to compile a customized kernel module for the BSP, but there is something strange: when i try to load module with insmod it says "invalid module format".

I discovered that if i run from arm command 'uname -r' version is as following:

3.0.35-2026-geaaf30e

but if i check on the /lib/modules/ folder ltib generated

3.0.35-2310-gc27cb38

how it is possible? I'm building the module using the properly environment variables and the kernel source used is ./ltib/rpm/BUILD/linux-3.0.35/ so i cannot figure out how it can be...problem is also verified when i try command as following:

root@freescale /lib/modules$ modinfo mymodule.ko

modinfo: can't open '/lib/modules/3.0.35-2026-geaaf30e/modules.dep': No such file or directory

If any idea please let me know, thanks for support!

Best Regards

Miroglio Paolo


ラベル(2)
タグ(4)
0 件の賞賛
返信
3 返答(返信)

1,212件の閲覧回数
LeonardoSandova
Specialist I

Hi Paolo,

if you recompile the kernel separately (not using LTIB), I believe you get the issue you are observing. You got two options

1. Do all the kernel changes and run just './ltib' (not ./ltib -p kernel -sc*) and use the rootfs and rootfs/boot/uImage

2. Compile your kernel, either manually (makes) or with ltib (as show above) BUT you need to rename /lib/modules based on the uname -a string.

let me know if it works for you.

Leo

0 件の賞賛
返信

1,212件の閲覧回数
mirogliopaolo
Contributor II

Dear Leo,

sorry if i didn't replied anymore, problem was solved days ago.

I thought kernel must be placed in /boot but with my configuration it must be stored before partition by using dd.

Now vermagic works...

0 件の賞賛
返信

1,212件の閲覧回数
mirogliopaolo
Contributor II

Dear Leo,

i'm not compiling the kernel separately but using the ltib built-in kernel 3.0.35.

Problem still persists, even if i rebuilt kernel, lib folder on rootfs is created with a vermagic, while system have another.

Renaming /lib/modules folder is not a solution, because all .ko modules have the wrong vermagic and claims the invalid module format.

I'll continue to investigate...Thank you.

Paolo

0 件の賞賛
返信