echo key configs as bash commands

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-10-25 00:00:00 +00:00
parent 21627ff9d8
commit 98d2c83317
3 changed files with 22 additions and 13 deletions

6
run
View File

@@ -112,16 +112,14 @@ def main(args, extra_args=None):
else:
if not os.path.exists(common.gem5_fake_iso):
os.makedirs(os.path.dirname(common.gem5_fake_iso), exist_ok=True)
with open(common.gem5_fake_iso, 'w') as f:
f.write('a' * 512)
common.write_string_to_file(common.gem5_fake_iso, 'a' * 512)
if not os.path.exists(common.image):
# This is to run gem5 from a prebuilt download.
if (not args.baremetal is None) or (not os.path.exists(common.linux_image)):
raise_image_not_found()
common.run_cmd([os.path.join(common.extract_vmlinux, common.linux_image)])
os.makedirs(os.path.dirname(common.gem5_readfile), exist_ok=True)
with open(common.gem5_readfile, 'w') as readfile:
readfile.write(args.gem5_readfile)
common.write_string_to_file(common.gem5_readfile, args.gem5_readfile)
memory = '{}B'.format(args.memory)
gem5_exe_args = shlex.split(args.gem5_exe_args)
if do_trace: