mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 11:11:35 +01:00
common: one char arch shorthands, fail nicely on invalid arch
This commit is contained in:
18
common
18
common
@@ -22,6 +22,24 @@ common_bench_cmd() (
|
||||
set_common_vars() {
|
||||
arch="$1"
|
||||
gem5="${2:-false}"
|
||||
case "$arch" in
|
||||
a|arm)
|
||||
arch=arm
|
||||
;;
|
||||
A|aarch64)
|
||||
arch=aarch64
|
||||
;;
|
||||
m|mips64)
|
||||
arch=mips64
|
||||
;;
|
||||
x|x86_64)
|
||||
arch=x86_64
|
||||
;;
|
||||
*)
|
||||
printf "unknown arch: ${arch}\n" 1>&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
common_suffix="${3:-}"
|
||||
buildroot_dir="${root_dir}/buildroot"
|
||||
arch_dir="$arch"
|
||||
|
||||
Reference in New Issue
Block a user