diff -ru quake2-r0.16.1/Makefile quake2-r0.16.1-a1200/Makefile
--- quake2-r0.16.1/Makefile	2005-01-01 22:47:10.000000000 -0500
+++ quake2-r0.16.1-a1200/Makefile	2009-11-06 06:22:25.000000000 -0500
@@ -14,15 +14,15 @@
 # game$(ARCH).so is automatically built.
 BUILD_SDLQUAKE2=YES	# sdlquake2 executable (uses SDL for cdrom and sound)
 BUILD_SVGA=NO		# SVGAlib driver. Seems to work fine.
-BUILD_X11=YES		# X11 software driver. Works somewhat ok.
-BUILD_GLX=YES		# X11 GLX driver. Works somewhat ok.
+BUILD_X11=NO		# X11 software driver. Works somewhat ok.
+BUILD_GLX=NO		# X11 GLX driver. Works somewhat ok.
 BUILD_FXGL=NO		# FXMesa driver. Not tested. (used only for V1 and V2).
 BUILD_SDL=YES		# SDL software driver. Works fine for some people.
-BUILD_SDLGL=YES		# SDL OpenGL driver. Works fine for some people.
+BUILD_SDLGL=NO		# SDL OpenGL driver. Works fine for some people.
 BUILD_CTFDLL=YES	# game$(ARCH).so for ctf
 BUILD_XATRIX=NO		# game$(ARCH).so for xatrix (see README.r for details)
 BUILD_ROGUE=NO		# game$(ARCH).so for rogue (see README.r for details)
-BUILD_JOYSTICK=YES	# build in joystick support
+BUILD_JOYSTICK=NO	# build in joystick support
 BUILD_ARTS=NO		# build in support for libaRts sound.
 BUILD_ALSA=NO		# build in support for ALSA (default sound on 2.6)
 BUILD_DEDICATED=NO	# build a dedicated quake2 server
@@ -31,7 +31,7 @@
 BUILD_RETEXTURE=NO	# build a version supporting retextured graphics
 BUILD_REDBLUE=NO	# build a red-blue 3d glasses renderer...
 STATICSDL=NO
-SDLDIR=/usr/local/lib
+SDLDIR=/opt/toolchains/motoezx/lib
 
 # Other compile-time options:
 # Compile with IPv6 (protocol independent API). Tested on FreeBSD
@@ -59,6 +59,7 @@
 ifneq ($(ARCH),x86_64)
 ifneq ($(ARCH),i386)
 ifneq ($(ARCH),axp)
+ifneq ($(ARCH),arm)
 ifneq ($(ARCH),ppc)
 ifneq ($(ARCH),sparc)
 $(error arch $(ARCH) is currently not supported)
@@ -67,14 +68,20 @@
 endif
 endif
 endif
+endif
 
-CC=gcc
+CC=arm-linux-gnu-gcc
 
 ifeq ($(ARCH),axp)
 RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
 	-fomit-frame-pointer -fexpensive-optimizations
 endif
 
+ifeq ($(ARCH),arm)
+RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
+	-fomit-frame-pointer -fexpensive-optimizations -g -O2 -mtune=iwmmxt -march=iwmmxt -Wall -I/opt/toolchains/motoezx/include
+endif
+
 ifeq ($(ARCH),ppc)
 RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \
 	-fomit-frame-pointer -fexpensive-optimizations
@@ -118,7 +125,7 @@
 ROGUE_DIR=$(MOUNT_DIR)/rogue
 NULL_DIR=$(MOUNT_DIR)/null
 
-BASE_CFLAGS=-Wall -pipe -Dstricmp=strcasecmp
+BASE_CFLAGS=-Wall -march=iwmmxt -mtune=iwmmxt -O2 -pipe -Dstricmp=strcasecmp -lpthread -D_GNU_SOURCE=1 -DQWS -Dmain=SDL_main -D_REENTRANT -lSDLmain -lSDL -I/opt/toolchains/motoezx/include -L/opt/toolchains/motoezx/lib
 ifeq ($(HAVE_IPV6),YES)
 BASE_CFLAGS+= -DHAVE_IPV6
 ifeq ($(OSTYPE),FreeBSD)
@@ -154,7 +161,7 @@
 LDFLAGS=-lm
 endif
 ifeq ($(OSTYPE),Linux)
