mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
gem5: use m5term instead of telnet
This commit is contained in:
12
README.adoc
12
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: <<graphic-mode-gem5>>
|
* `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
|
* `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
|
=== gem5 stats
|
||||||
|
|
||||||
Lets try to understand some stats better.
|
Lets try to understand some stats better.
|
||||||
|
|||||||
1
common
1
common
@@ -78,6 +78,7 @@ set_common_vars() {
|
|||||||
common_gem5_src_dir="${common_gem5_non_default_src_root_dir}/${gem5_variant}"
|
common_gem5_src_dir="${common_gem5_non_default_src_root_dir}/${gem5_variant}"
|
||||||
fi
|
fi
|
||||||
common_gem5_out_dir="${common_dir}/gem5/${gem5_variant}"
|
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_build_dir="${common_gem5_out_dir}/build"
|
||||||
common_gem5_system_dir="${common_gem5_out_dir}/system"
|
common_gem5_system_dir="${common_gem5_out_dir}/system"
|
||||||
common_gem5_run_dir="${out_arch_dir}/gem5/${gem5_variant}/${common_run_id}"
|
common_gem5_run_dir="${out_arch_dir}/gem5/${gem5_variant}/${common_run_id}"
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
. common
|
. common
|
||||||
while getopts n: OPT; do
|
while getopts M:n: OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
|
M)
|
||||||
|
common_gem5_variant="$OPTARG"
|
||||||
|
;;
|
||||||
n)
|
n)
|
||||||
common_run_id="$OPTARG"
|
common_run_id="$OPTARG"
|
||||||
;;
|
;;
|
||||||
@@ -11,5 +14,5 @@ while getopts n: OPT; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift "$(($OPTIND - 1))"
|
shift "$(($OPTIND - 1))"
|
||||||
set_common_vars -n "$common_run_id" "$arch" true
|
set_common_vars -M "$common_gem5_variant" -n "$common_run_id" "$arch" true
|
||||||
telnet localhost "$common_gem5_telnet_port"
|
"${common_gem5_m5term}" localhost "$common_gem5_telnet_port"
|
||||||
|
|||||||
@@ -50,5 +50,5 @@ elif [ "$arch" = arm ] || [ "$arch" = aarch64 ]; then
|
|||||||
make -C ./system/arm/aarch64_bootloader/ $cross_compile
|
make -C ./system/arm/aarch64_bootloader/ $cross_compile
|
||||||
cp ./system/arm/aarch64_bootloader/boot_emm.arm64 "$binaries_dir"
|
cp ./system/arm/aarch64_bootloader/boot_emm.arm64 "$binaries_dir"
|
||||||
fi
|
fi
|
||||||
# TODO vs telnet?
|
|
||||||
make -C util/term
|
make -C util/term
|
||||||
|
cp util/term/m5term "${outdir}"
|
||||||
|
|||||||
Reference in New Issue
Block a user