0
votes

I would like to solve this error which occurred, apparently, when updating and building a Kernel and using a previous Linux Device Driver Module (I changed one or two parameter setting to the kernel, compiled and built and get new Kernel image, for which the problem get started).

But, when building the new module device driver , I keep getting the error:

[nn.nnn] 'module.ko': version magic '4.9.0-00011-ge82bfab-dirty SMP mod_unload aarch64' should be '4.9.0 SMP mod_unload aarch64'

Few comments:

  • Checked a previous post related issue (insmod error: inserting './hello.ko': -1 Invalid module format"), but it uses 'uname -a' which is not helpfull for me as I using my Linux OS as compilation environment to other OS (embedded) - cross-compilation usage.
  • I searched for the version string across the Kernel source tree (kernel downloaded package) but found only the places of auto-generated strings (at ../include/generated/utsrelease.h)
  • the Makefiles both for Kernel (I am using uImage: u-boot Legacy uImage, Linux / OS Kernel) and for the module.ko using same CROSS_COMPILE path.

What I am missing here?

1
You have built the module for the kernel from, probably, the git repo (ge82bfab-dirty), but your kernel is built from other sources.Tsyvarev
Hi @Tsyvarev, how could this be possible if I am using same CROSS_COMPILE path which directs to same kernel version? (See my 3rd comments @post)Itzik Chaimov
I don't know. Probably, you have loaded wrong kernel.Tsyvarev

1 Answers

0
votes

found the problem. Thought I was using the correct Kernel compilation but - as implied @Tsyvarev, i took the other Kernel version all this time. :-)