fi
grep -q '^CONFIG_HOTPLUG_CPU=y$' "$1"
}
+
+# identify_qemu builddir
+#
+# Returns our best guess as to which qemu command is appropriate for
+# the kernel at hand. Override with the RCU_QEMU_CMD environment variable.
+identify_qemu () {
+ local u="`file "$1"`"
+ if test -n "$RCU_QEMU_CMD"
+ then
+ echo $RCU_QEMU_CMD
+ elif echo $u | grep -q x86-64
+ then
+ echo qemu-system-x86_64
+ elif echo $u | grep -q "Intel 80386"
+ then
+ echo qemu-system-i386
+ elif uname -a | grep -q ppc64
+ then
+ echo qemu-system-ppc64
+ else
+ echo Cannot figure out what qemu command to use! 1>&2
+ # Usually this will be one of /usr/bin/qemu-system-*
+ # Use RCU_QEMU_CMD environment variable or appropriate
+ # argument to top-level script.
+ exit 1
+ fi
+}
cd $KVM
kstarttime=`awk 'BEGIN { print systime() }' < /dev/null`
echo ' ---' `date`: Starting kernel
-if file linux-2.6/*.o | grep -q 64-bit
-then
- QEMU=qemu-system-x86_64
-else
- QEMU=qemu-system-i386
-fi
+
+# Determine the appropriate flavor of qemu command.
+QEMU="`identify_qemu $builddir/vmlinux.o`"
# Generate -smp qemu argument.
cpu_count=`configNR_CPUS.sh $config_template`
echo " --datestamp string"
echo " --duration minutes"
echo " --kversion vN.NN"
+ echo " --qemu-cmd qemu-system-..."
echo " --rcu-kvm absolute-pathname"
echo " --results absolute-pathname"
echo " --relbuilddir relative-pathname"
kversion=$2
shift
;;
+ --qemu-cmd)
+ checkarg --qemu-cmd "(qemu-system-...)" $# "$2" 'qemu-system-' '^--'
+ RCU_QEMU_CMD="$2"; export RCU_QEMU_CMD
+ shift
+ ;;
--rcu-kvm)
checkarg --rcu-kvm "(absolute pathname)" "$#" "$2" '^/' error
KVM=$2; export KVM