# FX30 spisvc ko cannot insmod \[SOLVED\]

**URL:** <https://forum.legato.io/t/fx30-spisvc-ko-cannot-insmod-solved/2874>\
**Category:** Uncategorized\
**Created:** [December 16, 2017, 10:10am UTC](https://forum.legato.io/t/fx30-spisvc-ko-cannot-insmod-solved/2874 "2017-12-16T10:10:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobolos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/nobolos/32/292_2.png) [@nobolos](https://forum.legato.io/u/nobolos)\
**Post date:** [December 16, 2017, 10:10am UTC](https://forum.legato.io/t/fx30-spisvc-ko-cannot-insmod-solved/2874/1 "2017-12-16T10:10:54Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![Manukumar](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Manukumar](https://forum.legato.io/u/Manukumar)\
**Post date:** [December 16, 2017, 10:59am UTC](https://forum.legato.io/t/fx30-spisvc-ko-cannot-insmod-solved/2874/2 "2017-12-16T10:59:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nobolos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/nobolos/32/292_2.png) [@nobolos](https://forum.legato.io/u/nobolos)\
**Post date:** [December 16, 2017, 11:11am UTC](https://forum.legato.io/t/fx30-spisvc-ko-cannot-insmod-solved/2874/3 "2017-12-16T11:11:25Z")

</div>

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:~#
