From: varinder.p Date: Sat, 19 Mar 2022 02:11:44 +0000 (+0530) Subject: Add test script for quick testing for home tizen studio. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=103457d6d634395d88cd850d7532a9a3d449f4dd;p=sdk%2Femulator%2Fqemu.git Add test script for quick testing for home tizen studio. Change-Id: I731c3d2e8a5210def12b7a02a2939b9f79d0ece8 Signed-off-by: varinder.p --- diff --git a/.gitmodules b/.gitmodules index 584f829671..9c0501a4d4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,6 +49,9 @@ [submodule "roms/edk2"] path = roms/edk2 url = https://git.qemu.org/git/edk2.git +[submodule "slirp"] + path = slirp + url = https://git.qemu.org/git/libslirp.git [submodule "roms/opensbi"] path = roms/opensbi url = https://git.qemu.org/git/opensbi.git diff --git a/configure b/configure index 3ddc33ad75..f03100329c 100755 --- a/configure +++ b/configure @@ -624,7 +624,7 @@ QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv -std=gnu99 $QEMU_CFLAGS" QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" -QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote \$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include" +QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote \$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include -isystem $PWD" QEMU_INCLUDES="$QEMU_INCLUDES -iquote \$(SRC_PATH)/disas/libvixl" if test "$debug_info" = "yes"; then CFLAGS="-g $CFLAGS" @@ -925,7 +925,7 @@ Linux) linux="yes" linux_user="yes" kvm="yes" - QEMU_INCLUDES="-isystem \$(SRC_PATH)/linux-headers -isystem $PWD/linux-headers -isystem $PWD $QEMU_INCLUDES" + QEMU_INCLUDES="-isystem \$(SRC_PATH)/linux-headers -isystem $PWD/linux-headers $QEMU_INCLUDES" supported_os="yes" libudev="yes" ;; diff --git a/hw/yagl/yagl_drivers/egl_wgl/yagl_egl_wgl.c b/hw/yagl/yagl_drivers/egl_wgl/yagl_egl_wgl.c index 09599fdccb..51ce2a1257 100644 --- a/hw/yagl/yagl_drivers/egl_wgl/yagl_egl_wgl.c +++ b/hw/yagl/yagl_drivers/egl_wgl/yagl_egl_wgl.c @@ -27,11 +27,10 @@ * */ -#include +#include "yagl_types.h" #include #include #include -#include #include "yagl_egl_driver.h" #include "yagl_dyn_lib.h" #include "yagl_log.h" diff --git a/hw/yagl/yagl_log.h b/hw/yagl/yagl_log.h index 4479108f58..b05e92f562 100644 --- a/hw/yagl/yagl_log.h +++ b/hw/yagl/yagl_log.h @@ -30,10 +30,6 @@ #ifndef _QEMU_YAGL_LOG_H #define _QEMU_YAGL_LOG_H -#ifdef _WIN32 -#include -#endif - #include "yagl_types.h" //#define YAGL_LOG_DISABLE diff --git a/package/build.common b/package/build.common index 8e1ccd442e..215629c054 100644 --- a/package/build.common +++ b/package/build.common @@ -43,6 +43,7 @@ build_common() install_common() { TIZEN_VERSIONS="6.5 6.0 5.0 4.0 3.0 2.4 2.3.2" + QEMU_VERSION=`cat ${SRCDIR}/package/pkginfo.manifest | grep Version | awk -F: '{print $2}' | xargs` for VER in ${TIZEN_VERSIONS} ; do # emulator @@ -74,5 +75,10 @@ install_common() # Now it is not necessary. Uncomment the line below if necessary. #sed -i'' -e "s/tizen-x.x/tizen-$VER/g" "$TARTGET_INSTALL_FILE" fi + + echo "Removing old builds: " $VER-emulator-qemu-x86_${QEMU_VERSION}_${TARGET_OS}.zip + rm -f ${SRCDIR}/$VER-emulator-qemu-x86_${QEMU_VERSION}_${TARGET_OS}.zip + rm -f ${SRCDIR}/$VER-emulator-common-x86_${QEMU_VERSION}_${TARGET_OS}.zip + done } diff --git a/package/build.linux b/package/build.linux index 164aa062cd..fad94e72e6 100755 --- a/package/build.linux +++ b/package/build.linux @@ -31,6 +31,9 @@ prepare() # mingw-x doesn't have zlib, so we use our own. export EXTRA_CFLAGS=-I${ROOTDIR}/include export EXTRA_LDFLAGS=-L${ROOTDIR}/lib + + echo "check SRCDIR:" $SRCDIR + cd $SRCDIR else # for linux target diff --git a/package/build.windows b/package/build.windows index ce258aaba5..78cf693257 100755 --- a/package/build.windows +++ b/package/build.windows @@ -10,7 +10,7 @@ prepare() PYTHON_DIR=`env | grep PATH | grep Python` if [ "$PYTHON_DIR" = "" ] then - echo "Make sure that you have installed Python 2.x version" + echo "Make sure that you have installed Python 3.x version" echo "and then set installed Python/bin path into PATH system variable on your PC!" exit 1 fi diff --git a/test_tizen_emulator.sh b/test_tizen_emulator.sh new file mode 100755 index 0000000000..9f9c132af1 --- /dev/null +++ b/test_tizen_emulator.sh @@ -0,0 +1,47 @@ +#!/bin/bash -xe +#!/bin/sh -xe + +# test +test() +{ + TIZEN_PLATFORM_VER="6.5" + QEMU_VERSION="5.0.1.2" + BUILD_TARGET="ubuntu-64" + # emulator + EMULATOR_COMMON_DIR=./package/$TIZEN_PLATFORM_VER-emulator-qemu-common.package.${TARGET_OS}/data/platforms/tizen-$TIZEN_PLATFORM_VER/common + # we have nothing for common now + EMULATOR_X86_DIR=./package/$TIZEN_PLATFORM_VER-emulator-qemu-x86.package.${TARGET_OS}/data/platforms/tizen-$TIZEN_PLATFORM_VER/common + mkdir -p ./tizen_test_binaries/ + + UNZIP_PATH=`which unzip` + if $UNZIP_PATH=="" + then + echo "Install unzip utility" + echo "sudo apt install unzip" + exit + fi + + $UNZIP_PATH $TIZEN_PLATFORM_VER-emulator-qemu-x86_${QEMU_VERSION}_${BUILD_TARGET}.zip -d ./tizen_test_binaries/ + # Save orignal emulator. + cp -pPR $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator_ORGINAL + + cp -pPR ./tizen_test_binaries/data/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/ + + # kill existing emulator manager + #pkill -f emulator-manager + + BASH_BIN=`which bash` + # Launch Tizen Emulator + echo "Launch Tizen Emulator.." + $BASH_BIN $HOME/tizen-studio/tools/emulator/bin/emulator-manager +} + + +test + +echo "cleaning up.." +rm -rf $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator +mv $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator_ORGINAL $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator +rm -rf $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator_ORGINAL +rm -rf ./tizen_test_binaries/ +echo "test success" diff --git a/tizen/emulator_configure.sh b/tizen/emulator_configure.sh index cb8db9a212..b82238fa9a 100755 --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@ -129,7 +129,7 @@ CONFIGURE_APPEND=" --enable-qt --disable-libav --enable-libpng - --enable-virtfs + --disable-virtfs --disable-bzip2 --disable-curl --disable-lzo @@ -143,6 +143,8 @@ CONFIGURE_APPEND=" --disable-spice --disable-curses --disable-xen + --disable-tpm + --disable-sdl --disable-sheepdog --enable-debug --enable-debug-info @@ -153,7 +155,6 @@ CONFIGURE_APPEND_WIN=" --extra-ldflags=-static-libstdc++ --audio-drv-list=dsound --winver=0x0600 - --enable-sdl --enable-hax" # append platform specific options @@ -219,4 +220,3 @@ echo "##### QEMU configuring for emulator" echo "##### QEMU configure append:" $CONFIGURE_APPEND echo "\nConfigure directory:" ${PWD} exec ../configure $CONFIGURE_APPEND - diff --git a/tizen/src/hw/maru_board.c b/tizen/src/hw/maru_board.c index ea5798c4dd..99eadff06d 100644 --- a/tizen/src/hw/maru_board.c +++ b/tizen/src/hw/maru_board.c @@ -48,13 +48,6 @@ static void maru_x86_board_init(MachineState *machine) maru_device_init(); } -#define HAX_HW_COMPAT_2_6 \ - {\ - .driver = "virtio-pci",\ - .property = "disable-modern",\ - .value = "on",\ - }, - static void maru_x86_machine_options(MachineClass *m) { m->family = "pc_piix"; @@ -67,9 +60,9 @@ static void maru_x86_machine_options(MachineClass *m) m->no_cdrom = 1; m->no_sdcard = 1; m->default_boot_order = "c"; -#ifdef CONFIG_HAX - SET_MACHINE_COMPAT(m, HAX_HW_COMPAT_2_6); -#endif +#ifdef CONFIG_HAX + compat_props_add(m->compat_props, hw_compat_2_6, hw_compat_2_6_len); +#endif //CONFIG_HAX } DEFINE_PC_MACHINE(maru, "maru-x86-machine", maru_x86_board_init, diff --git a/tizen/src/ui/displayglwidget.cpp b/tizen/src/ui/displayglwidget.cpp index 0d64858b76..a9d33929ca 100644 --- a/tizen/src/ui/displayglwidget.cpp +++ b/tizen/src/ui/displayglwidget.cpp @@ -29,21 +29,23 @@ * */ -#include -#include -#include "displayglwidget.h" -#include "input/multitouchtracker.h" - extern "C" { #define QObject qemu_QObject #define QList qemu_QList //declare _Static_assert as there is none for cpp file in qemu -#define _Static_assert(x , msg) Q_ASSERT_X(x , "tizen/ui/displayglwidget.o", msg) +#define _Static_assert(x , msg) //Q_ASSERT_X(x , "tizen/ui/displayglwidget.o", msg) #include "qemu/osdep.h" #include "qemu/thread.h" #undef QObject #undef QList +} +#include +#include +#include "displayglwidget.h" +#include "input/multitouchtracker.h" + +extern "C" { extern uint32_t brightness_level; extern bool display_off; extern uint8_t brightness_tbl[]; diff --git a/tizen/src/ui/qt5_supplement.cpp b/tizen/src/ui/qt5_supplement.cpp index 44abe4e21b..bc3e44fd99 100644 --- a/tizen/src/ui/qt5_supplement.cpp +++ b/tizen/src/ui/qt5_supplement.cpp @@ -28,7 +28,15 @@ * */ - +extern "C" { +#define QObject qemu_QObject +#define QList qemu_QList +#include "qemu/osdep.h" +#include "emul_state.h" +#include "emulator_options.h" +#undef QObject +#undef QList +} #include #include @@ -45,9 +53,6 @@ DECLARE_DEBUG_CHANNEL(qt5_ui); extern "C" { -#include "qemu/osdep.h" -#include "emul_state.h" -#include "emulator_options.h" bool is_display_off(void); }