}
# default parameters
+source_path=`dirname "$0"`
cpu=""
interp_prefix="/usr/gnemul/qemu-%M"
static="no"
;;
--cc=*) CC="$optarg"
;;
+ --source-path=*) source_path="$optarg"
+ ;;
--cpu=*) cpu="$optarg"
;;
--extra-cflags=*) QEMU_CFLAGS="$optarg $QEMU_CFLAGS"
QEMU_INCLUDES="-I. -I\$(SRC_PATH)"
LDFLAGS="-g $LDFLAGS"
+# make source path absolute
+source_path=`cd "$source_path"; pwd`
+
check_define() {
cat > $TMPC <<EOF
#if !defined($1)
confsuffix=""
fi
-# find source path
-source_path=`dirname "$0"`
-source_path=`cd "$source_path"; pwd`
-
werror=""
for opt do
;;
--interp-prefix=*) interp_prefix="$optarg"
;;
- --source-path=*) source_path="$optarg"
+ --source-path=*)
;;
--cross-prefix=*)
;;
;;
--target-list=*) target_list="$optarg"
;;
- --trace-backend=*) trace_backend="$optarg"
+ --enable-trace-backend=*) trace_backend="$optarg"
;;
- --trace-file=*) trace_file="$optarg"
+ --with-trace-file=*) trace_file="$optarg"
;;
--enable-gprof) gprof="yes"
;;
echo " --disable-docs disable documentation build"
echo " --disable-vhost-net disable vhost-net acceleration support"
echo " --enable-vhost-net enable vhost-net acceleration support"
-echo " --trace-backend=B Trace backend nop simple ust dtrace"
-echo " --trace-file=NAME Full PATH,NAME of file to store traces"
+echo " --enable-trace-backend=B Set trace backend"
+echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends)
+echo " --with-trace-file=NAME Full PATH,NAME of file to store traces"
echo " Default:trace-<pid>"
echo " --disable-spice disable spice"
echo " --enable-spice enable spice"
#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
#error Invalid KVM version
#endif
-#if !defined(KVM_CAP_USER_MEMORY)
-#error Missing KVM capability KVM_CAP_USER_MEMORY
-#endif
-#if !defined(KVM_CAP_SET_TSS_ADDR)
-#error Missing KVM capability KVM_CAP_SET_TSS_ADDR
-#endif
-#if !defined(KVM_CAP_DESTROY_MEMORY_REGION_WORKS)
-#error Missing KVM capability KVM_CAP_DESTROY_MEMORY_REGION_WORKS
+EOF
+ must_have_caps="KVM_CAP_USER_MEMORY \
+ KVM_CAP_DESTROY_MEMORY_REGION_WORKS \
+ KVM_CAP_COALESCED_MMIO \
+ KVM_CAP_SYNC_MMU \
+ "
+ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) ; then
+ must_have_caps="$caps \
+ KVM_CAP_SET_TSS_ADDR \
+ KVM_CAP_EXT_CPUID \
+ KVM_CAP_CLOCKSOURCE \
+ KVM_CAP_NOP_IO_DELAY \
+ KVM_CAP_PV_MMU \
+ KVM_CAP_MP_STATE \
+ KVM_CAP_USER_NMI \
+ "
+ fi
+ for c in $must_have_caps ; do
+ cat >> $TMPC <<EOF
+#if !defined($c)
+#error Missing KVM capability $c
#endif
+EOF
+ done
+ cat >> $TMPC <<EOF
int main(void) { return 0; }
EOF
if test "$kerneldir" != "" ; then
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
if test "$kvmerr" != "" ; then
echo -e "${kvmerr}\n\
- NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
- recent kvm-kmod from http://sourceforge.net/projects/kvm."
+NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
+recent kvm-kmod from http://sourceforge.net/projects/kvm."
fi
fi
feature_not_found "kvm"
#include <spice.h>
int main(void) { spice_server_new(); return 0; }
EOF
- spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null)
- spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null)
- if $pkgconfig --atleast-version=0.5.3 spice-server >/dev/null 2>&1 && \
+ spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
+ spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
+ if $pkg_config --atleast-version=0.5.3 spice-server >/dev/null 2>&1 && \
compile_prog "$spice_cflags" "$spice_libs" ; then
spice="yes"
libs_softmmu="$libs_softmmu $spice_libs"
##########################################
# check if trace backend exists
-sh "$source_path/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null
+sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null
if test "$?" -ne 0 ; then
echo
echo "Error: invalid trace backend"
fi
case "$target_arch2" in
- alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus)
- echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
+ i386|x86_64)
+ echo "CONFIG_NOSOFTFLOAT=y" >> $config_target_mak
;;
*)
- echo "CONFIG_NOSOFTFLOAT=y" >> $config_target_mak
+ echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
;;
esac
done
mkdir -p $DIRS
for f in $FILES ; do
- test -f $f || symlink $source_path/$f $f
+ test -e $f || symlink $source_path/$f $f
done
# temporary config to build submodules
echo "CPP=${cross_prefix}cpp" >> $config_mak
echo "OBJCOPY=objcopy" >> $config_mak
echo "IASL=iasl" >> $config_mak
- echo "HOST_CC=$host_cc" >> $config_mak
echo "LD=$ld" >> $config_mak
done