gem5: use m5term instead of telnet

This commit is contained in:
Ciro Santilli
2018-06-20 11:50:36 +01:00
parent 7bbb2a813e
commit 00d282d912
4 changed files with 20 additions and 4 deletions

View File

@@ -6463,6 +6463,18 @@ So let's explain them one by one here as we understand them:
* `drm: Add component-aware simple encoder` allows you to see images through VNC: <<graphic-mode-gem5>>
* `gem5: Add support for gem5's extended GIC mode` adds support for more than 8 cores: https://stackoverflow.com/questions/50248067/how-to-run-a-gem5-arm-aarch64-full-system-simulation-with-fs-py-with-more-than-8/50248068#5024806
=== m5term
We use the `m5term` in-tree executable to connect to the terminal instead of a direct `telnet`.
If you use `telnet` directly, it mostly works, but certain interactive features don't, e.g.:
* up and down arrows for history havigation
* tab to complete paths
* `Ctrl-C` to kill processes
TODO understand in detail what `m5term` does differently than `telnet`.
=== gem5 stats
Lets try to understand some stats better.

1
common
View File

@@ -78,6 +78,7 @@ set_common_vars() {
common_gem5_src_dir="${common_gem5_non_default_src_root_dir}/${gem5_variant}"
fi
common_gem5_out_dir="${common_dir}/gem5/${gem5_variant}"
common_gem5_m5term="${common_gem5_out_dir}/m5term"
common_gem5_build_dir="${common_gem5_out_dir}/build"
common_gem5_system_dir="${common_gem5_out_dir}/system"
common_gem5_run_dir="${out_arch_dir}/gem5/${gem5_variant}/${common_run_id}"

View File

@@ -1,7 +1,10 @@
#!/usr/bin/env bash
. common
while getopts n: OPT; do
while getopts M:n: OPT; do
case "$OPT" in
M)
common_gem5_variant="$OPTARG"
;;
n)
common_run_id="$OPTARG"
;;
@@ -11,5 +14,5 @@ while getopts n: OPT; do
esac
done
shift "$(($OPTIND - 1))"
set_common_vars -n "$common_run_id" "$arch" true
telnet localhost "$common_gem5_telnet_port"
set_common_vars -M "$common_gem5_variant" -n "$common_run_id" "$arch" true
"${common_gem5_m5term}" localhost "$common_gem5_telnet_port"

View File

@@ -50,5 +50,5 @@ elif [ "$arch" = arm ] || [ "$arch" = aarch64 ]; then
make -C ./system/arm/aarch64_bootloader/ $cross_compile
cp ./system/arm/aarch64_bootloader/boot_emm.arm64 "$binaries_dir"
fi
# TODO vs telnet?
make -C util/term
cp util/term/m5term "${outdir}"