From 39388286a6af0210386036fce11946214873469d Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Wed, 25 Jul 2012 14:26:35 +0900 Subject: [PATCH] [Title] added mac configuration & etc [Type] feature [Module] Emualtor [Priority] major [Jira#] [Redmine#] [Problem] [Cause] support mac [Solution] [TestCase] --- tizen/emulator_configure.sh | 29 +++++++++++++++++++++++------ tizen/src/Makefile | 24 +++++++++++++++++++++++- tizen/src/emulator.c | 14 ++++++++++---- tizen/src/hw/maru_board.c | 4 +++- tizen/src/hw/maru_vga.c | 1 + tizen/src/maru_display.c | 10 +++++++++- 6 files changed, 69 insertions(+), 13 deletions(-) diff --git a/tizen/emulator_configure.sh b/tizen/emulator_configure.sh index 78eea9f..f523867 100755 --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@ -29,12 +29,10 @@ echo "##### QEMU configure for emulator" --disable-werror \ --audio-drv-list=alsa \ --enable-mixemu \ - --disable-vnc-tls \ --audio-card-list=ac97 \ --enable-ldst-optimization \ --enable-maru \ - --disable-vnc-jpeg \ - --disable-vnc-png \ + --disable-vnc \ --enable-gl ;; MINGW*) @@ -52,13 +50,32 @@ echo "##### QEMU configure for emulator" --target-list=i386-softmmu \ --audio-drv-list=winwave \ --enable-mixemu \ - --disable-vnc-tls \ --audio-card-list=ac97 \ --enable-ldst-optimization \ --enable-hax \ --enable-maru \ - --disable-vnc-jpeg \ - --disable-vnc-png \ + --disable-vnc \ --enable-gl $1 ;; +Darwin*) +cd distrib/libav +echo "" +echo "##### FFMPEG configure for emulator" +./configure \ +--prefix=./$bindir --arch=x86 --enable-static --enable-pic --enable-optimizations --disable-doc --disable-gpl --disable-yasm --disable-postproc --disable-swscale --disable-ffmpeg --disable-ffprobe --disable-ffserver --disable-ffplay --disable-decoders --disable-encoders --disable-muxers --disable-demuxers --disable-parsers --disable-protocols --disable-network --disable-bsfs --disable-devices --disable-filters --enable-encoder=h263 --enable-encoder=h263p --enable-encoder=mpeg4 --enable-encoder=msmpeg4v2 --enable-encoder=msmpeg4v3 --enable-decoder=aac --enable-decoder=h263 --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mpeg4 --enable-decoder=mpegvideo --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmv3 --enable-decoder=vc1 --cc=cc +cd ../.. + +cd .. +echo "" +echo "##### QEMU configure for emulator" +./configure \ + --target-list=i386-softmmu \ + --audio-drv-list=coreaudio \ + --enable-mixemu \ + --audio-card-list=ac97 \ + --enable-maru \ + --disable-vnc \ + --disable-sdl \ + --disable-gl +;; esac diff --git a/tizen/src/Makefile b/tizen/src/Makefile index 086d19b..0efc48e 100755 --- a/tizen/src/Makefile +++ b/tizen/src/Makefile @@ -62,6 +62,8 @@ ifdef CONFIG_WIN32 else endif + +ifndef CONFIG_DARWIN cp ../../qemu-img $(EMUL_DIR)/bin cp -dpr ../license $(EMUL_DIR) cp -dpr ../../pc-bios/bios.bin $(EMUL_DIR)/data/bios @@ -70,6 +72,16 @@ endif cp -dpr ../../pc-bios/pxe-virtio.rom $(EMUL_DIR)/data/bios cp skin/client/lib/swt.jar $(EMUL_DIR)/bin/swt.jar cp -dpr skin/client/skins $(EMUL_DIR) +else + cp ../../qemu-img $(EMUL_DIR)/bin + cp -pPR ../license $(EMUL_DIR) + cp -pPR ../../pc-bios/bios.bin $(EMUL_DIR)/data/bios + cp -pPR ../../pc-bios/linuxboot.bin $(EMUL_DIR)/data/bios + cp -pPR ../../pc-bios/pxe-rtl8139.rom $(EMUL_DIR)/data/bios + cp -pPR ../../pc-bios/pxe-virtio.rom $(EMUL_DIR)/data/bios + cp skin/client/lib/swt.jar $(EMUL_DIR)/bin/swt.jar + cp -pPR skin/client/skins $(EMUL_DIR) +endif # for dibs system... all_dibs: qemu skin_client_dibs @@ -87,6 +99,8 @@ ifdef CONFIG_WIN32 else endif + +ifndef CONFIG_DARWIN cp ../../qemu-img $(EMUL_DIR)/bin cp -dpr ../license $(EMUL_DIR) cp -dpr ../../pc-bios/bios.bin $(EMUL_DIR)/data/bios @@ -94,4 +108,12 @@ endif cp -dpr ../../pc-bios/pxe-rtl8139.rom $(EMUL_DIR)/data/bios cp -dpr ../../pc-bios/pxe-virtio.rom $(EMUL_DIR)/data/bios cp -dpr skin/client/skins $(EMUL_DIR) - +else + cp ../../qemu-img $(EMUL_DIR)/bin + cp -pPR ../license $(EMUL_DIR) + cp -pPR ../../pc-bios/bios.bin $(EMUL_DIR)/data/bios + cp -pPR ../../pc-bios/linuxboot.bin $(EMUL_DIR)/data/bios + cp -pPR ../../pc-bios/pxe-rtl8139.rom $(EMUL_DIR)/data/bios + cp -pPR ../../pc-bios/pxe-virtio.rom $(EMUL_DIR)/data/bios + cp -pPR skin/client/skins $(EMUL_DIR) +endif diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index e877bb4..2777bd6 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -130,7 +130,7 @@ static int check_port_bind_listen(u_int port) void check_shdmem(void) { -#ifndef CONFIG_WIN32 +#if defined(CONFIG_LINUX) int shm_id; void *shm_addr; u_int port; @@ -168,7 +168,7 @@ void check_shdmem(void) } } -#else /* _WIN32*/ +#elif defined(CONFIG_WIN32) u_int port; char* base_port = NULL; char* pBuf; @@ -221,12 +221,14 @@ void check_shdmem(void) CloseHandle(hMapFile); free(base_port); } +#elif defined(CONFIG_DARWIN) + //TODO: #endif } void make_shdmem(void) { -#ifndef _WIN32 +#if defined(CONFIG_LINUX) int shmid; char *shared_memory; shmid = shmget((key_t)tizen_base_port, MAXLEN, 0666|IPC_CREAT); @@ -243,7 +245,7 @@ void make_shdmem(void) } sprintf(shared_memory, "%s", tizen_target_path); INFO( "shared memory key: %d value: %s\n", tizen_base_port, (char*)shared_memory); -#else +#elif defined(CONFIG_WIN32) HANDLE hMapFile; char* pBuf; char* port_in_use; @@ -278,6 +280,8 @@ void make_shdmem(void) CopyMemory((PVOID)pBuf, shared_memory, strlen(shared_memory)); free(port_in_use); free(shared_memory); +#elif defined(CONFIG_DARWIN) + //TODO: #endif return; } @@ -451,9 +455,11 @@ static void system_info(void) strftime(timeinfo, sizeof(timeinfo), "%Y/%m/%d %H:%M:%S", tm_time); INFO("* Current time : %s\n", timeinfo); +#ifdef CONFIG_SDL /* Gets the version of the dynamically linked SDL library */ INFO("* Host sdl version : (%d, %d, %d)\n", SDL_Linked_Version()->major, SDL_Linked_Version()->minor, SDL_Linked_Version()->patch); +#endif #if defined(CONFIG_WIN32) /* Retrieves information about the current os */ diff --git a/tizen/src/hw/maru_board.c b/tizen/src/hw/maru_board.c index fc6e31b..5e68fad 100644 --- a/tizen/src/hw/maru_board.c +++ b/tizen/src/hw/maru_board.c @@ -251,12 +251,14 @@ static void maru_x86_machine_init(MemoryRegion *system_memory, pc_pci_device_init(pci_bus); } -// maru specialized device init... +#ifndef CONFIG_DARWIN + // maru specialized device init... if (pci_enabled) { maru_camera_pci_init(pci_bus); //tizen_ac97_init(pci_bus); codec_init(pci_bus); } +#endif } static void maru_arm_machine_init(ram_addr_t ram_size, diff --git a/tizen/src/hw/maru_vga.c b/tizen/src/hw/maru_vga.c index a124273..0fcc042 100644 --- a/tizen/src/hw/maru_vga.c +++ b/tizen/src/hw/maru_vga.c @@ -28,6 +28,7 @@ * */ + #ifdef CONFIG_DARWIN #define USE_SHM //shared memory #endif diff --git a/tizen/src/maru_display.c b/tizen/src/maru_display.c index e0fe41c..5783cb5 100644 --- a/tizen/src/maru_display.c +++ b/tizen/src/maru_display.c @@ -28,10 +28,18 @@ */ +#ifdef CONFIG_DARWIN +#define USE_SHM //shared memory +#endif + #include "maru_display.h" #include "debug_ch.h" + +#ifndef USE_SHM #include "maru_sdl.h" +#else #include "maru_shm.h" +#endif MULTI_DEBUG_CHANNEL(tizen, display); @@ -44,7 +52,7 @@ void maru_display_init(DisplayState *ds) DisplayChangeListener *dcl; dcl = g_malloc0(sizeof(DisplayChangeListener)); -#ifndef CONFIG_DARWING +#ifndef USE_SHM /* sdl library */ dcl->dpy_update = qemu_ds_sdl_update; dcl->dpy_resize = qemu_ds_sdl_resize; -- 2.7.4