diff --git a/README.adoc b/README.adoc index 11bd791..8acfc20 100644 --- a/README.adoc +++ b/README.adoc @@ -1630,7 +1630,7 @@ which automatically finds unstripped shared libraries on the host for us. See also: https://stackoverflow.com/questions/8611194/debugging-shared-libraries-with-gdbserver/45252113#45252113 -== Architectures +== CPU architecture The portability of the kernel and toolchains is amazing: change an option and most things magically work on completely different hardware. @@ -1649,6 +1649,19 @@ Debug: ./rungdb -a arm .... +We also have one letter shorthand names for the architectures: + +.... +# aarch64 +./run -a A +# arm +./run -a a +# mips64 +./run -a m +# x86_64 +./run -a x +.... + Known quirks of the supported architectures are documented in this section. === mips64 diff --git a/common b/common index de823bd..086d63f 100644 --- a/common +++ b/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"