mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
readme: m5 readfile
gitignore: trace-
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,6 +9,7 @@ gitignore*
|
||||
# Specific files.
|
||||
/9p
|
||||
/README.html
|
||||
/trace-[0-9]*
|
||||
|
||||
# GEM5
|
||||
/m5out
|
||||
|
||||
16
README.adoc
16
README.adoc
@@ -3240,6 +3240,22 @@ Does not work for subdirectories, gem5 crashes:
|
||||
m5 writefile myfileguest mydirhost/myfilehost
|
||||
....
|
||||
|
||||
==== m5 readfile
|
||||
|
||||
https://stackoverflow.com/questions/49516399/how-to-use-m5-readfile-and-m5-execfile-in-gem5/49538051#49538051
|
||||
|
||||
Host:
|
||||
|
||||
....
|
||||
date >m5out/myreadfile
|
||||
....
|
||||
|
||||
Guest:
|
||||
|
||||
....
|
||||
m5 readfile
|
||||
....
|
||||
|
||||
=== gem5 limitations
|
||||
|
||||
* networking not working. We currently just disable it from `inittab` by default to prevent waiting at startup
|
||||
|
||||
6
run
6
run
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -eu
|
||||
. common
|
||||
|
||||
# CLI handling.
|
||||
@@ -121,7 +121,8 @@ if "$gem5"; then
|
||||
else
|
||||
gem5_arch=ARM
|
||||
fi
|
||||
gem5_cpt_dir="./m5out/cpts/${arch}"
|
||||
m5out_dir="${root_dir}/m5out"
|
||||
gem5_cpt_dir="${m5out_dir}/cpts/${arch}"
|
||||
mkdir -p "$gem5_cpt_dir"
|
||||
gem5_common="\
|
||||
M5_PATH='${build_dir}/system' \
|
||||
@@ -134,6 +135,7 @@ ${gem5opts} \
|
||||
--kernel='${out_dir}/build/linux-custom/vmlinux' \
|
||||
--mem-size=${memory} \
|
||||
--num-cpus='${cpus}' \
|
||||
--script='${m5out_dir}/myreadfile' \
|
||||
"
|
||||
if [ "$arch" = x86_64 ]; then
|
||||
if "$kvm"; then
|
||||
|
||||
Reference in New Issue
Block a user