recalbox / mk_arcade_joystick_rpi

Raspberry PI kernel module for arcade joystick on GPIO and MCP23017
GNU General Public License v2.0
201 stars 120 forks source link

Can't insert the module #3

Closed musenwoody closed 9 years ago

musenwoody commented 9 years ago

Hi.

For there is no headers armhf for 3.18.X, I used 3.12.35+: 1

I was able to install it without problems, but it couldn't be inserted: 2

and in dmesg: 3

I found in modinfo: 4

The vermagic was 3.12.35 but not 3.12.35+. At this point I am assuming it is because the module I got is 3.12.35 but my Rpi is running 3.12.35+?

I tried modprobe --force-vermagic and got the same error: 5

I tried the alternative option and get another error: 6

This is what in make.log: 7

Would anyone please point me in the right direction?

digitalLumberjack commented 9 years ago

Hi,

Ok i modified the make few days ago. This is what causes the compîlation error. I'm going to make so changes in paralel to the other bug.

I'll let you know

musenwoody commented 9 years ago

Hi.

Thank you for your reply.I will try to compile again when you update the make.

And I want to know that if the vermagic was wrong when I tried to insert module. How could I get the right vermagic matched my kernel?

Can you help me please?

Thanks in advance

digitalLumberjack commented 9 years ago

I think the only way to recompile the module without having headers available in apt, is to recompile the whole kernel, to have a Module.symvers created, and then recompile the module. Ugly.

You are 3.12.35+ check at http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/ you headers are available.

musenwoody commented 9 years ago

Thank you for your reply.

I do have 3.12.35+ headers installed. 1

But After I installed the driver I still couldn't insert it because of the wrong vermagic in modinfo: 3.12.35

Is there something wrong with what I have done? How can I add a symbol "+" in the vermagic?

digitalLumberjack commented 9 years ago

Hi pal, i restore the first makefile, could you try to reclone the repository and try to make the module ?

musenwoody commented 9 years ago

Thank you!

I'll have a try right now

musenwoody commented 9 years ago

It seems that the Makefile works: 2

but... 3

and in dmesg: 4

modinfo: 6

musenwoody commented 9 years ago

Hi.

I think the problem is there is something wrong with the module i compiled.Because I only get the vermagic "3.12.35".

And vermagic of the other modules worked on the Rpi is "3.12.35+" For example: 7

Any opinions?

digitalLumberjack commented 9 years ago

I changed my kernel to 3.12.35+, installed corresponding headers, tried to build the module. I have the same error as you.

And i can't explain yet :(

musenwoody commented 9 years ago

Thank you for your help. Maybe I should try another kernel .

Which version of kernel do you suggest to compile the module?

BTW, I downloaded the new RetroPie image(ver :2.4.2 beta) today. And I found that the kernel is 3.12.35+ too ...

digitalLumberjack commented 9 years ago

i'm goning to try the 3.12.2X or something like that. This issue here is that i wrote the driver with my c c++ skills but when it comes to kernel revision version errors with the good kernel and the good headers, i'm not so good...

digitalLumberjack commented 9 years ago

I'll try to install db9 or gamecon from http://www.niksula.hut.fi/~mhiienka/Rpi/ . I based the installation script and package on thoses. If they work i'll be able to correct the error.

musenwoody commented 9 years ago

Hi pal, you have done a great job of course !

I hope I could help with your project.I'll let you know once I make further progress.

digitalLumberjack commented 9 years ago

Ok, it works really great with kernel and headers 3.12.28+

digitalLumberjack commented 9 years ago

I'm contacting marqs, the original author of db9 driver, he publishes the headers on http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/ too.

Maybe he can explain.

digitalLumberjack commented 9 years ago

Just for info, by configuring the Makefile in /lib/modules/3.12.38+/build/Makefile to have the + beside the version, the vermagic is ok, but that doesn't change nothing, the module won't load.

musenwoody commented 9 years ago

Thank you for your reply!

I will try 3.12.28+ , and 3.12.38+ later.

digitalLumberjack commented 9 years ago

Tell me if it's ok with 3.12.28+ ;)

The second solution would be to compile your own kernel and install it. But on RPi, it would take about 12 hours.

musenwoody commented 9 years ago

I will reply ASAP :)

musenwoody commented 9 years ago

Hi pal.

I got the same error on 3.12.28+

I tried a fresh image of RetroPie 2.3.

$ sudo rpi-update de69b134dc6e4066fe70db29816d57895dffd9b9 $ sudo reboot . . . $ sudo sh ./install.sh 1

And would you please tell me which line you edited in /lib/modules/3.12.X/build/Makefile to get the matched vermagic?

I tried this: 2

But it didn't work.

digitalLumberjack commented 9 years ago

I released a 0.1.3 version.

marqs updated it's header generator script, where the Module.symvers fetched was not the good one.

Now it works with 3.18.X kernels

digitalLumberjack commented 9 years ago

I'll be glad if you can test and confirm that :)

musenwoody commented 9 years ago

Hi. Thank you for your update! I will test it wiith pleasure!

musenwoody commented 9 years ago

Finally it worked on 3.18.3+.

Thank you for your great work!

digitalLumberjack commented 9 years ago

Super good !