-LDFLAGS=-lm -ldl
+LDFLAGS=-lm -ldl $(shell sdl-config --libs)
 endif
 
 ifeq ($(strip $(BUILD_ARTS)),YES)
@@ -174,12 +181,10 @@
 
 SDLCFLAGS=$(shell sdl-config --cflags)
 ifeq ($(strip $(STATICSDL)),YES)
-	SDLLDFLAGS += -L/usr/X11R6/lib$(_LIB) -Wl,-Bstatic $(SDLDIR)/libSDL.a
-	SDLLDFLAGS += $(SDLDIR)/libesd.a $(SDLDIR)/libartsc.a -Wl,-Bdynamic
-	SDLLDFLAGS += -lpthread -lX11 -lXext -lXxf86dga -lXxf86vm -lXv \
-		-lXinerama
+	SDLLDFLAGS += -Wl,-Bstatic $(SDLDIR)/libSDL.a
+	SDLLDFLAGS += -lpthread -D_GNU_SOURCE=1 -DQWS -Dmain=SDL_main -D_REENTRANT -lSDLmain -lSDL
 else
-	SDLLDFLAGS=$(shell sdl-config --libs)
+	SDLLDFLAGS=$(shell sdl-config --libs) 
 endif
 
 ifeq ($(strip $(BUILD_JOYSTICK)),YES)
@@ -270,6 +275,36 @@
  endif
 endif # ARCH axp
 
+ifeq ($(ARCH),arm)
+ ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
+  TARGETS += $(BUILDDIR)/sdlquake2
+ endif
+ 
+ ifeq ($(strip $(BUILD_SVGA)),YES)
+  $(warning Warning: SVGAlib support not supported for $(ARCH))
+ endif
+
+ ifeq ($(strip $(BUILD_X11)),YES)
+  TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT)
+ endif
+
+ ifeq ($(strip $(BUILD_GLX)),YES)
+  TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT)
+ endif
+
+ ifeq ($(strip $(BUILD_FXGL)),YES)
+  $(warning Warning: FXGL support not supported for $(ARCH))
+ endif
+
+ ifeq ($(strip $(BUILD_SDL)),YES)
+  TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT)
+ endif
+
+ ifeq ($(strip $(BUILD_SDLGL)),YES)
+  TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
+ endif
+endif # ARCH arm
+
 ifeq ($(ARCH),ppc)
  ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
   TARGETS += $(BUILDDIR)/sdlquake2
@@ -477,7 +512,7 @@
 	$(BUILDDIR)/client/pmove.o
 
 QUAKE2_LNX_OBJS = \
-	$(BUILDDIR)/client/cd_linux.o 
+#	$(BUILDDIR)/client/cd_linux.o 
 ifeq ($(BUILD_ARTS),YES)
 QUAKE2_LNX_OBJS += $(BUILDDIR)/client/snd_arts.o
 else
@@ -489,7 +524,6 @@
 endif
 
 QUAKE2_SDL_OBJS = \
-	$(BUILDDIR)/client/cd_sdl.o \
 	$(BUILDDIR)/client/snd_sdl.o
 
 ifeq ($(ARCH),i386)
@@ -643,8 +677,8 @@
 $(BUILDDIR)/client/net_udp6.o :    $(LINUX_DIR)/net_udp6.c
 	$(DO_CC)
 
-$(BUILDDIR)/client/cd_linux.o :   $(LINUX_DIR)/cd_linux.c
-	$(DO_CC)
+#$(BUILDDIR)/client/cd_linux.o :   $(LINUX_DIR)/cd_linux.c
+#	$(DO_CC)
 
 $(BUILDDIR)/client/snd_arts.o :  $(LINUX_DIR)/snd_arts.c
 	$(DO_CC)
@@ -655,8 +689,6 @@
 $(BUILDDIR)/client/snd_linux.o :  $(LINUX_DIR)/snd_linux.c
 	$(DO_CC)
 
-$(BUILDDIR)/client/cd_sdl.o :     $(LINUX_DIR)/cd_sdl.c
-	$(DO_CC) $(SDLCFLAGS)
 
 $(BUILDDIR)/client/snd_sdl.o :     $(LINUX_DIR)/snd_sdl.c
 	$(DO_CC) $(SDLCFLAGS)
