Skip to content

Latest commit

 

History

History
75 lines (58 loc) · 1.35 KB

SetupFSImageWithASCYLIB.md

File metadata and controls

75 lines (58 loc) · 1.35 KB

Setup GEM5 Full System Simulation With ASCYLIB

  1. qemu-img create <img name>.img <size e.g. 8G>

  2. Boot and install ubuntu: qemu-system-x86_64 -hda <disk img> -cdrom <installation img> -boot d -enable-kvm -m 4096

  3. Make m5:

cd <gem5>/util/m5
make -f Makefile.x86
  1. Mount disk image:
fdisk -lu <disk img>
mkdir mnt/
sudo mount -o loop,offset=$[offset*512] <disk img> mnt/
  1. Copy m5 binary to:
/sbin/
  1. Create a link from /sbin/gem5 to /sbin/m5.
ln -s /sbin/m5 /sbin/gem5
  1. Create a file at /lib/systemd/system/gem5.service. (file content is here)

  2. Create a file at /sbin/initgem5. (file content is here)

  3. Boot the image and enable the gem5.service.

qemu-system-x86_64 -hda <img> -enable-kvm -m 4096
systemctl enable gem5
  1. Clone ASCYLIB.
git clone https://github.com/LPD-EPFL/ASCYLIB
  1. Make ASCYLIB.
make bst_aravind
make bst_howley
make lfsl_fraser
make htjava
  1. Add run scripts for running tests.

  2. Enable auto login

systemctl edit serial-getty@ttyS0
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM
  1. Shutdown qemu and write script for running tests.

  2. Add script for starting gem5.

  3. Run script

  4. Connect with telnet

telnet 127.0.0.1 3456