mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
linux-bisect-boot-gem5: use common and handle status 134
This commit is contained in:
33
linux-bisect-boot-gem5
Normal file → Executable file
33
linux-bisect-boot-gem5
Normal file → Executable file
@@ -1,7 +1,28 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
|
||||||
cd ..
|
while getopts "h${common_getopts_flags}" OPT; do
|
||||||
# Rebuilds were failing without this.
|
case "$OPT" in
|
||||||
rm -rf out/arm/buildroot/build/linux-custom.bisect/
|
h)
|
||||||
./build -aa -L bisect
|
echo "https://github.com/cirosantilli/linux-kernel-module-cheat#getvar" 2>&1
|
||||||
./run -aa -E 'm5 exit' -L bisect -gu
|
exit
|
||||||
|
;;
|
||||||
|
?)
|
||||||
|
common_getopts_case "$OPT"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift "$(($OPTIND - 1))"
|
||||||
|
common_linux_variant=bisect
|
||||||
|
common_setup
|
||||||
|
cd "$common_root_dir"
|
||||||
|
# We need a clean rebuild becuase rebuilds at different revisions:
|
||||||
|
# - may fail
|
||||||
|
# - may not actually rebuild all files, e.g. on header changes
|
||||||
|
rm -rf "$(./getvar -a "$common_arch" -L "$common_linux_variant" linux_variant_dir)"
|
||||||
|
./build -a "$common_arch" -L "$common_linux_variant"
|
||||||
|
status=0
|
||||||
|
./run -a "$common_arch" -E 'm5 exit' -L "$common_linux_variant" -g || status=$?
|
||||||
|
if [ "$status" -eq 125 ] || [ "$status" -gt 127 ]; then
|
||||||
|
status=1
|
||||||
|
fi
|
||||||
|
exit "$status"
|
||||||
|
|||||||
Reference in New Issue
Block a user