@@ -689,7 +721,7 @@
        $(BUILDDIR)/ded/q_shared.o \
        $(BUILDDIR)/ded/pmove.o \
        $(BUILDDIR)/ded/cl_null.o \
-       $(BUILDDIR)/ded/cd_null.o
+#       $(BUILDDIR)/ded/cd_null.o
 
 $(BUILDDIR)/q2ded : $(Q2DED_OBJS)
 	$(CC) $(CFLAGS) -o $@ $(Q2DED_OBJS) $(LDFLAGS)
@@ -1898,3 +1930,5 @@
 	@-rm -rf $(BUILD_DEBUG_DIR) $(BUILD_RELEASE_DIR)
 	@-rm -f `find . \( -not -type d \) -and \
 		\( -name '*~' \) -type f -print`
+
+
diff -ru quake2-r0.16.1/src/client/cl_cin.c quake2-r0.16.1-a1200/src/client/cl_cin.c
--- quake2-r0.16.1/src/client/cl_cin.c	2001-12-28 03:04:23.000000000 -0500
+++ quake2-r0.16.1-a1200/src/client/cl_cin.c	2009-11-02 22:45:05.000000000 -0500
@@ -581,7 +581,7 @@
 	int		old_khz;
 
 	// make sure CD isn't playing music
-	CDAudio_Stop();
+//	CDAudio_Stop();
 
 	cl.cinematicframe = 0;
 	dot = strstr (arg, ".");
diff -ru quake2-r0.16.1/src/client/cl_main.c quake2-r0.16.1-a1200/src/client/cl_main.c
--- quake2-r0.16.1/src/client/cl_main.c	2002-06-15 13:51:52.000000000 -0400
+++ quake2-r0.16.1-a1200/src/client/cl_main.c	2009-11-02 22:45:18.000000000 -0500
@@ -1780,7 +1780,7 @@
 	// update audio
 	S_Update (cl.refdef.vieworg, cl.v_forward, cl.v_right, cl.v_up);
 	
-	CDAudio_Update();
+//	CDAudio_Update();
 
 	// advance local effects for next frame
 	CL_RunDLights ();
@@ -1846,7 +1846,7 @@
 	SCR_Init ();
 	cls.disable_screen = true;	// don't draw yet
 
-	CDAudio_Init ();
+//	CDAudio_Init ();
 	CL_InitLocal ();
 	IN_Init ();
 
@@ -1878,7 +1878,7 @@
 
 	CL_WriteConfiguration (); 
 
-	CDAudio_Shutdown ();
+//	CDAudio_Shutdown ();
 	S_Shutdown();
 	IN_Shutdown ();
 	VID_Shutdown();
diff -ru quake2-r0.16.1/src/client/cl_parse.c quake2-r0.16.1-a1200/src/client/cl_parse.c
--- quake2-r0.16.1/src/client/cl_parse.c	2004-09-24 18:13:27.000000000 -0400
+++ quake2-r0.16.1-a1200/src/client/cl_parse.c	2009-11-02 22:45:28.000000000 -0500
@@ -545,8 +545,8 @@
 		CL_SetLightstyle (i - CS_LIGHTS);
 	else if (i == CS_CDTRACK)
 	{
-		if (cl.refresh_prepped)
-			CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
+//		if (cl.refresh_prepped)
+//			CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
 	}
 	else if (i >= CS_MODELS && i < CS_MODELS+MAX_MODELS)
 	{
diff -ru quake2-r0.16.1/src/client/cl_scrn.c quake2-r0.16.1-a1200/src/client/cl_scrn.c
--- quake2-r0.16.1/src/client/cl_scrn.c	2005-01-27 17:25:40.000000000 -0500
+++ quake2-r0.16.1-a1200/src/client/cl_scrn.c	2009-11-02 22:45:35.000000000 -0500
@@ -572,7 +572,7 @@
 {
 	S_StopAllSounds ();
 	cl.sound_prepped = false;		// don't play ambients
-	CDAudio_Stop ();
+//	CDAudio_Stop ();
 	if (cls.disable_screen)
 		return;
 	if (developer->value)
diff -ru quake2-r0.16.1/src/client/cl_view.c quake2-r0.16.1-a1200/src/client/cl_view.c
--- quake2-r0.16.1/src/client/cl_view.c	2004-01-19 20:48:20.000000000 -0500
+++ quake2-r0.16.1-a1200/src/client/cl_view.c	2009-11-02 22:45:43.000000000 -0500
@@ -401,10 +401,10 @@
 
 	// start the cd track
 	if (Cvar_VariableValue("cd_shuffle")){
-	  CDAudio_RandomPlay();
+//	  CDAudio_RandomPlay();
 	}
 	else{
-	    CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
+//	    CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
 	  }
 }
 
diff -ru quake2-r0.16.1/src/client/menu.c quake2-r0.16.1-a1200/src/client/menu.c
--- quake2-r0.16.1/src/client/menu.c	2002-06-15 09:51:43.000000000 -0400
+++ quake2-r0.16.1-a1200/src/client/menu.c	2009-11-02 22:45:51.000000000 -0500
@@ -1163,19 +1163,19 @@
 	Cvar_SetValue( "cd_nocd", !s_options_cdvolume_box.curvalue );
 	if (s_options_cdvolume_box.curvalue)
 	{
-	  CDAudio_Init();
+//	  CDAudio_Init();
 	  if (s_options_cdshuffle_box.curvalue)
 	    {
-	      CDAudio_RandomPlay();
+//	      CDAudio_RandomPlay();
 	    }
 	  else
 	    {
-	      CDAudio_Play(atoi(cl.configstrings[CS_CDTRACK]), true);
+//	      CDAudio_Play(atoi(cl.configstrings[CS_CDTRACK]), true);
 	    }
 	}
 	else
 	{
-	  CDAudio_Stop();
+//	  CDAudio_Stop();
 	}
 }
 
