mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
prebuilt: failed extract-vmlinux attempt
This commit is contained in:
10
run
10
run
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user