[squeak-dev] Small diff for the new Joystick updates on old enough Linux

Tobias Pape Das.Linux at gmx.de
Tue Jun 14 12:09:12 UTC 2022


Hi Bruce

> On 14. Jun 2022, at 12:57, Bruce O'Neel <bruce.oneel at pckswarms.ch> wrote:
> 
> Hi,
> 
> Thanks, you did very good due diligence but ubuntu 20.04 is way way too young :-)
> 
> RHEL 7 has a kernel version of 3.10, so just before Ubuntu 14.04.  Yes, that old. 

_now_ I get what you meant. sorry.

can you have a look at https://github.com/OpenSmalltalk/opensmalltalk-vm/tree/krono/fix-for-bruce-joystick ?

Best regards
	-Tobias


> 
> RHEL 8 is fine with a kernel version of 4.18.
> 
> So any sane person won't run into this problem which is why I do not think we should make any effort to work around it.  It is only us insane people who insist on upgrading only when it becomes a dire necessity will ever trip over this.  Or insist in working for giant companies which is basically the same issue.
> 
> Thanks, and don't stress.
> 
> cheers
> 
> bruce
> 
> On 2022-06-14T11:47:54.000+02:00, Tobias Pape <Das.Linux at gmx.de> wrote:
> Hi Bruce,
> 
> 
> On 13. Jun 2022, at 17:17, Bruce O'Neel <bruce.oneel at pckswarms.ch> wrote:
> 
> Hi,
> 
> I am sending this just to save the next person who stumbles over the new Joystick stuff not building on old enough linuxes some time. In my case old enough is RedHat 7.
> 
> We should not add complexity to make this automagic. But when someone says "does not build on Linux kernels 3.x or so", I know, ancient, we can say "here, this patch."
> 
> I am actually quite puzzled.
> I've checked on ubuntu 20.04 and 22.04, and there the include file and the defined constants exist.
> (With the linux-libc-dev package installed)
> 
> On RHEL, you just need the kernel-headers package, and there you are :)
> 
> Best regards
> -Tobias
> 
> 
> cheers
> 
> bruce
> 
> 
> 
> git diff ../../../../platforms/unix/plugins/JoystickTabletPlugin/sqUnixJoystickTablet.c
> diff --git a/platforms/unix/plugins/JoystickTabletPlugin/sqUnixJoystickTablet.c b/platforms/unix/plugins/JoystickTabletPlugin/sqUnixJoys
> index b2e69c7..a3baf8d 100644
> --- a/platforms/unix/plugins/JoystickTabletPlugin/sqUnixJoystickTablet.c
> +++ b/platforms/unix/plugins/JoystickTabletPlugin/sqUnixJoystickTablet.c
> @@ -26,7 +26,7 @@
> */
> 
> /* Author: Ian.Piumarta at INRIA.Fr
> -/* Author: davidf at afeka.ac.il
> + Author: davidf at afeka.ac.il
> */
> 
> #include <assert.h>
> @@ -42,7 +42,7 @@
> #include <dirent.h>
> #include <errno.h>
> #include <poll.h>
> -#include <linux/input-event-codes.h>
> +// #include <linux/input-event-codes.h>
> #include <linux/input.h>
> #include "JoystickTabletPlugin.h"
> 
> @@ -161,10 +161,10 @@ detectButtons(joystick_state_t* pj)
> else {
> // it's a modern gamepad device
> 
> - pj->button_index[0] = BTN_NORTH;
> +/* pj->button_index[0] = BTN_NORTH;
> pj->button_index[1] = BTN_EAST;
> pj->button_index[2] = BTN_SOUTH;
> - pj->button_index[3] = BTN_WEST;
> + pj->button_index[3] = BTN_WEST; */
> }
> 
> return 1;
> 
> 




More information about the Squeak-dev mailing list