diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-01-28 10:22:47 -0500 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-01-28 10:22:47 -0500 |
| commit | 47240d73903b0873faaa5c7d2c23f2f42798712a (patch) | |
| tree | 6d5ffd839831c61f2a00e0ce7b8cf67294d9c617 | |
| parent | 742d884fe48c5152d37db3e77fbace8d36c4b45d (diff) | |
kvm-run-kernel.sh: allow overriding the default CPU type
For the rare ocassion where we want something other than a core2duo.
| -rwxr-xr-x | kvm-run-kernel.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kvm-run-kernel.sh b/kvm-run-kernel.sh index 5f75bcb..d953f47 100755 --- a/kvm-run-kernel.sh +++ b/kvm-run-kernel.sh | |||
| @@ -29,6 +29,8 @@ SSH_PORT=2222 # default | |||
| 29 | GDB_PORT=6666 # override in config file | 29 | GDB_PORT=6666 # override in config file |
| 30 | KVM_IMAGE=~/kvm_debian_images/debian_amd64_lib.qcow2 | 30 | KVM_IMAGE=~/kvm_debian_images/debian_amd64_lib.qcow2 |
| 31 | 31 | ||
| 32 | CPU_TYPE=core2duo | ||
| 33 | |||
| 32 | # include config file | 34 | # include config file |
| 33 | [ -f ~/.litmus_kvm ] && source ~/.litmus_kvm | 35 | [ -f ~/.litmus_kvm ] && source ~/.litmus_kvm |
| 34 | 36 | ||
| @@ -47,4 +49,4 @@ fi | |||
| 47 | 49 | ||
| 48 | # Newer versions of KVM may refuse to load a proper serial interface if both -nographic and -serial stdio are specified (koruna does this). | 50 | # Newer versions of KVM may refuse to load a proper serial interface if both -nographic and -serial stdio are specified (koruna does this). |
| 49 | # In such cases, remove "-serial stdio" | 51 | # In such cases, remove "-serial stdio" |
| 50 | qemu-system-x86_64 ${GDB_OPT} -smp $2 -cpu core2duo -hda ${KVM_IMAGE} -m 2000 -net nic,model=e1000 -net user -k en-us -kernel $1 -append "console=ttyS0 root=/dev/hda1 $3" ro -nographic -serial stdio -redir tcp:${SSH_PORT}::22 | 52 | qemu-system-x86_64 ${GDB_OPT} -smp $2 -cpu ${CPU_TYPE} -hda ${KVM_IMAGE} -m 2000 -net nic,model=e1000 -net user -k en-us -kernel $1 -append "console=ttyS0 root=/dev/hda1 $3" ro -nographic -serial stdio -redir tcp:${SSH_PORT}::22 |
