Dear Waliullah,

I think that the image has a gem5_init script that executes the m5 exit command. You can use the image from gem5 resources (http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz) with vmlinux-5.4.49 kernel (http://dist.gem5.org/dist/v21-2/kernels/x86/static/vmlinux-5.4.49). Then you need to emulate the image and change the gem5_init.sh in order to get the terminal:

sudo apt-get install qemu qemu-user-static qemu-user
sudo mount -o loop,offset=1048576 $HOME/COSSIM/kernels/disks/x86-ubuntu.img /mnt
cd /mnt
sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo chroot .

nano root/gem5_init.sh #Change the line 21 from m5 exit to /bin/sh

exit
# now we are back to the host system
cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt


Now you can simulate using the gem5.

Best regards,
Nikos




Quoting Waliullah Mridha via gem5-users <gem5-users@gem5.org>:

Hi,
I am a new user trying to run Gem5 in FS mode. My command line is given bellow. I also attached a terminal to see the output. Everything looks good except Gem5 exit after the boot process finishes. On Gem5 run terminal I got the message "[cid:image004.png@01D8394B.885BD600]". Shouldn't I see a linux command prompt in the attached terminal instead of exiting after boot complete. Just wondering if the disk image I am using (downloaded from gs://dist/gem5.org/dist/current/images/x86) has any init script that causes this exit?
Appreciate your help.
Thanks

Here is my command line.
[cid:image002.png@01D8394B.885BD600]

Here is the output from gem5:
[cid:image003.png@01D8394B.885BD600]
.
.
[cid:image004.png@01D8394B.885BD600]


Here is the output from the terminal:
.
.
[cid:image001.png@01D8394C.E5439960]


_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
  • [gem5-users] Gem5... Waliullah Mridha via gem5-users
    • [gem5-users]... Νικόλαος Ταμπουρατζής via gem5-users

Reply via email to