mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
bisect: use current script directory to call other scripts
This commit is contained in:
@@ -10119,7 +10119,7 @@ Original report: https://www.mail-archive.com/gem5-users@gem5.org/msg16677.html
|
|||||||
At d334a0db538db1a82db62fd5f74a169ca9e21f23 + 1:
|
At d334a0db538db1a82db62fd5f74a169ca9e21f23 + 1:
|
||||||
|
|
||||||
....
|
....
|
||||||
/run --arch aarch64 --emulator gem5 --tmux --cpu 2 --run-id 2 -- --cpu-type=HPI --caches --l2cache --l1d_size=64kB --l1i_size=64kB --l2_size=256kB
|
./run --arch aarch64 --emulator gem5 --cpu 2 -- --cpu-type=HPI --caches --l2cache --l1d_size=64kB --l1i_size=64kB --l2_size=256kB
|
||||||
....
|
....
|
||||||
|
|
||||||
The simulator fails with:
|
The simulator fails with:
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
|
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
|
||||||
set -eu
|
set -eu
|
||||||
cd ../..
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||||
./build-gem5 --gem5-build-id bisect
|
"${root_dir}/build-gem5" --arch aarch64 --gem5-build-id bisect --clean
|
||||||
|
"${root_dir}/build-gem5" --arch aarch64 --gem5-build-id bisect
|
||||||
set +e
|
set +e
|
||||||
# Setup for quick failures:
|
# Setup for quick failures:
|
||||||
# https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
|
# https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
|
||||||
timeout 5 ./run --emulator gem5 --gem5-build-id bisect --quit-after-boot
|
timeout 5 "${root_dir}/run" --emulator gem5 --gem5-build-id bisect --quit-after-boot "$@"
|
||||||
if [ $? -ne 124 ]; then
|
if [ $? -ne 124 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
|
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
|
||||||
set -eu
|
set -eu
|
||||||
./build-linux --clean "$@"
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||||
./build-linux "$@"
|
"${root_dir}/build-linux" --clean "$@"
|
||||||
|
"${root_dir}/build-linux" "$@"
|
||||||
set +e
|
set +e
|
||||||
./run --quit-after-boot "$@" || status=$?
|
"${root_dir}/run" --quit-after-boot "$@" || status=$?
|
||||||
# https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
|
# https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
|
||||||
if [ "$status" -eq 125 ] || [ "$status" -gt 127 ]; then
|
if [ "$status" -eq 125 ] || [ "$status" -gt 127 ]; then
|
||||||
status=1
|
status=1
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
|
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
|
||||||
set -eu
|
set -eu
|
||||||
git submodule update --recursive
|
git submodule update --recursive
|
||||||
cd ../..
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||||
./build-qemu --arch aarch64 --qemu-build-id bisect
|
"${root_dir}/build-qemu" --arch aarch64 --qemu-build-id bisect
|
||||||
./run --arch aarch64 --qemu-build-id bisect --quit-after-boot
|
"${root_dir}/run" --arch aarch64 --qemu-build-id bisect --quit-after-boot
|
||||||
|
|||||||
Reference in New Issue
Block a user