mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
fix run-toolchain, qemu-monitor, trace-boot, trace2line, bisect-linux-boot-gem5. Fixes part of #63
I'm sad no one reported qemu-monitor break, that one is kind of important. count.out arguments broke it as an init program, since the kernel adds trash parameters to every init. Is anyone using this repo, I wonder? Keep pushing, keep pushing. One day it gets good enough, and the whole world will see.
This commit is contained in:
@@ -1,34 +1,11 @@
|
||||
#!/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)
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
./build-linux --clean "$@"
|
||||
./build-linux "$@"
|
||||
set +e
|
||||
./run --eval 'm5 exit' "$@" || status=$?
|
||||
# https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
|
||||
if [ "$status" -eq 125 ] || [ "$status" -gt 127 ]; then
|
||||
status=1
|
||||
fi
|
||||
exit "$status"
|
||||
|
||||
Reference in New Issue
Block a user