diff --git a/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm b/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm index 764e80f084..ef053288a2 100755 --- a/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm +++ b/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm @@ -2,7 +2,9 @@ set -e # debug Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogspurlinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +#OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-g3 -O0 -DDEBUGVM=1 -DDEBUG=1 -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DMUSL -D_GNU_SOURCE" + if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.cog.spur/build/mvm b/build.linux32ARMv6/squeak.cog.spur/build/mvm index e1fd0f57bc..7a5cbe4d5d 100755 --- a/build.linux32ARMv6/squeak.cog.spur/build/mvm +++ b/build.linux32ARMv6/squeak.cog.spur/build/mvm @@ -2,7 +2,7 @@ set -e # Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogspurlinuxhtRPi -OPT="-m32 -g -O2 -DNDEBUG -DDEBUGVM=0" +OPT=" -g -O2 -DNDEBUG -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm b/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm index 57dd6a5e84..b292aed4f7 100755 --- a/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm +++ b/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstkspurlinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-m32 -g3 -O0 -DDEBUGVM=1 -DDEBUG_EVENTS=1 -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS " if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux64ARMv8/squeak.cog.spur/build.debug/mvm b/build.linux64ARMv8/squeak.cog.spur/build.debug/mvm index 6227b8afe0..3c2062da95 100755 --- a/build.linux64ARMv8/squeak.cog.spur/build.debug/mvm +++ b/build.linux64ARMv8/squeak.cog.spur/build.debug/mvm @@ -4,7 +4,8 @@ set -e INSTALLDIR=debug/sqcogspur64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 MACHINE="-march=armv8-a -mtune=cortex-a72" -OPT="-g3 -O0 -DDEBUGVM=1 -DAIO_DEBUG=1" +OPT="-g3 -O0 -DDEBUGVM=1 -DAIO_DEBUG=1 -DDEBUG -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DMUSL -D_GNU_SOURCE" + if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift @@ -20,7 +21,7 @@ test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp - test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) test -f config.h || ../../../platforms/unix/config/configure \ --with-vmversion=5.0 --with-src=spur64src \ - --without-vm-display-fbdev --without-npsqueak \ + --without-npsqueak \ CFLAGS="$MACHINE $OPT -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1" \ LIBS="-lrt" diff --git a/build.linux64ARMv8/squeak.cog.spur/build/mvm b/build.linux64ARMv8/squeak.cog.spur/build/mvm index b2bcf24c4f..98e0e30a12 100755 --- a/build.linux64ARMv8/squeak.cog.spur/build/mvm +++ b/build.linux64ARMv8/squeak.cog.spur/build/mvm @@ -4,7 +4,8 @@ set -e INSTALLDIR=sqcogspur64ARMv8linuxht # armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5 MACHINE="-march=armv8-a -mtune=cortex-a72" -OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV" +OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE" +##OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV" ##OPT="-g -O3 -DNDEBUG -DDEBUGVM=0" if [ $# -ge 1 ]; then diff --git a/build.linux64ARMv8/squeak.stack.spur/build.debug/mvm b/build.linux64ARMv8/squeak.stack.spur/build.debug/mvm index 7c2a9aa578..4304a621a6 100755 --- a/build.linux64ARMv8/squeak.stack.spur/build.debug/mvm +++ b/build.linux64ARMv8/squeak.stack.spur/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstkspur64ARMv8linuxht -OPT="-g3 -O0 -DDEBUG -DDEBUGVM=1 -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DUSEEVDEV -DMUSL" +OPT="-g3 -O0 -DDEBUG -DDEBUGVM=1 -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DMUSL" ### OPT="-g3 -O0 -DDEBUGVM=1" diff --git a/build.linux64ARMv8/squeak.stack.spur/build/mvm b/build.linux64ARMv8/squeak.stack.spur/build/mvm index 91b3434ddc..07e393bea3 100755 --- a/build.linux64ARMv8/squeak.stack.spur/build/mvm +++ b/build.linux64ARMv8/squeak.stack.spur/build/mvm @@ -2,7 +2,8 @@ set -e # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspur64ARMv8linuxht -OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV" +OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE" +##OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV" ### OPT="-g -O2 -DNDEBUG -DDEBUGVM=0" if [ $# -ge 1 ]; then diff --git a/platforms/unix/vm-display-fbdev/sqUnixEvdevKeyMouse.c b/platforms/unix/vm-display-fbdev/sqUnixEvdevKeyMouse.c index 2b6bf6af8f..ecf9b4de0c 100644 --- a/platforms/unix/vm-display-fbdev/sqUnixEvdevKeyMouse.c +++ b/platforms/unix/vm-display-fbdev/sqUnixEvdevKeyMouse.c @@ -535,9 +535,12 @@ void kb_open(struct kb *kbdSelf, int vtSwitch, int vtLock) int rc; assert(kbDev.fd == -1); - kbDev.fd= open(kbDev.kbName= KEYBOARD_DEV_NAME, O_RDONLY|O_NONBLOCK); + if (kbDev.kbName == 0) { + kbDev.kbName= KEYBOARD_DEV_NAME; + } + kbDev.fd= open(kbDev.kbName, O_RDONLY|O_NONBLOCK); if (kbDev.fd < 0) { - DPRINTF("FAILED TO OPEN: %s\n", KEYBOARD_DEV_NAME); + DPRINTF("FAILED TO OPEN: %s\n", kbDev.kbName); failPermissions("console"); } else { DPRINTF("evdev opened Keyboard device %s\n", kbDev.kbName); diff --git a/platforms/unix/vm-display-fbdev/sqUnixFBDev.c b/platforms/unix/vm-display-fbdev/sqUnixFBDev.c index 316e521dcc..ed63a98fe4 100644 --- a/platforms/unix/vm-display-fbdev/sqUnixFBDev.c +++ b/platforms/unix/vm-display-fbdev/sqUnixFBDev.c @@ -124,12 +124,12 @@ static struct kb *kb= 0; static struct fb *fb= 0; #include "sqUnixFBDevUtil.c" -#ifdef USEEVDEV -#include "sqUnixEvdevKeycodeMap.c" -#include "sqUnixEvdevKeyMouse.c" -#else +#ifdef NOEVDEV #include "sqUnixFBDevMouse.c" #include "sqUnixFBDevKeyboard.c" +#else +#include "sqUnixEvdevKeycodeMap.c" +#include "sqUnixEvdevKeyMouse.c" #endif #include "sqUnixFBDevFramebuffer.c" @@ -173,7 +173,7 @@ static void openKeyboard(void) { kb= kb_new(); kb_open(kb, vtSwitch, vtLock); -#ifndef USEEVDEV +#ifdef NOEVDEV kb_setCallback(kb, enqueueKeyboardEvent); #endif } @@ -182,11 +182,11 @@ static void closeKeyboard(void) { if (kb) { -#ifndef USEEVDEV +#ifdef NOEVDEV kb_setCallback(kb, 0); #endif kb_close(kb); -#ifndef USEEVDEV +#ifdef NOEVDEV kb_delete(kb); #endif kb= 0; @@ -209,7 +209,7 @@ static void openMouse(void) { ms= ms_new(); ms_open(ms, msDev, msProto); -#ifndef USEEVDEV +#ifdef NOEVDEV ms_setCallback(ms, enqueueMouseEvent); #endif } @@ -218,11 +218,11 @@ static void closeMouse(void) { if (ms) { -#ifndef USEEVDEV +#ifdef NOEVDEV ms_setCallback(ms, 0); #endif ms_close(ms); -#ifndef USEEVDEV +#ifdef NOEVDEV ms_delete(ms); #endif ms= 0; @@ -246,12 +246,12 @@ static sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds) static sqInt display_ioProcessEvents(void) { -#ifdef USEEVDEV +#ifdef NOEVDEV + aioPoll(0); +#else processLibEvdevMouseEvents(); processLibEvdevKeyEvents(); /* sets modifier bits */ processLibEvdevMouseEvents(); -#else - aioPoll(0); #endif return 0; } @@ -314,7 +314,7 @@ static void openDisplay(void) openFramebuffer(); // init mouse after setting graf mode on tty avoids packets being // snarfed by gpm -#ifndef USEEVDEV +#ifdef NOEVDEV ms->init(ms); #endif } @@ -340,7 +340,7 @@ static void display_winInit(void) #if defined(AT_EXIT) AT_EXIT(closeDisplay); #else -# warning: cannot release /dev/fb on exit! +# warning: cannot release /dev/fb0 on exit! # endif (void)recordMouseEvent; @@ -365,7 +365,7 @@ static void failPermissions(const char *who) fprintf(stderr, " (you might be able to load one with 'modprobe'; look in\n"); fprintf(stderr, " /lib/modules for something called 'fb.o'\n"); fprintf(stderr, " - you don't have write permission on some of the following\n"); - fprintf(stderr, " /dev/tty*, /dev/fb*, /dev/psaux, /dev/input/mice\n"); + fprintf(stderr, " /dev/tty*, /dev/fb*, /dev/input/event?, /dev/input/mouse0\n"); fprintf(stderr, " - you need to run Squeak as root on your machine\n"); exit(1); } @@ -374,12 +374,13 @@ static void failPermissions(const char *who) static void display_printUsage(void) { printf("\nFBDev