diff -r e0e9e63fb1f1 -r ce690ad27615 qemu/android_help.c
--- a/qemu/android_help.c	Mon Nov 10 00:27:32 2008 +1100
+++ b/qemu/android_help.c	Mon Nov 10 01:33:57 2008 +1100
@@ -357,6 +357,18 @@
 }
 
 static void
+help_os_type(stralloc_t* out)
+{
+	printf(
+	"  use '-os_type to specify the type of kernel to be run.\n"
+	"  The default OS type is 'linux'. Any string other than\n"
+	"  'linux' will cause the supplied image to be loaded into\n"
+	"  the lowest address, rather than the traditional Linux\n"
+	"  load address. Any supplied initrd and kernel command line\n"
+	"  will be ignored.\n\n");
+}
+
+static void
 help_kernel(stralloc_t*  out)
 {
     PRINTF(
diff -r e0e9e63fb1f1 -r ce690ad27615 qemu/android_main.c
--- a/qemu/android_main.c	Mon Nov 10 00:27:32 2008 +1100
+++ b/qemu/android_main.c	Mon Nov 10 01:33:57 2008 +1100
@@ -2030,6 +2030,12 @@
 
     n = 1;
     /* generate arguments for the underlying qemu main() */
+	if(opts->os_type) {
+        args[n++] = "-os-type";
+        args[n++] = opts->os_type;
+		args[n++] = "-serial";
+		args[n++] = "stdio";
+    }
     if(opts->kernel) {
         args[n++] = "-kernel";
         args[n++] = opts->kernel;
diff -r e0e9e63fb1f1 -r ce690ad27615 qemu/android_options.h
--- a/qemu/android_options.h	Mon Nov 10 00:27:32 2008 +1100
+++ b/qemu/android_options.h	Mon Nov 10 01:33:57 2008 +1100
@@ -58,6 +58,7 @@
 
 CFG_PARAM( system,  "<dir>",  "read system image from <dir>" )
 CFG_PARAM( datadir, "<dir>",  "write user data into <dir>" )
+CFG_PARAM( os_type, "<type>", "kernel image is of given OS type (linux, okl4)" )
 CFG_PARAM( kernel,  "<file>", "use specific emulated kernel" )
 CFG_PARAM( ramdisk, "<file>", "ramdisk image (default <system>/ramdisk.img" )
 CFG_PARAM( image,   "<file>", "system image (default <system>/system.img" )
diff -r e0e9e63fb1f1 -r ce690ad27615 qemu/hw/arm_boot.c
--- a/qemu/hw/arm_boot.c	Mon Nov 10 00:27:32 2008 +1100
+++ b/qemu/hw/arm_boot.c	Mon Nov 10 01:33:57 2008 +1100
@@ -64,6 +64,8 @@
     stl_raw(p++, 0);
 }
 
+extern char *os_type;
+
 void arm_load_kernel(int ram_size, const char *kernel_filename,
                      const char *kernel_cmdline, const char *initrd_filename,
                      int board_id)
@@ -71,19 +73,25 @@
     int kernel_size;
     int initrd_size;
     int n;
+    int linux_image = (strcmp(os_type, "linux") == 0);
 
     /* Load the kernel.  */
     if (!kernel_filename) {
         fprintf(stderr, "Kernel image must be specified\n");
         exit(1);
     }
-    kernel_size = load_image(kernel_filename,
-                             phys_ram_base + KERNEL_LOAD_ADDR);
+    if(linux_image) {
+        kernel_size = load_image(kernel_filename,
+                                 phys_ram_base + KERNEL_LOAD_ADDR);
+    } else {
+        kernel_size = load_image(kernel_filename,
+                                phys_ram_base);
+    }
     if (kernel_size < 0) {
         fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename);
         exit(1);
     }
-    if (initrd_filename) {
+    if (linux_image && initrd_filename) {
         initrd_size = load_image(initrd_filename,
                                  phys_ram_base + INITRD_LOAD_ADDR);
         if (initrd_size < 0) {
@@ -94,12 +102,14 @@
     } else {
         initrd_size = 0;
     }
-    bootloader[1] |= board_id & 0xff;
-    bootloader[2] |= (board_id >> 8) & 0xff;
-    bootloader[5] = KERNEL_ARGS_ADDR;
-    bootloader[6] = KERNEL_LOAD_ADDR;
-    for (n = 0; n < sizeof(bootloader) / 4; n++)
-        stl_raw(phys_ram_base + (n * 4), bootloader[n]);
-    set_kernel_args(ram_size, initrd_size, kernel_cmdline);
+    if(linux_image) {
+        bootloader[1] |= board_id & 0xff;
+        bootloader[2] |= (board_id >> 8) & 0xff;
+        bootloader[5] = KERNEL_ARGS_ADDR;
+        bootloader[6] = KERNEL_LOAD_ADDR;
+        for (n = 0; n < sizeof(bootloader) / 4; n++)
+            stl_raw(phys_ram_base + (n * 4), bootloader[n]);
+        set_kernel_args(ram_size, initrd_size, kernel_cmdline);
+    }
 }
 
diff -r e0e9e63fb1f1 -r ce690ad27615 qemu/proxy/proxy_common.c
--- a/qemu/proxy/proxy_common.c	Mon Nov 10 00:27:32 2008 +1100
+++ b/qemu/proxy/proxy_common.c	Mon Nov 10 01:33:57 2008 +1100
@@ -115,7 +115,6 @@
 int
 proxy_connection_send( ProxyConnection*  conn )
 {
-    int  result = -1;
     int  fd     = conn->socket;
     int  avail  = conn->buffer_len - conn->buffer_pos;
 
@@ -143,7 +142,6 @@
 int
 proxy_connection_receive( ProxyConnection*  conn )
 {
-    int  result = -1;
     int  fd     = conn->socket;
     int  avail  = conn->buffer_len - conn->buffer_pos;
 
@@ -172,7 +170,6 @@
 int
 proxy_connection_receive_line( ProxyConnection*  conn )
 {
-    int  result = -1;
     int  fd     = conn->socket;
 
     for (;;) {
@@ -296,8 +293,6 @@
                        ProxyEvent        event )
 {
     if (conn) {
-        int  fd = conn->socket;
-
         proxy_connection_remove(conn);
 
         if (event != PROXY_EVENT_NONE)
diff -r e0e9e63fb1f1 -r ce690ad27615 qemu/proxy/proxy_http.c
--- a/qemu/proxy/proxy_http.c	Mon Nov 10 00:27:32 2008 +1100
+++ b/qemu/proxy/proxy_http.c	Mon Nov 10 01:33:57 2008 +1100
@@ -57,7 +57,7 @@
     ProxyConnection*  root    = conn->root;
     char*             p       = root->buffer0;
     char*             end     = p + sizeof(root->buffer0);
-    int               wlen, ret;
+    int               ret;
     uint32_t          address  = ntohl(conn->root->address.sin_addr.s_addr);
     int               port     = ntohs(conn->root->address.sin_port);
 
@@ -127,7 +127,6 @@
 http_connection_poll( HttpConnection*  conn,
                       unsigned         flags )
 {
-    int               ret;
     ProxyConnection*  root = conn->root;
 
     switch (conn->state)
diff -r e0e9e63fb1f1 -r ce690ad27615 qemu/vl.c
--- a/qemu/vl.c	Mon Nov 10 00:27:32 2008 +1100
+++ b/qemu/vl.c	Mon Nov 10 01:33:57 2008 +1100
@@ -197,6 +197,7 @@
 #endif
 
 extern int   qemu_cpu_delay;
+char *os_type = "linux";
 
 extern void  dprint( const char* format, ... );
 
@@ -5717,6 +5718,7 @@
     QEMU_OPTION_smb,
     QEMU_OPTION_redir,
 
+    QEMU_OPTION_os_type,
     QEMU_OPTION_kernel,
     QEMU_OPTION_append,
     QEMU_OPTION_initrd,
@@ -5801,6 +5803,7 @@
     { "redir", HAS_ARG, QEMU_OPTION_redir },
 #endif
 
+    { "os-type", HAS_ARG, QEMU_OPTION_os_type },
     { "kernel", HAS_ARG, QEMU_OPTION_kernel },
     { "append", HAS_ARG, QEMU_OPTION_append },
     { "initrd", HAS_ARG, QEMU_OPTION_initrd },
@@ -6268,6 +6271,9 @@
                 pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "stdio");
                 nographic = 1;
                 break;
+            case QEMU_OPTION_os_type:
+                os_type = optarg;
+                break;
             case QEMU_OPTION_kernel:
                 kernel_filename = optarg;
                 break;
diff -r e0e9e63fb1f1 -r ce690ad27615 sdl/include/SDL_config.h
--- a/sdl/include/SDL_config.h	Mon Nov 10 00:27:32 2008 +1100
+++ b/sdl/include/SDL_config.h	Mon Nov 10 01:33:57 2008 +1100
@@ -145,11 +145,11 @@
 
 /* Allow disabling of core subsystems */
 /* #undef SDL_AUDIO_DISABLED */
-/* #undef SDL_CDROM_DISABLED */
+#define SDL_CDROM_DISABLED 1
 /* #undef SDL_CPUINFO_DISABLED */
 /* #undef SDL_EVENTS_DISABLED */
 /* #undef SDL_FILE_DISABLED */
-/* #undef SDL_JOYSTICK_DISABLED */
+#define SDL_JOYSTICK_DISABLED 1
 /* #undef SDL_LOADSO_DISABLED */
 /* #undef SDL_THREADS_DISABLED */
 /* #undef SDL_TIMERS_DISABLED */
@@ -165,7 +165,7 @@
 #define SDL_AUDIO_DRIVER_COREAUDIO 1
 /* #undef SDL_AUDIO_DRIVER_DART */
 /* #undef SDL_AUDIO_DRIVER_DC */
-#define SDL_AUDIO_DRIVER_DISK 1
+/* #undef SDL_AUDIO_DRIVER_DISK */
 #define SDL_AUDIO_DRIVER_DUMMY 1
 /* #undef SDL_AUDIO_DRIVER_DMEDIA */
 /* #undef SDL_AUDIO_DRIVER_DSOUND */
@@ -193,7 +193,7 @@
 /* #undef SDL_CDROM_FREEBSD */
 /* #undef SDL_CDROM_LINUX */
 /* #undef SDL_CDROM_MACOS */
-#define SDL_CDROM_MACOSX 1
+/* #undef SDL_CDROM_MACOSX */
 /* #undef SDL_CDROM_MINT */
 /* #undef SDL_CDROM_OPENBSD */
 /* #undef SDL_CDROM_OS2 */
@@ -206,7 +206,7 @@
 /* #undef SDL_JOYSTICK_BEOS */
 /* #undef SDL_JOYSTICK_DC */
 /* #undef SDL_JOYSTICK_DUMMY */
-#define SDL_JOYSTICK_IOKIT 1
+/* #undef SDL_JOYSTICK_IOKIT */
 /* #undef SDL_JOYSTICK_LINUX */
 /* #undef SDL_JOYSTICK_LINUXEV */
 /* #undef SDL_JOYSTICK_MACOS */
diff -r e0e9e63fb1f1 -r ce690ad27615 sdl/src/audio/macosx/SDL_coreaudio.c
--- a/sdl/src/audio/macosx/SDL_coreaudio.c	Mon Nov 10 00:27:32 2008 +1100
+++ b/sdl/src/audio/macosx/SDL_coreaudio.c	Mon Nov 10 01:33:57 2008 +1100
@@ -23,6 +23,11 @@
 
 #include <AudioUnit/AudioUnit.h>
 
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#include <AudioUnit/AUNTComponent.h>
+#endif
+
+
 #include "SDL_audio.h"
 #include "../SDL_audio_c.h"
 #include "../SDL_sysaudio.h"

