FX30 spisvc ko cannot insmod [SOLVED]


#1

After building spisvc as explained in “Out of tree kernel modules” section in Legato Reference manual, I fail to insmod the ko file.

a dmesg gives the following log:
[ 497.690889] spisvc: version magic '3.14.29ltsi-a00e464379_b0ce579abb preempt mod_unload ARMv7 ’ should be '3.14.29ltsi-a00e464379_3f15cd39ad preempt mod_unload ARMv7 ’

is it a matter of kernel version? and how can i solve it?

EDIT 1:
in the tutorial it says:
“Warning
Ensure the kernel sources version used to compile the module matches the kernel version running on the target.”

So how to assure that?!

EDIT 2:

So it turned out kernel version must match.

Download the latest firmware "WP85xx & WP75xx Firmware Packages - Release 14 " at https://source.sierrawireless.com/resources/legato/wpfirmwarerelease14/

update FX30 with above downloaded firmware: $fwupdate download WPx5xx_Release14_GENERIC_SPK.spk 192.168.2.2

this will install legato 16.10.3, and the kernel in the update

check kernel version after login to FX30 $uname -r
resulte: 3.14.29ltsi-961ca71325_ab5094eade

In Developer studio download the package "legato for wp85/wp75 R14 (16.10.3…)

just to make sure that package contains the right tool-chain search in the directory where it was downloaded for the kernel version taken from above “3.14.29ltsi-961ca71325_ab5094eade”

If found proceed to building the modules as described in the legato reference manual. The only thing is that in the final step instead of a “$make” command, issue “make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-”

after that “#insmod spisvc.ko” worked perfectly and now an “#ls /dev/sp*” shows
/dev/spidev0.0

Also in Developer studio under Device->Application, spiService can now run without errors. (previously it exited complaining there’s no /dev/spidev0.0)

Thanks


#2

I suspect it is with the kernel version mismatch with which the module got build.


#3

I am a newbie in that… how can I update the kernel on the device to match the one m building with?

someone on this forum suggested to modify /etc/modules and add spidev
seems loaded now.

root@fx30:~# lsmod | grep spi
spidev 6108 0 - Live 0xbf076000
root@fx30:~#