Files
linux-kernel-module-cheat/bisect-linux-boot-gem5
Ciro Santilli 六四事件 法轮功 3cc1b793cb Get rid of imp, started giving deprecation warning every time in Python 3.7 in Ubuntu 19.04.
Please python stop torturing me with refactors.

Make ./run -u blow up if executable not found, otherwise I go crazy.

Get ./test-gdb back to life after the ./run relative path refactor, forgot to test this.
2019-05-11 00:00:01 +00:00

35 lines
857 B
Python
Executable File

#!/usr/bin/env python3
import os
import shutil
import sys
import common
build_linux = common.import_path_relative_root('build-linux')
run = common.import_path_relative_root('run')
parser = self.get_argparse(
argparse_args={
'description': '''Bisect the Linux kernel on gem5 boots.
More information at: https://github.com/cirosantilli/linux-kernel-module-cheat#bisection
'''},
default_args={
'emulators': ['gem5'],
'linux_build_id': 'bisect',
},
)
args = self.setup(parser)
# We need a clean rebuild because rebuilds at different revisions:
# - may fail
# - may not actually rebuild all files, e.g. on header changes
self.rmrf(kwargs['linux_build_dir'])
build_linux.LinuxComponent().do_build(args)
status = run.main(args, {
'eval': 'm5 exit',
})
if status == 125 or status == 127:
status = 1
sys.exit(status)