bisect-gem5-linux-boot 569 B

1234567891011121314
  1. #!/usr/bin/env bash
  2. # https://cirosantilli.com/linux-kernel-module-cheat#bisection
  3. set -eu
  4. root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
  5. "${root_dir}/build-gem5" --arch aarch64 --gem5-worktree bisect --clean || exit 255
  6. "${root_dir}/build-gem5" --arch aarch64 --gem5-worktree bisect || exit 255
  7. set +e
  8. # Setup for quick failures:
  9. # https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
  10. timeout 5 "${root_dir}/run" --emulator gem5 --gem5-worktree bisect --quit-after-boot "$@"
  11. if [ $? -ne 124 ]; then
  12. exit 1
  13. fi