Skip to content

Commit 00d282d

Browse files
committed
gem5: use m5term instead of telnet
1 parent 7bbb2a8 commit 00d282d

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

README.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6463,6 +6463,18 @@ So let's explain them one by one here as we understand them:
64636463
* `drm: Add component-aware simple encoder` allows you to see images through VNC: <<graphic-mode-gem5>>
64646464
* `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
64656465

6466+
=== m5term
6467+
6468+
We use the `m5term` in-tree executable to connect to the terminal instead of a direct `telnet`.
6469+
6470+
If you use `telnet` directly, it mostly works, but certain interactive features don't, e.g.:
6471+
6472+
* up and down arrows for history havigation
6473+
* tab to complete paths
6474+
* `Ctrl-C` to kill processes
6475+
6476+
TODO understand in detail what `m5term` does differently than `telnet`.
6477+
64666478
=== gem5 stats
64676479

64686480
Lets try to understand some stats better.

common

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ set_common_vars() {
7878
common_gem5_src_dir="${common_gem5_non_default_src_root_dir}/${gem5_variant}"
7979
fi
8080
common_gem5_out_dir="${common_dir}/gem5/${gem5_variant}"
81+
common_gem5_m5term="${common_gem5_out_dir}/m5term"
8182
common_gem5_build_dir="${common_gem5_out_dir}/build"
8283
common_gem5_system_dir="${common_gem5_out_dir}/system"
8384
common_gem5_run_dir="${out_arch_dir}/gem5/${gem5_variant}/${common_run_id}"

gem5-shell

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/usr/bin/env bash
22
. common
3-
while getopts n: OPT; do
3+
while getopts M:n: OPT; do
44
case "$OPT" in
5+
M)
6+
common_gem5_variant="$OPTARG"
7+
;;
58
n)
69
common_run_id="$OPTARG"
710
;;
@@ -11,5 +14,5 @@ while getopts n: OPT; do
1114
esac
1215
done
1316
shift "$(($OPTIND - 1))"
14-
set_common_vars -n "$common_run_id" "$arch" true
15-
telnet localhost "$common_gem5_telnet_port"
17+
set_common_vars -M "$common_gem5_variant" -n "$common_run_id" "$arch" true
18+
"${common_gem5_m5term}" localhost "$common_gem5_telnet_port"

gem5/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ elif [ "$arch" = arm ] || [ "$arch" = aarch64 ]; then
5050
make -C ./system/arm/aarch64_bootloader/ $cross_compile
5151
cp ./system/arm/aarch64_bootloader/boot_emm.arm64 "$binaries_dir"
5252
fi
53-
# TODO vs telnet?
5453
make -C util/term
54+
cp util/term/m5term "${outdir}"

0 commit comments

Comments
 (0)