Files
linux-kernel-module-cheat/bisect-linux-boot-gem5
Ciro Santilli 六四事件 法轮功 bc73cebff1 Build the Linux kernel independently from Buildroot
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.
2018-10-12 09:30:33 +01:00

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)