From 00d282d912173b72c63c0a2cc893a97d45498da5 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Wed, 20 Jun 2018 11:50:36 +0100 Subject: [PATCH] gem5: use m5term instead of telnet --- README.adoc | 12 ++++++++++++ common | 1 + gem5-shell | 9 ++++++--- gem5/build | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.adoc b/README.adoc index 116c551..9cfe88e 100644 --- a/README.adoc +++ b/README.adoc @@ -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: <> * `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. diff --git a/common b/common index cc6b7a3..a1cd79b 100644 --- a/common +++ b/common @@ -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}" diff --git a/gem5-shell b/gem5-shell index dd81350..f1e4086 100755 --- a/gem5-shell +++ b/gem5-shell @@ -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" diff --git a/gem5/build b/gem5/build index 029cebd..a5a6712 100755 --- a/gem5/build +++ b/gem5/build @@ -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}"