prebuilt: failed extract-vmlinux attempt

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-09-16 06:43:18 +01:00
parent e2f36b5bc1
commit 0bf7c7cb81
3 changed files with 13 additions and 1 deletions

10
run
View File

@@ -104,6 +104,14 @@ def main(args, extra_args=None):
if not os.path.exists(common.qcow2_file):
raise_rootfs_not_found()
common.raw_to_qcow2(prebuilt=args.prebuilt, reverse=True)
if not os.path.exists(common.vmlinux):
# This would allow us to run the prebuilt QEMU Linux image.
# but TODO cannot convert Image to vmlinux on aarch64:
# run-detectors: unable to find an interpreter for
if not os.path.exists(common.linux_image):
raise Exception('Linux kernel image not found. Did you compile it?\n' \
'Tried: ' + common.vmlinux)
assert common.run_cmd([os.path.join(common.extract_vmlinux, common.linux_image)]) == 0
os.makedirs(os.path.dirname(common.gem5_readfile), exist_ok=True)
with open(common.gem5_readfile, 'w') as readfile:
readfile.write(args.gem5_readfile)
@@ -175,7 +183,7 @@ def main(args, extra_args=None):
qemu_executable = common.qemu_executable
qemu_found = os.path.exists(qemu_executable)
if not qemu_found:
raise Exception('Could not find the QEMU executable, did you forget to build or install it?\n' \
raise Exception('QEMU executable not found, did you forget to build or install it?\n' \
'Tried to use: ' + qemu_executable)
if not os.path.exists(common.qcow2_file):
if not os.path.exists(common.rootfs_raw_file):