About Blog Projects Papers Contact

I said I'd never blog

DeforaOS, NetBSD, reverse-engineering and stuff
Loading kernel modules on Linux
Blog post by khorben
on Friday, March 27 2009, 17:14

Member of

A while ago, I made this contribution to the Openmoko project: plugging a webcam on the Freerunner. The relevant kernel modules are now compiled by default in the GTA02 kernel from pkg-fso.

The point being, I was recently testing SCTP support on the Openmoko, and I used the same technique to get the kernel module to compile. But then, it kept failing with this error:

insmod: error inserting './sctp.ko': -1 Invalid module format
The problem was that even though my kernel sources did match the one running, the /usr/src/linux/Makefile's EXTRAVERSION parameter was not filled in (typically, with the git commit hash). The kernel then refused to load the module, because of a version mismatch.

The good news is that SCTP seems to work: I got these fine examples to work directly. You'll need to install libsctp-dev to get the necessary include files. The SCTP module is also compiled by default now :)

So, just in case you get this error as well, think about this!

Come back...

Creative Commons License RSS