mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
38 lines
805 B
Python
Executable File
38 lines
805 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import multiprocessing
|
|
import os
|
|
import subprocess
|
|
|
|
import common
|
|
|
|
parser = common.get_argparse()
|
|
parser.add_argument(
|
|
'extra_config_args',
|
|
default=[],
|
|
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',
|
|
# TODO factor with build.
|
|
'-j', str(multiprocessing.cpu_count()),
|
|
],
|
|
cwd=common.qemu_build_dir
|
|
)
|