1

I'm trying to set up gem5 x86 full system on Mac OS Mojave (10.14)

First I did a git clone to get the gem5 sources, which are located at ~/gem5.

Then I ran scons build/x86/gem5.fast to build the whole thing. I had to change some of the -Werror flags to get it to compile, but it seems to work.

To test it, I ran build/x86/gem5.fast configs/example/se.py -c tests/test-progs/hello/bin/x86/linux/hello and got the following output:

gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Jan 18 2020 15:28:50
gem5 started Jan 18 2020 17:48:35
gem5 executing on My-MacBook-Pro-208.local, pid 89984
command line: build/x86/gem5.fast configs/example/se.py -c tests/test-progs/hello/bin/x86/linux/hello

Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
0: system.remote_gdb: listening for remote gdb on port 7000
**** REAL SIMULATION ****
info: Entering event queue @ 0.  Starting simulation...
Hello world!
Exiting @ tick 5941500 because exiting with last active thread context

I wanted to configure full system simulation, so I went to the "Full-System Stuff" section at http://gem5.org/Download and downloaded the Full System Files. I extracted the tar into ~/gem5/x86-system.

So now there's ~/gem5/x86-system/binaries which contains x86_64-vmlinux-2.6.22.9 and ~/gem5/x86-system/disks which contains linux-x86.img

In ~/.bash_profile I added export M5_PATH="/Users/me/gem5/x86-system".

However, when I run scons build/x86/tests/fast/quick, almost all of the tests fail. A lot of them have a failure like this:

...
  File "/Users/me/gem5/configs/common/SysPaths.py", line 62, in __call__
    raise IOError("Can't find a path to system files.")
IOError: Can't find a path to system files.

I also tried to run build/x86/gem5.fast configs/example/fs.py but I get the following error:

...
  File "/Users/me/gem5/configs/common/SysPaths.py", line 71, in __call__
    raise IOError("Can't find file '%s' on path." % filename)
IOError: Can't find file 'x86root.img' on path.

I'm not sure what part of configuration I'm missing. The docs and google searches aren't giving any working solutions...

rcplusplus
  • 2,767
  • 5
  • 29
  • 43
  • Related: https://stackoverflow.com/questions/56319473/gem-5-ioerror-cant-find-a-path-to-system-files-full-system-x86-simulation-set/56320982#56320982 – Ciro Santilli Jan 19 '20 at 00:33
  • @CiroSantilli Is there a way to make it work without supplying `--disk-image` and `--kernel` manually? – rcplusplus Jan 19 '20 at 00:44
  • For normal runs, if the filename is the correct hardcoded name in M5_PATH it works. Not sure that latest zips are up to date. I would just always provide explicitly. For tests, a zip should automatically be downloaded, and if it does not work, it is a bug. Tests are being run before every commit, so I would be surprised if there's a problem there, but possible. Maybe also to do with fast? I had success running tests last time I tried: https://stackoverflow.com/questions/52279971/how-to-run-the-gem5-unit-tests – Ciro Santilli Jan 20 '20 at 12:15

0 Answers0