Gamecon driver fails to build on Kernel 4.19.x
-
@Darksavior Topic isn't correct (says 4.4) - it fails to build on 4.19.x - I'll sort it.
-
Looks like the change that breaks the driver is in 4.15, when
setup_timer
was replaced bytimer_setup
in the Linux kernel internal API (https://kernel.googlesource.com/pub/scm/linux/kernel/git/kees/linux/+/for-linus-timers-conversion-final-v4.15-rc1, https://lwn.net/Articles/735887/). -
@mitu Ah. Nice work. Should be an easy IFDEF fix then. No way I know of though of contacting author (maybe email in package info?), but worst case we could fix this ourselves.
This would be better on a GitHub repo also imho. Maybe they would upload their unpackaged files if they don't already have a repository somewhere (if we can contact them).
-
@BuZz The developer "marqs" sometimes posts on the raspberry pi forums. https://www.raspberrypi.org/forums/viewtopic.php?t=15787
This is his github repo: https://github.com/marqs85/
-
@Darksavior thanks! :-)
-
@Darksavior If you're willing to try a patched version (since I have don't have the hardware setup), you can clone from my fork and give it try with the new 4.19.x kernel.
# clone & setup git clone https://github.com/cmitu/gamecon_gpio_rpi cd gamecon_gpio_rpi sudo cp -r gamecon_gpio_rpi-1.3/ /usr/src/ # build the kernel sudo dkms add gamecon_gpio_rpi/1.3 sudo dkms build gamecon_gpio_rpi/1.3 sudo dkms install gamecon_gpio_rpi/1.3
-
@mitu This works. Thanks! Thought I had to wait a few months like the last time the driver broke.
-
@Darksavior Alright, thanks for testing and reporting.
I'll submit the patches upstream - the repo(s) you indicated, maybe we should change also the scriptmodule to pull the sources from there. -
@Darksavior The changes have been pushed upstream and also added to the RetroPie's package. If you want, you can update your RetroPie-setup script and then re-install the
gamecon
driver package to see if it works. -
@mitu Gamecon driver no longer working when using the retropie fkms_rpi4 branch on a pi4. Might be too early for support. I'm asking before I go making a new topic or if it's ok in here.
-
@Darksavior Is the compilation not working or the module loads but the controller doesn't work ?
-
@mitu This time it's different. It seems to compile fine? ES sees both pads and gives me the option to configure them but they won't work. Jstest also sees both pads but no response. Not sure how to check if the module is loaded properly.
https://pastebin.com/fZXz6E7F -
@Darksavior Yes, looks different than on a Pi3. The fact that pads are seen by ES and
jstest
seems to indicate that the driver is loaded, but you can also check withlsmod | grep gamecon_gpio_rpi
Since this is the same Linux kernel version as on Stretch - 4.19, when you reported the issue - I think the problem is with either the GPIO configuration or the module compatibility with to the new PI model.
-
@mitu I ran that command and got
45056 0
At first I thought the controller ports weren't properly connected or maybe something desoldered, but it works fine on a pi3. -
The module is loaded alright, I think is just not compatible with the RPI4 model.
I've looked at thebcm2835
GPIO library and - at the very least - the BCM2708_PERI_BASE is different on the PI4.
I can add a patch if you'd like to test - do you have the possibility to test on both RPI3/RPI4 models ? -
@mitu Yes. I soldered an snes controller connector to an old ide cable so I can easily remove it and test on a pi3 or pi4.
On the pi3, would you like me to test with the latest retropie stretch weekly or use raspbian lite buster with the pi4 branch? -
Seems someone already reported this upstream https://github.com/marqs85/gamecon_gpio_rpi/issues/3.
-
@mitu Thanks! Time for someone else to figure it out how to build it because I can't compile.
-
@Darksavior If you're still willing to test, I've made a few adjustments to the
gamecon_gpio_rpi
module to work on PI4 also (while still being compatible with previous RPI models).All you have to do is replace the contents of
$HOME/RetroPie-Setup/scriptmodules/supplementary/gamecondriver.sh
with http://ix.io/1UaI and then reinstall - remove and install again - the driver. It will pull the sources from my repository instead of the upstream project. -
@mitu Success! Works on my pi4. Many thanks.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.