mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
Get rid of out/common, make buildroot, qemu, gem5 in out/
Rationale: previously we had archs on toplevel, e.g. out/x86_64 However, host tools like QEMU and gem5 can reuse a lot of the common build files across archs. Therefore, we save space and time by putting them into a single directory. Therefore, the toplevel out/x86_64 was inconsistent, better put arch inside guest tools that need separate build trees instead, e.g. out/buildroot/x86_64/ Also common was pretty obscure as a name to say the best.
This commit is contained in:
11
run
11
run
@@ -208,6 +208,12 @@ def main(args, extra_args=None):
|
||||
'-drive',
|
||||
'file={},format=qcow2,if={}{}{}'.format(common.qcow2_file, driveif, snapshot, rrid)
|
||||
])
|
||||
if not os.path.exists(common.qcow2_file):
|
||||
raise Exception(
|
||||
'Cannot find the qcow2 root filesystem. You must build QEMU\n'
|
||||
'before building the root filesystem? That is needed because the qcow2\n' +
|
||||
'is created with qemu-img. Tried to use: ' + qemu_executable
|
||||
)
|
||||
if rr:
|
||||
extra_emulator_args.extend([
|
||||
'-drive', 'driver=blkreplay,if=none,image=img-direct,id=img-blkreplay',
|
||||
@@ -247,7 +253,9 @@ def main(args, extra_args=None):
|
||||
] +
|
||||
virtio_gpu_pci
|
||||
)
|
||||
|
||||
if not os.path.exists(qemu_executable):
|
||||
raise Exception('QEMU executable does not exist, did you forget to build or install it?\n' +
|
||||
'Tried to use: ' + qemu_executable)
|
||||
if args.tmux:
|
||||
if args.gem5:
|
||||
subprocess.Popen([os.path.join(common.root_dir, 'tmu'),
|
||||
@@ -263,7 +271,6 @@ def main(args, extra_args=None):
|
||||
"sleep 2;./rungdb -a '{}' -L '{}' -n '{}' {}" \
|
||||
.format(args.arch, args.linux_build_id, args.run_id, args.tmux_args)
|
||||
])
|
||||
|
||||
cmd += extra_emulator_args
|
||||
if debug_vm or args.terminal:
|
||||
out_file = None
|
||||
|
||||
Reference in New Issue
Block a user