mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
kvm
This commit is contained in:
12
run
12
run
@@ -7,6 +7,7 @@ arch=x86_64
|
||||
cpus=1
|
||||
debug_vm=''
|
||||
kgdb=false
|
||||
kvm=false
|
||||
nographic=false
|
||||
# norandmaps: Don't use address space randomization. Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space.
|
||||
# printk.time=y: log in format: "[time ] msg" for all printk messages.
|
||||
@@ -19,7 +20,7 @@ gem5=false
|
||||
gem5opts=''
|
||||
initrd=false
|
||||
root=''
|
||||
while getopts a:c:Dde:G:giknt:x OPT; do
|
||||
while getopts a:c:Dde:G:giKknt:x OPT; do
|
||||
case "$OPT" in
|
||||
a)
|
||||
arch="$OPTARG"
|
||||
@@ -36,6 +37,9 @@ while getopts a:c:Dde:G:giknt:x OPT; do
|
||||
e)
|
||||
extra_append="$extra_append $OPTARG"
|
||||
;;
|
||||
K)
|
||||
kvm=true
|
||||
;;
|
||||
k)
|
||||
extra_append="$extra_append kgdbwait"
|
||||
# For those who want to try KDB.
|
||||
@@ -66,6 +70,9 @@ if $gem5; then
|
||||
outdir="$(pwd)/buildroot/output.${arch}-gem5~"
|
||||
gem5_dir="$(pwd)/gem5/gem5"
|
||||
if [ "$arch" = x86_64 ]; then
|
||||
if "$kvm"; then
|
||||
extra_flags="$extra_flags --cpu-type=X86KvmCPU"
|
||||
fi
|
||||
cmd="\
|
||||
M5_PATH='$(pwd)/gem5/gem5-system' \
|
||||
'${gem5_dir}/build/X86/gem5.opt' \
|
||||
@@ -95,6 +102,9 @@ $extra_flags \
|
||||
fi
|
||||
else
|
||||
buildroot_out_dir="./buildroot/output.${arch}~"
|
||||
if "$kvm"; then
|
||||
extra_flags="$extra_flags -enable-kvm"
|
||||
fi
|
||||
extra_flags="$extra_flags_qemu $extra_flags"
|
||||
images_dir="$buildroot_out_dir/images"
|
||||
qemu_common="\
|
||||
|
||||
Reference in New Issue
Block a user