I am trying to create a simple kernel module and run it on a Raspberry Pi. I downloaded the kernel sources from the official raspberry website, but they have a slightly different version of the kernel, and then my raspbian on board. Do I need to have a completely identical version of the kernel on the source and target machines to run the kernel module? I have it on my Raspberry Pi
$ uname -a Linux raspberrypi 4.4.11+
And this is about my module
$ modinfo ./threads.ko filename: /lib/modules/4.4.11+/kernel/mymodules/./threads.ko version: 0.0.1 description: Kernel threads example author: xxxxxx license: GPL srcversion: C906582EC824D2D8DA76BFB depends: vermagic: 4.4.13+ mod_unload modversions ARMv6
As you can see: "4.4.11+" versus "4.4.13 +" ... Why am I asking? I have an error while inserting the module:
$ sudo insmod ./threads.ko insmod: ERROR: could not insert module ./threads.ko: Invalid module format
And I donβt understand, is this a valuable difference in the latest version number of the kernel or is there another problem.
source share