facundo_10
Posts: 7
Joined: Mon Oct 28, 2013 4:49 am

Compiling Module Driver Device - Version trouble ISSUE

Fri Nov 15, 2013 12:29 am

I have installed and downloaded Raspbian from the following link:

http://www.raspberrypi.org/downloads
"2013-09-25-wheezy-raspbian.zip"
The version i installed is 3.6.11+

After installed i make full update

Code: Select all

apt-get update  
apt-get upgrade


After that i follow this tutorial:

http://paulspiblog.wordpress.com/2013/0 ... he-kernel/

And then i try to compile my hello world module. My code is compiled correctly the problem is when i try:

Code: Select all

sudo insmod hello.ko 
I get the next ERROR: Invalid module format

dmesg output:

Code: Select all

hello: no symbol version for module _layout
hello: no symbol version for module_layout
I cannot work around this, i have been 2 days trying to work this out, but i cannot.
I will appreciate any help.

uname -a output:

Code: Select all

Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux
Thanks very much
Facundo

salts
Posts: 13
Joined: Fri Nov 15, 2013 2:38 pm

Re: Compiling Module Driver Device - Version trouble ISSUE

Fri Nov 15, 2013 2:47 pm

Hi,

I may have answered twice, sorry in advance if this is the case.

Did you read the comments? I only ask, as I noticed the blogger has made a comment on fixing a problem due to a change made in September.

facundo_10
Posts: 7
Joined: Mon Oct 28, 2013 4:49 am

Re: Compiling Module Driver Device - Version trouble ISSUE

Fri Nov 15, 2013 6:50 pm

yes i have read the comments, and i have made the following change:

I changed:
wget https://github.com/raspberrypi/firmware ... le.symvers
to:
wget https://raw.github.com/raspberrypi/firm ... le.symvers

Still i don't get lucky to get it working

facundo_10
Posts: 7
Joined: Mon Oct 28, 2013 4:49 am

Re: Compiling Module Driver Device - Version trouble ISSUE

Fri Nov 15, 2013 8:31 pm

For the record:

I am using the following make file.

Code: Select all

obj-m += hello.o

all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

User avatar
hexelpdkk
Posts: 177
Joined: Fri Feb 24, 2012 4:40 pm

Re: Compiling Module Driver Device - Version trouble ISSUE

Sun Nov 17, 2013 9:36 pm

I have to say that I haven't been doing much pi stuff recently, but I wonder whether your troubles are a mismatch between kernel and module.symvers versions. One way to deal with this would be to use rpi-update. This will give you the latest kernel, and that should match the github version. That could mean your kernel is ahead of the distribution one, but that hasn't ever caused me issues (famous last words, I know).

Return to “C/C++”