@@ -3976,7 +3976,7 @@
 		M_PopMenu ();
 		break;
 
-	case 'Y':
+	case K_ENTER:
 	case 'y':
 		cls.key_dest = key_console;
 		CL_Quit_f ();
diff -ru quake2-r0.16.1/src/client/snd_loc.h quake2-r0.16.1-a1200/src/client/snd_loc.h
--- quake2-r0.16.1/src/client/snd_loc.h	2001-12-28 03:04:23.000000000 -0500
+++ quake2-r0.16.1-a1200/src/client/snd_loc.h	2009-11-09 11:34:25.000000000 -0500
@@ -162,3 +162,13 @@
 
 // spatializes a channel
 void S_Spatialize(channel_t *ch);
+
+#include "SDL/SDL.h"
+
+int mySDL_PollEvent(SDL_Event *event);
+
+// audio use sdl-lib
+SDL_AudioSpec obtained;
+qboolean _audioSuspended;
+void suspendAudio();
+int resumeAudio();
Only in quake2-r0.16.1-a1200/src/client: snd_loc.h~
diff -ru quake2-r0.16.1/src/linux/rw_sdl.c quake2-r0.16.1-a1200/src/linux/rw_sdl.c
--- quake2-r0.16.1/src/linux/rw_sdl.c	2005-01-27 17:25:40.000000000 -0500
+++ quake2-r0.16.1-a1200/src/linux/rw_sdl.c	2009-11-09 11:33:02.000000000 -0500
@@ -846,7 +846,7 @@
     {
       int bstate;
       
-      while (SDL_PollEvent(&event))
+      while (mySDL_PollEvent(&event))
 	GetEvent(&event);
       
       if (!mx && !my)
@@ -913,3 +913,45 @@
 	qgl3DfxSetPaletteEXT((GLuint *)temptable);
 }
 #endif
