Hi Siqing,

You'll need to call "m5 readfile" in the simulated system (i.e., the
guest OS must call "m5 readfile" at some point), and the command will
output the content of the script that you pass from the host.

gem5 resources has some example of calling "m5 readfile" in the guest OS.

For example, this script is the content of .bashrc in the disk image,
so after the booting process, the guest OS will get the output of "m5
readfile" and run it.
https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/develop/src/npb/disk-image/npb/runscript.sh

Regards,
Hoa Nguyen

On 11/10/20, 657029715--- via gem5-users <gem5-users@gem5.org> wrote:
> Hi Gabe:
> I compiled the m5 utility, do you know how to call it to work?
> blessing you.
>
> Siqing Fu
>
>
>
> 657029...@qq.com
>
> From: Gabe Black via gem5-users
> Date: 2020-11-10 07:30
> To: gem5 users mailing list
> CC: -17; Gabe Black
> Subject: [gem5-users] Re: --Script parameter cannot be used
> The --script option works by setting up a file for the m5 utility to read in
> from the actual on disk init script found in the disk image. If the m5
> utility isn't called, or is called incorrectly, or the script it extracts
> isn't then run, the --script option won't work.
>
> It's been a while, but I think the m5 utility command you want is "m5
> readfile".
>
> Gabe
>
> On Sun, Nov 8, 2020 at 10:55 PM -17 via gem5-users <gem5-users@gem5.org>
> wrote:
> Hi all:
> I try to use the “-- script ”parameter when running gem5 FS mode. I start
> gem5 as follows:
> /build/ARM/gem5.opt -d fs_results/rcstest configs/example/fs.py
> --cpu-type=AtomicSimpleCPU -n 1
> --disk-image=/home/fusiqing/gem5-20.1/2017sys/full_system_images/disks/gem5_ubuntu16.img
>
> --kernel=/home/fusiqing/gem5-20.1/2017sys/full_system_images/binaries/vmlinux
>
> --script=/home/gem5-20.1/configs/boot/halt.sh
> I started the simulation, but the script didn't run.The same goes for other
> files under /example/boot/.
> But in /config.ini I can see:
> readfile=/home/gem5-20.1/configs/boot/halt.sh
> May I ask what error occurred when I used the script?
> Thanks in advance.
>
>
>
>
> /**************************************/
> NUDT                    Siqing Fu
>
> _______________________________________________
> 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 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

Reply via email to