-
qemu-img create <img name>.img <size e.g. 8G>
-
Boot and install ubuntu:
qemu-system-x86_64 -hda <disk img> -cdrom <installation img> -boot d -enable-kvm -m 4096
-
Make m5:
cd <gem5>/util/m5
make -f Makefile.x86
- Mount disk image:
fdisk -lu <disk img>
mkdir mnt/
sudo mount -o loop,offset=$[offset*512] <disk img> mnt/
- Copy m5 binary to:
/sbin/
- Create a link from
/sbin/gem5
to/sbin/m5
.
ln -s /sbin/m5 /sbin/gem5
-
Create a file at
/lib/systemd/system/gem5.service
. (file content is here) -
Create a file at
/sbin/initgem5
. (file content is here) -
Boot the image and enable the
gem5.service
.
qemu-system-x86_64 -hda <img> -enable-kvm -m 4096
systemctl enable gem5
- Clone ASCYLIB.
git clone https://github.com/LPD-EPFL/ASCYLIB
- Make ASCYLIB.
make bst_aravind
make bst_howley
make lfsl_fraser
make htjava
-
Add run scripts for running tests.
-
Enable auto login
systemctl edit serial-getty@ttyS0
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM
-
Shutdown qemu and write script for running tests.
-
Add script for starting gem5.
-
Run script
-
Connect with telnet
telnet 127.0.0.1 3456