gem5: expose syscall emulation with --user

Then also expose QEMU user mode with --user. Docs not perfect yet,
would require a build alternative for userland/ for -static and or
passing options before the QEMU userland executable with a new CLI.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-10-29 23:00:01 +00:00
parent e267435f6a
commit a29b5a41fb
4 changed files with 232 additions and 184 deletions

View File

@@ -6,6 +6,12 @@ import common
class QemuComponent(common.Component):
def add_parser_arguments(self, parser):
parser.add_argument(
'--user',
default=False,
action='store_true',
help='Build QEMU user mode instead of system.',
)
parser.add_argument(
'extra_config_args',
default=[],
@@ -20,12 +26,16 @@ class QemuComponent(common.Component):
verbose = ['V=1']
else:
verbose = []
if args.user:
target_list = '{}-linux-user'.format(args.arch)
else:
target_list = '{}-softmmu'.format(args.arch)
common.run_cmd(
[
os.path.join(common.qemu_src_dir, 'configure'),
'--enable-debug',
'--enable-trace-backends=simple',
'--target-list={}-softmmu'.format(args.arch),
'--target-list={}'.format(target_list),
'--enable-sdl',
'--with-sdlabi=2.0',
] +