[scripts] Allow --smp option in qemu.sh
Allow changing the default number of CPUs when running QEMU via script command line.
This commit is contained in:
29
qemu.sh
29
qemu.sh
@@ -11,30 +11,43 @@ kvm=""
|
|||||||
cpu="Broadwell,+pdpe1gb"
|
cpu="Broadwell,+pdpe1gb"
|
||||||
smp=4
|
smp=4
|
||||||
|
|
||||||
for arg in $@; do
|
while true; do
|
||||||
case "${arg}" in
|
case "$1" in
|
||||||
--debugboot)
|
-b | --debugboot)
|
||||||
debug="-s -S"
|
debug="-s -S"
|
||||||
debugtarget="${build}/boot/boot.efi"
|
debugtarget="${build}/boot/boot.efi"
|
||||||
flash_name="ovmf_vars_d"
|
flash_name="ovmf_vars_d"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--debug)
|
-d | --debug)
|
||||||
debug="-s -S"
|
debug="-s -S"
|
||||||
flash_name="ovmf_vars_d"
|
flash_name="ovmf_vars_d"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--gfx)
|
-g | --gfx)
|
||||||
gfx=""
|
gfx=""
|
||||||
vga=""
|
vga=""
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--vga)
|
-v | --vga)
|
||||||
vga=""
|
vga=""
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--kvm)
|
-k | --kvm)
|
||||||
kvm="-enable-kvm"
|
kvm="-enable-kvm"
|
||||||
cpu="host"
|
cpu="host"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-c | --cpus)
|
||||||
|
smp=$2
|
||||||
|
shift 2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
build="${arg}"
|
if [ -d "$1" ]; then
|
||||||
|
build="$1"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user