RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Gamecon driver fails to build on Kernel 4.19.x

    Scheduled Pinned Locked Moved Help and Support
    retropie-setupgamecongamecon driver
    38 Posts 4 Posters 6.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DarksaviorD
      Darksavior
      last edited by BuZz

      Pi3B+, using retropie-4.4.8-rpi2_rpi3.img.gz weekly from May 26 updated to 4.4.12

      System: Linux retropie 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux
      Loading new gamecon_gpio_rpi-1.3 DKMS files...
      It is likely that 4.19.42-v7+ belongs to a chroot's host
      Building for 4.19.42+ and 4.19.42-v7+
      Building for architecture armv7l
      Building initial module for 4.19.42+
      Error! Bad return status for module build on kernel: 4.19.42+ (armv7l)
      Consult /var/lib/dkms/gamecon_gpio_rpi/1.3/build/make.log for more information.
      

      Make.log

      DKMS make.log for gamecon_gpio_rpi-1.3 for kernel 4.19.42+ (armv7l)
      Mon 27 May 12:18:38 BST 2019
      make -C /lib/modules/4.19.42+/build M=/var/lib/dkms/gamecon_gpio_rpi/1.3/build modules
      make[1]: Entering directory '/usr/src/linux-headers-4.19.42+'
        CC [M]  /var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.o
      /var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.c: In function ‘gc_probe’:
      /var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.c:1138:2: error: implicit declaration of function ‘setup_timer’ [-Werror=implicit-function-declaration]
        setup_timer(&gc->timer, gc_timer, (long) gc);
        ^~~~~~~~~~~
      cc1: some warnings being treated as errors
      scripts/Makefile.build:309: recipe for target '/var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.o' failed
      make[2]: *** [/var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.o] Error 1
      Makefile:1524: recipe for target '_module_/var/lib/dkms/gamecon_gpio_rpi/1.3/build' failed
      make[1]: *** [_module_/var/lib/dkms/gamecon_gpio_rpi/1.3/build] Error 2
      make[1]: Leaving directory '/usr/src/linux-headers-4.19.42+'
      Makefile:5: recipe for target 'all' failed
      make: *** [all] Error 2
      
      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @Darksavior
        last edited by

        The error is quite obvious:

        Module build for kernel 4.14.98-v7+ was skipped since the
        kernel headers for this kernel does not seem to be installed.

        Also, I see at least 3 versions of 4.19.x, while Raspbian only released 1 update - did you use rpi-update to upgrade/downgrade your kernel ?

        DarksaviorD 1 Reply Last reply Reply Quote 0
        • DarksaviorD
          Darksavior @mitu
          last edited by Darksavior

          @mitu I did not. As I said, I only use retropie-setup to update and choose "yes" to update underlying os a few minutes ago from an update from ~6hrs ago. I learned my lesson long ago to not update by other means if I want my pad driver to work. I reverted from my mistake and retro-pie update has worked for months until now. I guess those are the remnants? . I guess I can go back to a weekly and not update retropie at all.

          I'll try and reproduce the problem on a clean weekly and update that.

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @Darksavior
            last edited by

            @Darksavior It's not a RetroPie error - it's a Raspbian package that's missing.
            What version of kernel are you running ? You can install the corresponding package that has the kernel headers so the compilation would work.

            DarksaviorD 1 Reply Last reply Reply Quote 0
            • DarksaviorD
              Darksavior @mitu
              last edited by

              @mitu I decided to use the latest weekly retropie-4.4.8-rpi2_rpi3.img.gz from May 26 and I can't reproduce the problem. No idea why the kernel was updated on my main build. The driver still doesn't build on the weekly, though.

              System: Linux retropie 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux
              Loading new gamecon_gpio_rpi-1.3 DKMS files...
              It is likely that 4.19.42-v7+ belongs to a chroot's host
              Building for 4.19.42+ and 4.19.42-v7+
              Building for architecture armv7l
              Building initial module for 4.19.42+
              Error! Bad return status for module build on kernel: 4.19.42+ (armv7l)
              Consult /var/lib/dkms/gamecon_gpio_rpi/1.3/build/make.log for more information.
              

              make.log

              DKMS make.log for gamecon_gpio_rpi-1.3 for kernel 4.19.42+ (armv7l)
              Mon 27 May 12:18:38 BST 2019
              make -C /lib/modules/4.19.42+/build M=/var/lib/dkms/gamecon_gpio_rpi/1.3/build modules
              make[1]: Entering directory '/usr/src/linux-headers-4.19.42+'
                CC [M]  /var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.o
              /var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.c: In function ‘gc_probe’:
              /var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.c:1138:2: error: implicit declaration of function ‘setup_timer’ [-Werror=implicit-function-declaration]
                setup_timer(&gc->timer, gc_timer, (long) gc);
                ^~~~~~~~~~~
              cc1: some warnings being treated as errors
              scripts/Makefile.build:309: recipe for target '/var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.o' failed
              make[2]: *** [/var/lib/dkms/gamecon_gpio_rpi/1.3/build/gamecon_gpio_rpi.o] Error 1
              Makefile:1524: recipe for target '_module_/var/lib/dkms/gamecon_gpio_rpi/1.3/build' failed
              make[1]: *** [_module_/var/lib/dkms/gamecon_gpio_rpi/1.3/build] Error 2
              make[1]: Leaving directory '/usr/src/linux-headers-4.19.42+'
              Makefile:5: recipe for target 'all' failed
              make: *** [all] Error 2
              
              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @Darksavior
                last edited by mitu

                @Darksavior So it seems it's not building with 4.19.x, that's a real issue.

                DarksaviorD 1 Reply Last reply Reply Quote 0
                • DarksaviorD
                  Darksavior @mitu
                  last edited by

                  @mitu I updated the topic to the real problem.

                  BuZzB 1 Reply Last reply Reply Quote 0
                  • BuZzB
                    BuZz administrators
                    last edited by

                    You will have to downgrade your kernel for now - https://retropie.org.uk/forum/post/190436

                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                    1 Reply Last reply Reply Quote 1
                    • BuZzB
                      BuZz administrators @Darksavior
                      last edited by BuZz

                      @Darksavior Topic isn't correct (says 4.4) - it fails to build on 4.19.x - I'll sort it.

                      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                      1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator
                        last edited by

                        Looks like the change that breaks the driver is in 4.15, when setup_timer was replaced by timer_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/).

                        BuZzB 1 Reply Last reply Reply Quote 1
                        • BuZzB
                          BuZz administrators @mitu
                          last edited by

                          @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).

                          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                          DarksaviorD 1 Reply Last reply Reply Quote 0
                          • DarksaviorD
                            Darksavior @BuZz
                            last edited by Darksavior

                            @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/

                            BuZzB mituM 2 Replies Last reply Reply Quote 1
                            • BuZzB
                              BuZz administrators @Darksavior
                              last edited by BuZz

                              @Darksavior thanks! :-)

                              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                              1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator @Darksavior
                                last edited by mitu

                                @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
                                
                                DarksaviorD 1 Reply Last reply Reply Quote 1
                                • DarksaviorD
                                  Darksavior @mitu
                                  last edited by

                                  @mitu This works. Thanks! Thought I had to wait a few months like the last time the driver broke.

                                  mituM 2 Replies Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator @Darksavior
                                    last edited by mitu

                                    @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.

                                    1 Reply Last reply Reply Quote 1
                                    • mituM
                                      mitu Global Moderator @Darksavior
                                      last edited by

                                      @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.

                                      DarksaviorD 1 Reply Last reply Reply Quote 1
                                      • DarksaviorD
                                        Darksavior @mitu
                                        last edited by Darksavior

                                        @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.

                                        mituM 1 Reply Last reply Reply Quote 0
                                        • mituM
                                          mitu Global Moderator @Darksavior
                                          last edited by

                                          @Darksavior Is the compilation not working or the module loads but the controller doesn't work ?

                                          DarksaviorD 1 Reply Last reply Reply Quote 0
                                          • DarksaviorD
                                            Darksavior @mitu
                                            last edited by Darksavior

                                            @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

                                            mituM 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.