July 07, 2020, 09:05:06 am


Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/

Kernel 3.4.61 vs 3.4.61+

Started by nikitaterm, September 27, 2015, 04:26:40 am

Previous topic - Next topic


Hi all!

I have a problem which I can't solve one week already. Your help, probably, is the only opportunity to solve the issue.

The problem:
I want to build my own kernel module for Cubieboard2, lubuntu desktop. What I did:
1) Token the image and sources from here: http://dl.cubieboard.org/software/a20-cubieboard/lubuntu/cb-a20-lubuntu-12.10-v1.06/cb2-lubuntu-desktop-20131026/
2) Flashed the board with the image (using LiveSuit)
3) Unpacked the source .tar archive
4) Executed 'cat cubieboard2_defconfig > linux kernel-source/.config'
5) Executed 'make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules'
6) Built the driver with kernel sources
And I had got the driver.ko file. Nice!
After that I had scp'ed it to the device and tried to insmod it. And I had got 'Invalid module format' error. It seems like the kernel version on the device and the sources tree are different. I've checked it. And that is: 'make kernelversion' shows 3.4.61, but on the device 'uname -r' shows 3.4.61+. I don't know what is the difference between 3.4.61 and 3.4.61+, but I think this is the reason of the error message. The first question is: WHY .img file and kernel sources from the same project folder have different kernel versions?
And the second one: how to have a deal with such situation? How to build the driver without changing the Kernel.