mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
common: add --qemu option to override configs
This commit is contained in:
6
run
6
run
@@ -127,7 +127,7 @@ def main(args, extra_args=None):
|
||||
if common.image is None:
|
||||
raise Exception('Baremetal ELF file not found. Tried:\n' + '\n'.join(paths))
|
||||
cmd = debug_vm.copy()
|
||||
if args.gem5:
|
||||
if common.emulator == 'gem5':
|
||||
if args.baremetal is None:
|
||||
if not os.path.exists(common.rootfs_raw_file):
|
||||
if not os.path.exists(common.qcow2_file):
|
||||
@@ -359,7 +359,7 @@ def main(args, extra_args=None):
|
||||
if args.baremetal is None:
|
||||
cmd.extend(append)
|
||||
if args.tmux is not None:
|
||||
if args.gem5:
|
||||
if common.emulator == 'gem5':
|
||||
subprocess.Popen([os.path.join(common.root_dir, 'tmu'),
|
||||
'sleep 2;./gem5-shell -n {} {}' \
|
||||
.format(args.run_id, args.tmux)
|
||||
@@ -386,7 +386,7 @@ def main(args, extra_args=None):
|
||||
out_file = common.termout_file
|
||||
common.run_cmd(cmd, cmd_file=common.run_cmd_file, out_file=out_file, extra_env=extra_env)
|
||||
# Check if guest panicked.
|
||||
if args.gem5:
|
||||
if common.emulator == 'gem5':
|
||||
# We have to do some parsing here because gem5 exits with status 0 even when panic happens.
|
||||
# Grepping for '^panic: ' does not work because some errors don't show that message.
|
||||
panic_msg = b'--- BEGIN LIBC BACKTRACE ---$'
|
||||
|
||||
Reference in New Issue
Block a user