Enabled Electric Fence support in QEMU
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Mon, 25 Jun 2012 08:52:36 +0000 (12:52 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Wed, 27 Jun 2012 10:46:28 +0000 (14:46 +0400)
configure
tizen/build_efence.sh [new file with mode: 0755]
tizen/qemu_configure_arm_efence.sh [new file with mode: 0755]
tizen/qemu_configure_efence.sh [new file with mode: 0755]

index 6d86587..3e63dd7 100755 (executable)
--- 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 (executable)
index 0000000..90a5e40
--- /dev/null
@@ -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 (executable)
index 0000000..68dc15c
--- /dev/null
@@ -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 (executable)
index 0000000..bc1aab0
--- /dev/null
@@ -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