From 85d94db467c8758e625a2657e43e3021cf5ccb82 Mon Sep 17 00:00:00 2001 From: Stanislav Vorobiov Date: Mon, 25 Jun 2012 12:52:36 +0400 Subject: [PATCH] Enabled Electric Fence support in QEMU --- configure | 17 ++++++++++++ tizen/build_efence.sh | 22 +++++++++++++++ tizen/qemu_configure_arm_efence.sh | 44 ++++++++++++++++++++++++++++++ tizen/qemu_configure_efence.sh | 43 +++++++++++++++++++++++++++++ 4 files changed, 126 insertions(+) create mode 100755 tizen/build_efence.sh create mode 100755 tizen/qemu_configure_arm_efence.sh create mode 100755 tizen/qemu_configure_efence.sh diff --git a/configure b/configure index 6d865877af..3e63dd75a3 100755 --- a/configure +++ b/configure @@ -194,6 +194,7 @@ smartcard_nss="" usb_redir="" opengl="" opengles="no" +efence="no" glesincdir="" gleslibdir="" zlib="yes" @@ -823,6 +824,10 @@ for opt do ;; --disable-opengles) opengles="no" ;; + --enable-efence) efence="yes" + ;; + --disable-efence) efence="no" + ;; --glesincdir=*) glesincdir="$optarg" ;; --gleslibdir=*) gleslibdir="$optarg" @@ -1149,6 +1154,8 @@ echo " --enable-libiscsi enable iscsi support" echo " --enable-opengles enable OpenGL ES 2.0 passthrough device compilation" echo " Available for targets: ARM" echo " --disable-opengles disable OpenGL ES 2.0 passthrough device compilation" +echo " --enable-efence enable Electic Fence" +echo " --disable-efence disable Electic Fence" echo " --glesincdir=PATH search for EGL and GLES headers in PATH" echo " --gleslibdir=PATH search for EGL and GLES libs in PATH" echo " --disable-smartcard disable smartcard support" @@ -3114,6 +3121,7 @@ if test "$opengles" = "yes"; then echo "OpenGLES libdir $gleslibdir" echo "OpenGLES debug $debug_gles" fi +echo "EFence support $efence" echo "libiscsi support $libiscsi" echo "build guest agent $guest_agent" echo "coroutine backend $coroutine_backend" @@ -3409,6 +3417,10 @@ if test "$opengles" = "yes" ; then fi fi +if test "$efence" = "yes" ; then + echo "CONFIG_EFENCE=y" >> $config_host_mak +fi + if test "$smartcard" = "yes" ; then echo "CONFIG_SMARTCARD=y" >> $config_host_mak fi @@ -3942,6 +3954,11 @@ if test "$target_arch2" = "arm" -a "$opengles" = "yes" ; then fi fi +if test "$efence" = "yes" ; then + echo "CONFIG_BUILD_WITH_EFENCE=y" >> $config_target_mak + echo "LIBS+=-lefence" >> $config_target_mak +fi + for i in $ARCH $TARGET_BASE_ARCH ; do case "$i" in alpha) diff --git a/tizen/build_efence.sh b/tizen/build_efence.sh new file mode 100755 index 0000000000..90a5e4017d --- /dev/null +++ b/tizen/build_efence.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +UNAME=`uname` + +case "$UNAME" in +Linux) + NUMCPU=`grep -c 'cpu cores' /proc/cpuinfo` + ;; +MINGW*) + NUMCPU=`echo $NUMBER_OF_PROCESSORS` + ;; +esac + +echo "Number of CPUs $NUMCPU" + +if [ "x$NUMCPU" != "x" ] ; then + NUMCPU=$(( NUMCPU + 1 )) +else + NUMCPU=1 +fi + +./qemu_configure_efence.sh && make -j$NUMCPU && ./qemu_configure_arm_efence.sh && make -j$NUMCPU && make install diff --git a/tizen/qemu_configure_arm_efence.sh b/tizen/qemu_configure_arm_efence.sh new file mode 100755 index 0000000000..68dc15c9fc --- /dev/null +++ b/tizen/qemu_configure_arm_efence.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# OS specific +#--target-list=i386-softmmu,arm-softmmu \ +targetos=`uname -s` + +cd .. +case $targetos in +Linux*) +echo "checking for os... targetos $targetos" +exec ./configure \ + --target-list=arm-softmmu \ + --disable-werror \ + --audio-drv-list=alsa \ + --disable-vnc-tls \ + --audio-card-list=ac97 \ + --enable-opengles \ + --enable-maru \ + --disable-pie \ + --enable-efence +# --enable-mixemu \ +# --enable-ldst-optimization \ +# --enable-gl +# --enable-ffmpeg +# --enable-v4l2 \ +# --enable-debug \ +# --enable-profiler +;; +MINGW*) +echo "checking for os... targetos $targetos" +exec ./configure \ + --target-list=arm-softmmu \ + --audio-drv-list=winwave \ + --enable-mixemu \ + --disable-vnc-tls \ + --audio-card-list=ac97 \ + --enable-hax \ + --enable-maru +# --enable-ldst-optimization \ +# --enable-gl +# --enable-ffmpeg +# --disable-vnc-jpeg \ +# --disable-jpeg +;; +esac diff --git a/tizen/qemu_configure_efence.sh b/tizen/qemu_configure_efence.sh new file mode 100755 index 0000000000..bc1aab0365 --- /dev/null +++ b/tizen/qemu_configure_efence.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# OS specific +#--target-list=i386-softmmu,arm-softmmu \ +targetos=`uname -s` + +cd .. +case $targetos in +Linux*) +echo "checking for os... targetos $targetos" +exec ./configure \ + --target-list=i386-softmmu \ + --disable-werror \ + --audio-drv-list=alsa \ + --enable-mixemu \ + --disable-vnc-tls \ + --audio-card-list=ac97 \ + --enable-ldst-optimization \ + --enable-maru \ + --enable-gl \ + --enable-efence +# --enable-ffmpeg +# --enable-v4l2 \ +# --enable-debug \ +# --enable-profiler \ +# --enable-gles2 --gles2dir=/usr +;; +MINGW*) +echo "checking for os... targetos $targetos" +exec ./configure \ + --target-list=i386-softmmu \ + --audio-drv-list=winwave \ + --enable-mixemu \ + --disable-vnc-tls \ + --audio-card-list=ac97 \ + --enable-ldst-optimization \ + --enable-hax \ + --enable-maru \ + --enable-gl $1 +# --enable-ffmpeg +# --disable-vnc-jpeg \ +# --disable-jpeg +;; +esac -- 2.34.1