From: Sangjin Kim Date: Thu, 11 Apr 2013 08:45:12 +0000 (+0900) Subject: Merge tizen_2.1 latest source code. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1017 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f4420f9c1b38a7663c72db2889bd9b844214b73;p=sdk%2Femulator%2Fqemu.git Merge tizen_2.1 latest source code. Signed-off-by: Sangjin Kim --- diff --git a/package/build.macos-64 b/package/build.macos-64 index cd0b6fa41a..06810f2526 100755 --- a/package/build.macos-64 +++ b/package/build.macos-64 @@ -34,23 +34,24 @@ build() make all_dibs if [ $? -eq 0 ] then - echo "x86 build success" + echo "build success" else - echo "x86 build failure" + echo "build failure" exit 1 fi - make install_dibs -# make clean -# ./emulator_configure.sh arm -# make all_dibs -# if [ $? -eq 0 ] -# then -# echo "arm build success" -# else -# echo "arm build failure" -# exit 1 -# fi +# make install_dibs +# make clean +# +# ./emulator_configure.sh arm +# make all_dibs +# if [ $? -eq 0 ] +# then +# echo "arm build success" +# else +# echo "arm build failure" +# exit 1 +# fi # make install_dibs } @@ -58,16 +59,17 @@ build() install() { X86_BIN_DIR=$SRCDIR/package/emulator-qemu-x86.package.${TARGET_OS}/data/tools - ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools +# ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools COMMON_BIN_DIR=$SRCDIR/package/emulator-qemu-common.package.${TARGET_OS}/data/tools mkdir -p $X86_BIN_DIR - mkdir -p $ARM_BIN_DIR +# mkdir -p $ARM_BIN_DIR mkdir -p $COMMON_BIN_DIR cd $SRCDIR/tizen + make install_dibs mv x86 $X86_BIN_DIR/emulator - mv arm $ARM_BIN_DIR/emulator +# mv x86 $ARM_BIN_DIR/emulator mv common $COMMON_BIN_DIR/emulator } diff --git a/package/build.ubuntu-32 b/package/build.ubuntu-32 index cd0b6fa41a..08e49eea8e 100755 --- a/package/build.ubuntu-32 +++ b/package/build.ubuntu-32 @@ -39,18 +39,19 @@ build() echo "x86 build failure" exit 1 fi - make install_dibs -# make clean -# ./emulator_configure.sh arm -# make all_dibs -# if [ $? -eq 0 ] -# then -# echo "arm build success" -# else -# echo "arm build failure" -# exit 1 -# fi +# make install_dibs +# make clean +# +# ./emulator_configure.sh arm +# make all_dibs +# if [ $? -eq 0 ] +# then +# echo "arm build success" +# else +# echo "arm build failure" +# exit 1 +# fi # make install_dibs } @@ -58,16 +59,17 @@ build() install() { X86_BIN_DIR=$SRCDIR/package/emulator-qemu-x86.package.${TARGET_OS}/data/tools - ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools +# ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools COMMON_BIN_DIR=$SRCDIR/package/emulator-qemu-common.package.${TARGET_OS}/data/tools mkdir -p $X86_BIN_DIR - mkdir -p $ARM_BIN_DIR +# mkdir -p $ARM_BIN_DIR mkdir -p $COMMON_BIN_DIR cd $SRCDIR/tizen + make install_dibs mv x86 $X86_BIN_DIR/emulator - mv arm $ARM_BIN_DIR/emulator +# mv x86 $ARM_BIN_DIR/emulator mv common $COMMON_BIN_DIR/emulator } diff --git a/package/build.ubuntu-64 b/package/build.ubuntu-64 index cd0b6fa41a..08e49eea8e 100755 --- a/package/build.ubuntu-64 +++ b/package/build.ubuntu-64 @@ -39,18 +39,19 @@ build() echo "x86 build failure" exit 1 fi - make install_dibs -# make clean -# ./emulator_configure.sh arm -# make all_dibs -# if [ $? -eq 0 ] -# then -# echo "arm build success" -# else -# echo "arm build failure" -# exit 1 -# fi +# make install_dibs +# make clean +# +# ./emulator_configure.sh arm +# make all_dibs +# if [ $? -eq 0 ] +# then +# echo "arm build success" +# else +# echo "arm build failure" +# exit 1 +# fi # make install_dibs } @@ -58,16 +59,17 @@ build() install() { X86_BIN_DIR=$SRCDIR/package/emulator-qemu-x86.package.${TARGET_OS}/data/tools - ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools +# ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools COMMON_BIN_DIR=$SRCDIR/package/emulator-qemu-common.package.${TARGET_OS}/data/tools mkdir -p $X86_BIN_DIR - mkdir -p $ARM_BIN_DIR +# mkdir -p $ARM_BIN_DIR mkdir -p $COMMON_BIN_DIR cd $SRCDIR/tizen + make install_dibs mv x86 $X86_BIN_DIR/emulator - mv arm $ARM_BIN_DIR/emulator +# mv x86 $ARM_BIN_DIR/emulator mv common $COMMON_BIN_DIR/emulator } diff --git a/package/build.windows-32 b/package/build.windows-32 index b8da3ef26c..67a4fdd3a3 100755 --- a/package/build.windows-32 +++ b/package/build.windows-32 @@ -58,19 +58,20 @@ build() echo "x86 build failure" exit 1 fi - make install_dibs -# make clean -# ./emulator_configure.sh arm -e "$BUILD_CFLAGS $BUILD_LDFLAGS" -# make all_dibs -# if [ $? -eq 0 ] -# then -# echo "arm build success" -# else -# echo "arm build failure" -# exit 1 -# fi -# make install_dibs +# make install_dibs +# make clean +# +# ./emulator_configure.sh arm -e "$BUILD_CFLAGS $BUILD_LDFLAGS" +# make all_dibs +# if [ $? -eq 0 ] +# then +# echo "arm build success" +# else +# echo "arm build failure" +# exit 1 +# fi +# make install_dibs } # install @@ -79,16 +80,17 @@ install() prepare X86_BIN_DIR=$SRCDIR/package/emulator-qemu-x86.package.${TARGET_OS}/data/tools - ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools +# ARM_BIN_DIR=$SRCDIR/package/emulator-qemu-arm.package.${TARGET_OS}/data/tools COMMON_BIN_DIR=$SRCDIR/package/emulator-qemu-common.package.${TARGET_OS}/data/tools mkdir -p $X86_BIN_DIR - mkdir -p $ARM_BIN_DIR +# mkdir -p $ARM_BIN_DIR mkdir -p $COMMON_BIN_DIR cd $SRCDIR/tizen + make install_dibs mv x86 $X86_BIN_DIR/emulator - mv arm $ARM_BIN_DIR/emulator +# mv x86 $ARM_BIN_DIR/emulator mv common $COMMON_BIN_DIR/emulator } diff --git a/tizen/emulator_configure.sh b/tizen/emulator_configure.sh index 7db8433738..e028f3d9d0 100755 --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@ -81,13 +81,13 @@ set_target() { case "$1" in x86|i386|i486|i586|i686) EMUL_TARGET_LIST="i386-softmmu" - if [ -z "$VIRTIOGL_EN" ] && [ -z "$YAGL_EN" ] ; then + if [ -z "$VIRTIOGL_EN" ] ; then virtgl_enable yes fi ;; arm) EMUL_TARGET_LIST="arm-softmmu" - if [ -z "$YAGL_EN" ] && [ -z "$VIRTIOGL_EN" ] && [ "$targetos" != "Darwin" ] ; then + if [ -z "$YAGL_EN" ] && [ "$targetos" != "Darwin" ] ; then yagl_enable yes fi ;; diff --git a/tizen/src/Makefile b/tizen/src/Makefile index 5f648f1502..ab1cd2f692 100755 --- a/tizen/src/Makefile +++ b/tizen/src/Makefile @@ -207,7 +207,7 @@ endif cp skin/client/emulator-skin.jar $(DIBS_COMMON_DIR)/bin ifdef CONFIG_WIN32 - cp ../../i386-softmmu/check-gl.exe $(DIBS_COMMONL_DIR)/bin + cp ../../i386-softmmu/check-gl.exe $(DIBS_COMMON_DIR)/bin cp check-hax.exe $(DIBS_COMMON_DIR)/bin endif diff --git a/tizen/src/debug_ch.c b/tizen/src/debug_ch.c index cfc4ce68fd..1696156a8c 100644 --- a/tizen/src/debug_ch.c +++ b/tizen/src/debug_ch.c @@ -50,10 +50,10 @@ static HANDLE handle; static inline int interlocked_xchg_add( int *dest, int incr ) { - int ret; + int ret_val; __asm__ __volatile__( "lock; xaddl %0,(%1)" - : "=r" (ret) : "r" (dest), "0" (incr) : "memory" ); - return ret; + : "=r" (ret_val) : "r" (dest), "0" (incr) : "memory" ); + return ret_val; } static const char * const debug_classes[] = {"fixme", "err", "warn", "trace", "info"}; diff --git a/tizen/src/guest_server.c b/tizen/src/guest_server.c index 452b048f54..5840ed4b04 100644 --- a/tizen/src/guest_server.c +++ b/tizen/src/guest_server.c @@ -251,9 +251,6 @@ static void* run_guest_server(void* args) } } -#if 0 -cleanup: -#endif #ifdef _WIN32 if (server_sock) { closesocket(server_sock); diff --git a/tizen/src/hw/helper_opengl.c b/tizen/src/hw/helper_opengl.c index 83a0f4fc75..c09b914a69 100644 --- a/tizen/src/hw/helper_opengl.c +++ b/tizen/src/hw/helper_opengl.c @@ -65,7 +65,9 @@ static inline int do_decode_call_int(ProcessStruct *process, void *args_in, int char *argptr, *tmp; static void* args[50]; int func_number; +#ifdef __APPLE__ char temp4mac[256]; +#endif if(!args_len) return 0; diff --git a/tizen/src/hw/opengl_exec.c b/tizen/src/hw/opengl_exec.c index 5be4192ee0..67612ffdb1 100644 --- a/tizen/src/hw/opengl_exec.c +++ b/tizen/src/hw/opengl_exec.c @@ -2183,6 +2183,12 @@ int do_function_call(ProcessState *process, int func_number, unsigned long *args unsigned int client_texture = args[1]; unsigned int server_texture; + if(((int)client_texture) < 0) + { + fprintf(stderr, "glBindTexture got invalid texture ID, do nothing!\n"); + break; + } + if (client_texture == 0) { glBindTexture(target, 0); } else { diff --git a/tizen/src/hw/virtio-gl.c b/tizen/src/hw/virtio-gl.c index 4ca1ed757f..72c1df3e88 100644 --- a/tizen/src/hw/virtio-gl.c +++ b/tizen/src/hw/virtio-gl.c @@ -79,7 +79,9 @@ static void virtio_gl_handle(VirtIODevice *vdev, VirtQueue *vq) if(!elem.out_num) { fprintf(stderr, "Bad packet\n"); - goto done; + virtqueue_push(vq, &elem, ret); + virtio_notify(vdev, vq); + return; } process = vmgl_get_process(hdr->pid); @@ -178,7 +180,7 @@ static void virtio_gl_handle(VirtIODevice *vdev, VirtQueue *vq) gl_disconnect(process); } } -done: + virtqueue_push(vq, &elem, ret); virtio_notify(vdev, vq);