recalbox / mk_arcade_joystick_rpi

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

Not working for RetroPie 4.8 on Pi Zero WH #82

Open danktankk opened 2 years ago

danktankk commented 2 years ago

make -j1 KERNELRELEASE=5.10.103+ all KVERSION=5.10.103+........(bad exit status: 2) Error! Bad return status for module build on kernel: 5.10.103+ (armv6l) Consult /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/make.log for more information.

make.log

DKMS make.log for mk_arcade_joystick_rpi-0.1.5 for kernel 5.10.103+ (armv6l) Mon 30 May 05:47:58 BST 2022 make -C /lib/modules/5.10.103+/build M=/var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build modules make[1]: Entering directory '/usr/src/linux-headers-5.10.103+' CC [M] /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.o /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:152:1: warning: no semicolon at end of struct or union }; ^ /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c: In function ‘i2c_read’: /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:272:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] unsigned short bufidx; ^~~~ /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c: In function ‘mk_process_packet’: /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:347:5: warning: ISO C90 forbids array ‘data’ whose size can’t be evaluated [-Wvla] unsigned char data[mk_data_size]; ^~~~ In file included from ./include/linux/printk.h:7, from ./include/linux/kernel.h:16, from /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:29: /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c: In function ‘mk_setup_pad’: ./include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]

define KERN_SOH "\001" / ASCII Start Of Header /

              ^~~~~~

./include/linux/kern_levels.h:11:18: note: in expansion of macro ‘KERN_SOH’

define KERN_ERR KERN_SOH "3" / error conditions /

              ^~~~~~~~

./include/linux/printk.h:343:9: note: in expansion of macro ‘KERN_ERR’ printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS) ^~~~ /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:426:14: note: in expansion of macro ‘pr_err’ pr_err("Invalid gpio argument\n", pad_type); ^~ /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:458:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (i = 0; i < 2; i++) ^~~ /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:460:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ if (pad_type != MK_ARCADE_MCP23017) ^~ /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c: In function ‘mk_probe’: /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:548:5: error: implicit declaration of function ‘setup_timer’; did you mean ‘del_timer’? [-Werror=implicit-function-declaration] setup_timer(&mk->timer, mk_timer, (long) mk); ^~~ del_timer /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c: In function ‘mk_setup_pad’: /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:467:32: warning: iteration 12 invokes undefined behavior [-Waggressive-loop-optimizations] set_bit(mk_arcade_gpio_btn[i], input_dev->keybit);


/var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.c:466:3: note: within this loop
   for (i = 0; i < mk_max_mcp_arcade_buttons; i++)
   ^~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:280: /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/mk_arcade_joystick_rpi.o] Error 1
make[1]: *** [Makefile:1825: /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.103+'
make: *** [Makefile:9: all] Error 2

Anything I can do to get this working?  Thank you!