mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
This will allow for other types of root filesystems that don't rely on Buildroot to be added and used in the future. Propagate --verbose on all build scripts to see full GCC commands. build-all: allow for neat subsets also 9p share rootfs_overlay. TODO document.
35 lines
878 B
Python
Executable File
35 lines
878 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import imp
|
|
import os
|
|
import shutil
|
|
import sys
|
|
|
|
import common
|
|
build = imp.load_source('build', os.path.join(common.root_dir, 'build'))
|
|
run = imp.load_source('run', os.path.join(common.root_dir, 'run'))
|
|
|
|
parser = common.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={
|
|
'gem5': True,
|
|
'linux_build_id': 'bisect',
|
|
},
|
|
)
|
|
args = common.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
|
|
common.rmrf(common.linux_build_dir)
|
|
assert build.main(args) == 0
|
|
status = run.main(args, {
|
|
'eval': 'm5 exit',
|
|
})
|
|
if status == 125 or status == 127:
|
|
status = 1
|
|
sys.exit(status)
|