Please do not post a support request without first reading and following the advice in

[solved] gamecon_gpio_rpi failed install (/usr/src/linux-headers-4.4.11+ missing rule?)

  • Just upgraded everything to try and get my direct-wired (GPIO) NES controller to work in game, as well as in emulationstation, but now installing the gamecon drivers fails.

    using retropie-setup option it does:

    starting installation.
    gamecon is the newest version
    db9 is the newest version
    modinfo: ERROR: module gamecon_gpio_rpi not found.

    I tried making the gamecon_gpio_rpi module directly in the build folder:

    pi@retropie:/var/lib/dkms/gamecon_gpio_rpi/1.0/build $ sudo make
    make -C /lib/modules/`uname -r`/build M= modules
    make[1]: Entering directory '/usr/src/linux-headers-4.4.11+'
      CHK     include/config/kernel.release
      CHK     include/generated/uapi/linux/version.h
      CHK     include/generated/utsrelease.h
    make[2]: 'include/generated/mach-types.h' is up to date.
      CHK     include/generated/bounds.h
    make[2]: *** No rule to make target 'kernel/time/timeconst.bc', needed by 'include/generated/timeconst.h'.  Stop.
    Makefile:986: recipe for target 'prepare0' failed
    make[1]: *** [prepare0] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-4.4.11+'
    Makefile:5: recipe for target 'all' failed
    make: *** [all] Error 2

    Any suggestions?

    Pi Zero; Binary Install; v3.8

  • @bubbleking This is exactly the same error that I am getting with mk_arcade_joysick_rpi. It appears that the issue is linked to a file that seems to not compile in the headers file (timeconst). I have managed to narrow it down to being specific to the kernel version that was updated in RetroPie 3.8. If I try any other kernel version (old raspbian images, old retropie images), it still works. I am hoping that someone can shine some light on to what is happening. I have gone as far as my limited knowledge allows.

    My post below:

  • administrators

    Looks like a problem with the external headers package. I noticed there is a packaged kernel headers file now included with Raspbian (I have a feeling there wasn't when this code was originally written), so I have adjusted the script to use that. I have also made it use the newer v1.2 version of gamecon-gpio and have fixed a minor version check bug I introduced recently.

    if you update retropie-setup and then try and install from the retropie-setup menu 3 it will hopefully work (builds here at least).

  • Hi, thanks @BuZz - all seems to work now. I got a few errors flash past as it was building but nothing that has stopped it from working. Hope it fixes it for you too @simonster.

    I did have to play about with the retroarch.cfg file in the /nes folder to get it to work with my NES controller, but fixed it by setting the player 1 control to:
    b_btn = "1"
    select_btn = "2"
    start_btn = "3"
    up_axis = "-1"
    down_axis = "+1"
    left_axis = "-0"
    right_axis = "+0"
    a_btn = "0"

    All the rest to "nul". If I didn't do this then as soon as I started a nes game it would not respond - I'm sure there is a proper config, but I spent a few hours playing about with the config files before I got it working so now enjoying some sweet retro gaming :)

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.