mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
Allow passing options to gem5 itself instead of fs.py
This commit is contained in:
8
run
8
run
@@ -14,9 +14,10 @@ nographic=false
|
|||||||
extra_append='nokaslr norandmaps printk.devkmsg=on printk.time=y'
|
extra_append='nokaslr norandmaps printk.devkmsg=on printk.time=y'
|
||||||
extra_flags=''
|
extra_flags=''
|
||||||
gem5=false
|
gem5=false
|
||||||
|
gem5opts=''
|
||||||
initrd=false
|
initrd=false
|
||||||
root=''
|
root=''
|
||||||
while getopts a:Dde:giknt:x OPT; do
|
while getopts a:Dde:G:giknt:x OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
a)
|
a)
|
||||||
arch="$OPTARG"
|
arch="$OPTARG"
|
||||||
@@ -40,6 +41,9 @@ while getopts a:Dde:giknt:x OPT; do
|
|||||||
g)
|
g)
|
||||||
gem5=true
|
gem5=true
|
||||||
;;
|
;;
|
||||||
|
G)
|
||||||
|
gem5opts="$OPTARG"
|
||||||
|
;;
|
||||||
i)
|
i)
|
||||||
initrd=true
|
initrd=true
|
||||||
;;
|
;;
|
||||||
@@ -60,6 +64,7 @@ if $gem5; then
|
|||||||
cmd="\
|
cmd="\
|
||||||
M5_PATH='$(pwd)/gem5/gem5-system' \
|
M5_PATH='$(pwd)/gem5/gem5-system' \
|
||||||
'${gem5_dir}/build/X86/gem5.opt' \
|
'${gem5_dir}/build/X86/gem5.opt' \
|
||||||
|
${gem5opts} \
|
||||||
'${gem5_dir}/configs/example/fs.py' \
|
'${gem5_dir}/configs/example/fs.py' \
|
||||||
--disk-image='${outdir}/images/rootfs.ext2' \
|
--disk-image='${outdir}/images/rootfs.ext2' \
|
||||||
--kernel='${outdir}/build/linux-custom/vmlinux' \
|
--kernel='${outdir}/build/linux-custom/vmlinux' \
|
||||||
@@ -70,6 +75,7 @@ M5_PATH='$(pwd)/gem5/gem5-system' \
|
|||||||
M5_PATH='$(pwd)/gem5/gem5-system' \
|
M5_PATH='$(pwd)/gem5/gem5-system' \
|
||||||
$debug_vm \
|
$debug_vm \
|
||||||
'${gem5_dir}/build/ARM/gem5.opt' \
|
'${gem5_dir}/build/ARM/gem5.opt' \
|
||||||
|
${gem5opts} \
|
||||||
'${gem5_dir}/configs/example/fs.py' \
|
'${gem5_dir}/configs/example/fs.py' \
|
||||||
--command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 rw loglevel=8 mem=512MB root=/dev/sda $extra_append' \
|
--command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 rw loglevel=8 mem=512MB root=/dev/sda $extra_append' \
|
||||||
--disk-image='${outdir}/images/rootfs.ext2' \
|
--disk-image='${outdir}/images/rootfs.ext2' \
|
||||||
|
|||||||
Reference in New Issue
Block a user