+
+#include "../client/snd_loc.h"
+
+int mySDL_PollEvent(SDL_Event *event)  {
+    int _r= SDL_PollEvent(event);
+    if (!_r)
+        return 0;
+    if (event->type == SDL_ACTIVEEVENT) {
+        if (event->active.state == SDL_APPINPUTFOCUS && !event->active.gain) {
+            suspendAudio();
+            for (;;) {
+                _r = SDL_WaitEvent(event);
+                if (!_r)
+                    continue;
+                if (event->type == SDL_QUIT)
+                    return 1;
+                if (event->type != SDL_ACTIVEEVENT)
+                    continue;
+                if (event->active.state == SDL_APPINPUTFOCUS && event->active.gain) {
+                    resumeAudio();
+                        return 1;
+                }
+            }
+        }
+    }
+  return _r;
+}
+
+// if audio use sdl-lib
+void suspendAudio() {
+    SDL_CloseAudio();
+    _audioSuspended = true;
+}
+
+int resumeAudio() {
+    if (SDL_OpenAudio(&obtained, NULL) < 0){
+        return -1;
+    }
+    SDL_PauseAudio(0);
+    _audioSuspended = false;
+    return 0;
+} 
Only in quake2-r0.16.1-a1200/src/linux: rw_sdl.c~
diff -ru quake2-r0.16.1/src/linux/snd_sdl.c quake2-r0.16.1-a1200/src/linux/snd_sdl.c
--- quake2-r0.16.1/src/linux/snd_sdl.c	2002-02-09 15:29:38.000000000 -0500
+++ quake2-r0.16.1-a1200/src/linux/snd_sdl.c	2009-11-03 10:48:01.000000000 -0500
@@ -47,7 +47,8 @@
 qboolean
 SNDDMA_Init (void)
 {
-	SDL_AudioSpec desired, obtained;
+//	SDL_AudioSpec desired, obtained;
+	SDL_AudioSpec desired;
 	int desired_bits, freq;
 	
 	if (SDL_WasInit(SDL_INIT_EVERYTHING) == 0) {
diff -ru quake2-r0.16.1/src/linux/sys_linux.c quake2-r0.16.1-a1200/src/linux/sys_linux.c
--- quake2-r0.16.1/src/linux/sys_linux.c	2004-09-12 14:26:29.000000000 -0400
+++ quake2-r0.16.1-a1200/src/linux/sys_linux.c	2009-11-02 22:45:58.000000000 -0500
@@ -36,7 +36,7 @@
 #include <sys/mman.h>
 #include <errno.h>
 #include <dlfcn.h>
-
+#include <SDL/SDL.h>
 #include "../qcommon/qcommon.h"
 
 #include "../linux/rw_linux.h"
@@ -223,6 +223,8 @@
 	const char *gamename = "gameaxp.so";
 #elif defined __powerpc__
 	const char *gamename = "gameppc.so";
+#elif defined __arm__
+	const char *gamename = "gamearm.so";
 #elif defined __sparc__
 	const char *gamename = "gamesparc.so";
 #else
diff -ru quake2-r0.16.1/src/linux/vid_so.c quake2-r0.16.1-a1200/src/linux/vid_so.c
--- quake2-r0.16.1/src/linux/vid_so.c	2004-09-24 18:13:27.000000000 -0400
+++ quake2-r0.16.1-a1200/src/linux/vid_so.c	2009-11-06 05:55:58.000000000 -0500
@@ -494,6 +494,7 @@
 	struct stat st;
 
 	path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
+
 	snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref );
 	
 	if (stat(fn, &st) == 0)
diff -ru quake2-r0.16.1/src/qcommon/files.c quake2-r0.16.1-a1200/src/qcommon/files.c
--- quake2-r0.16.1/src/qcommon/files.c	2005-01-01 22:46:35.000000000 -0500
+++ quake2-r0.16.1-a1200/src/qcommon/files.c	2009-11-06 05:57:37.000000000 -0500
@@ -341,7 +341,7 @@
 Properly handles partial reads
 =================
 */
-void CDAudio_Stop(void);
+//void CDAudio_Stop(void);
 #define	MAX_READ	0x10000		// read in blocks of 64k
 void FS_Read (void *buffer, int len, FILE *f)
 {
@@ -349,7 +349,6 @@
 	int		read;
 	byte	*buf;
 	int		tries;
-
 	buf = (byte *)buffer;
 
 	// read in chunks for progress bar
@@ -367,7 +366,7 @@
 			if (!tries)
 			{
 				tries = 1;
-				CDAudio_Stop();
+//				CDAudio_Stop();
 			}
 			else
 				Com_Error (ERR_FATAL, "FS_Read: 0 bytes read");
@@ -375,7 +374,7 @@
 
 		if (read == -1)
 			Com_Error (ERR_FATAL, "FS_Read: -1 bytes read");
-
+  
 		// do some progress bar thing here...
 
 		remaining -= read;
@@ -898,6 +897,7 @@
 	// basedir <path>
 	// allows the game to run from outside the data tree
 	//
+
 	fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET);
 
 	//
Only in quake2-r0.16.1-a1200/src/ref_soft: r_local.h~
