mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 13:04:27 +01:00
build-qemu
This commit is contained in:
41
build-qemu
Executable file
41
build-qemu
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import multiprocessing
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import common
|
||||
|
||||
parser = common.get_argparse(argparse_args={
|
||||
'description': 'Build QEMU'
|
||||
})
|
||||
parser.add_argument(
|
||||
'extra_config_args',
|
||||
default=[],
|
||||
help='Extra arguments for the tool.',
|
||||
metavar='extra-config-args',
|
||||
nargs='*'
|
||||
)
|
||||
args = common.setup(parser)
|
||||
os.makedirs(common.qemu_build_dir, exist_ok=True)
|
||||
subprocess.check_call(
|
||||
[
|
||||
os.path.join(common.qemu_src_dir, 'configure'),
|
||||
'--enable-debug',
|
||||
'--enable-trace-backends=simple',
|
||||
'--target-list={}-softmmu'.format(args.arch),
|
||||
'--enable-sdl',
|
||||
'--with-sdlabi=2.0',
|
||||
] +
|
||||
args.extra_config_args,
|
||||
cwd=common.qemu_build_dir
|
||||
)
|
||||
subprocess.check_call(
|
||||
[
|
||||
'make',
|
||||
'-j',
|
||||
# TODO factor with build.
|
||||
str(multiprocessing.cpu_count()),
|
||||
],
|
||||
cwd=common.qemu_build_dir
|
||||
)
|
||||
Reference in New Issue
Block a user