1
votes

I'm using YOCTO PROJECT to build a linux os for my embedded board. I have a module named uleds which i want insert to my kernel so i taped this insmod command:

insmod /lib/modules/4.14.73-linux4sam-6.0-dirty/kernel/drivers/leds/uleds.ko

But an errors comes out :

uleds: version magic '4.14.88-01445-g234c56a01768-dirty mod_unload ARMv7 p2v8 ' should be '4.14.73-linux4sam-6.0-dirty mod_unload ARMv7 p2v8 '

uleds: version magic '4.14.88-01445-g234c56a01768-dirty mod_unload ARMv7 p2v8 ' should be '4.14.73-linux4sam-6.0-dirty mod_unload ARMv7 p2v8 '

insmod: can't insert '/lib/modules/4.14.73-linux4sam-6.0-dirty/kernel/drivers/leds/uleds.ko': invalid module

What i see that my linux kernel version and the module version are not the same. My question is How can I fix this problem so I can insert the module to the kernel ?

1

1 Answers

1
votes

The module is not compiled with the same version as your kernel (on the embedded device).

You need to simply compile the module with the right kernel.

You will need to find your kernel recipe in the meta of Yocto, download it (reset the repository of the downloaded kernel to the SRCREV of the recipe), then build your module.