Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: zeallin on August 22, 2018, 02:40:34 PM

Title: kernel source of Debian Jessie with kernel 3.4.103 + release 13
Post by: zeallin on August 22, 2018, 02:40:34 PM
Hello Guys,

I am trying to compile kernel module for A20 which runs Debian Jessie  image release 13 (torrent) from official web page.
The module I want to compile: https://github.com/Goshik92/XR21B1411-RS-485-driver

I checked out the source and compiled the kernel followed the instruction provided in Github :
https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-8/BUILD_DESCRIPTION_A20_Olimex_kernel_3.4.103%2B_Jessie_rel_8.txt

Then link the kernel source to build kernel module ( replace the softlink "build" from /home/gogo/a20-olimex/linux-sunxi to downloaded source code)

The module can be compiled successfully, but the compiled kernel module can not be installed though insmod.
It failed with "invalid module format"

Where can I find the correct version of kernel header / source to compile kernel module?

Thank you very much!!
Title: Re: kernel source of Debian Jessie with kernel 3.4.103 + release 13
Post by: JohnS on August 22, 2018, 03:37:21 PM
Maybe the posts about this on the net provide the answer?

John
Title: Re: kernel source of Debian Jessie with kernel 3.4.103 + release 13
Post by: zeallin on August 23, 2018, 04:51:16 AM
Hello John,

Do you mean searching with Google?
I've been spent a week finding the solution for this and have no luck.
I suppose expert here who have experience on compiling kernel module can give me some advice.
Thanks!

Best regards,
Zeal
Title: Re: kernel source of Debian Jessie with kernel 3.4.103 + release 13
Post by: JohnS on August 24, 2018, 07:51:33 PM
One thought is that modules are signed and must match the current kernel.

I just compile everything anyway so inevitably all matches.

John