ImportError: Can't find a path to system files.

When I try to run the simulator and I get an error: ImportError: Can't find a path to system files.

If you want to run the full-system version (including the full-system regression tests), you will also need to download the full-system files (disk images and binaries). Kernels, disk images, and boot loaders for Alpha, ARM, and x86 are available on the Download  page. SPARC disk images are available on the with the OpenSPARC Architecture tools

Introduction

可以通过configs/common/SysPaths.py 或者环境变量M5_PATH

但是很遗憾,文件失效了

有篇博客,找到了其余的下载方式

PARSEC v2.1 for M5

gem5-gpu全系统模式

wget [<http://dist.gem5.org/dist/>](<http://dist.gem5.org/dist/>)current/m5_system_2.0b3.tar.bz2

shaojiemike@snode6 ~/download  [09:20:09]
> tar xvf m5_system_2.0b3.tar.bz2
m5_system_2.0b3/
m5_system_2.0b3/binaries/
m5_system_2.0b3/binaries/vmlinux
m5_system_2.0b3/binaries/ts_osfpal
m5_system_2.0b3/binaries/console
m5_system_2.0b3/disks/
m5_system_2.0b3/disks/linux-latest.img
m5_system_2.0b3/disks/linux-bigswap2.img

wget <http://www.cs.utexas.edu/\\~parsec_m5/x86_64-vmlinux-2.6.28.4-smp>
wget <http://www.cs.utexas.edu/\\~parsec_m5/x86root-parsec.img.bz2>
bzip2 -d x86root-parsec.img.bz2
mkdir binaries
mv x86_64-vmlinux-2.6.28.4-smp binaries
mkdir disks
mv x86root-parsec.img disks
shaojiemike@snode6 ~/download  [09:20:45]
> cp binaries/x86_64-vmlinux-2.6.28.4-smp m5_system_2.0b3/binaries
shaojiemike@snode6 ~/download  [09:23:20]
> cp disks/x86root-parsec.img m5_system_2.0b3/disks
shaojiemike@snode6 ~/download  [09:23:37]
> tree m5_system_2.0b3
m5_system_2.0b3
├── binaries
│   ├── console
│   ├── ts_osfpal
│   ├── vmlinux
│   └── x86_64-vmlinux-2.6.28.4-smp
└── disks
    ├── linux-bigswap2.img
    ├── linux-latest.img
    └── x86root-parsec.img
shaojiemike@snode6 ~/github/gem5  [08:57:24]
> export M5_PATH='/staff/shaojiemike/download:'
shaojiemike@snode6 ~/github/gem5  [09:22:29]
> ./build/X86/gem5.opt -d m5out/test_HBM ./configs/example/fs.py --kernel=x86_64-vmlinux-2.6.28.4-smp --cpu-clock=1GHz --caches --l2cache --l1d_size=64kB --checkpoint-dir=m5out/cpt_general --script=/staff/shaojiemike/github/gem5/configs/example/memtest.py --mem-type=ramulator --ramulator-config=../ramulator/configs/HBM-config.cfg --cpu-type=detailed --disk-image=x86root-parsec.img
gem5 Simulator System.  <http://gem5.org>
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Sep 23 2022 10:38:37
gem5 started Sep 25 2022 09:24:45
gem5 executing on snode6
command line: ./build/X86/gem5.opt -d m5out/test_HBM ./configs/example/fs.py --kernel=x86_64-vmlinux-2.6.28.4-smp --cpu-clock=1GHz --caches --l2cache --l1d_size=64kB --checkpoint-dir=m5out/cpt_general --script=/staff/shaojiemike/github/gem5/configs/example/memtest.py --mem-type=ramulator --ramulator-config=../ramulator/configs/HBM-config.cfg --cpu-type=detailed --disk-image=x86root-parsec.img
Global frequency set at 1000000000000 ticks per second
info: kernel located at: /staff/shaojiemike/download/m5_system_2.0b3/binaries/x86_64-vmlinux-2.6.28.4-smp
      0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
Listening for com_1 connection on port 3456
warn: Reading current count from inactive timer.
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
**** REAL SIMULATION ****
info: Entering event queue @ 0.  Starting simulation...
gem5.opt: build/X86/mem/request.hh:567: int Request::contextId() const: Assertion `privateFlags.isSet(VALID_CONTEXT_ID)' failed.
Program aborted at tick 22000
[1]    2369097 abort (core dumped)  ./build/X86/gem5.opt -d m5out/test_HBM ./configs/example/fs.py   --caches

但是链接又失效了

# 下载linux-bigswap2.img ,放在x86-system/disks中
<http://www.m5sim.org/dist/current/m5_system_2.0b3.tar.bz2>

网站转移了 http://dist.gem5.org/dist/current/m5_system_2.0b3.tar.bz2

https://github.com/CMU-SAFARI/ramulator/issues/26