Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: bpir1 on May 22, 2017, 10:54:17 AM

Title: Compiling A20-Olinuxino-Micro Kernel Module
Post by: bpir1 on May 22, 2017, 10:54:17 AM
Hi all,

I have a a20-plinuxino-micro with kernel version 3.4.103-00033-g9a1cd034181a-dirty. I am trying to compile the Watchdog kernel module for A20-Olinuxino-Micro. I had downloaded the linux-sunxi source code.
Then I Enabled the kernel CONFIG_SUNXI_WATCHDOG=m config module in the .config file. I have followed the instructions for the Building kernel source code for A20-Olinuxino-Micro.
https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-5/BUILD_DESCRIPTION_A20_Olimex_kernel_3.4.103%2B_Jessie_rel_5.txt

But after the successful compilation of the kernel source code, when I tried to load the module in to the Olinuxino-Micro-a20 board I am getting the following error.

root@A20-Olinuxino#insmod sunxi_wdt.ko
insmod ERROR: could not insert module sunxi_wdt.ko: Invalid module format

Following is the dmesg output
sunxi_wdt: Disagrees about version of symbol module_layout

Please help me to download the exact version of the kernel source code.
Title: Re: Compiling A20-Olinuxino-Micro Kernel Module
Post by: Mark13 on June 08, 2017, 11:13:25 AM

I used to forget to copy over the build modules to the target board carefully,
bevore i scripted the process.

also I dont call 'make' at the first place, to not accidently leave the ARCH=... CROSS_COMPILE=...
like:
ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- make