Hi guys,

I did not use gem5 for a long time and I try to get back at it. I am also new 
to full system simulations.
I am facing a problem when I try to copy files on on my gem5 image disk and 
access them through my gem5 simulation.

I have an ubuntu 16 img for ARM 64bits that boots and I can checkpoint and 
simulate and everythings looks OK. But when I try to add new files to it, the 
new files are not visible within my gem5 simulation or sometimes they appears 
but are truncated
To add new files, I mount it on a loop device on the host computer which is not 
ARM, it is a RHEL7 with x86_64 architecture like this
sudo mount -o loop,offset=65536 gem5-ubuntu16.04-aarch64-20190523.img <my 
mountpoint>

When I open my simulation in interactive mode, and stat my copied file:
root@aarch64-gem5:/home/test# stat ./stream_armclang_sve.exe
stat ./stream_armclang_sve.exe
File: './stream_armclang_sve.exe'
Size: 5               Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d      Inode: 405148      Links: 1

And when I do the same operation on my host computer:
File: './stream_armclang_sve.exe'
Size: 3790000         Blocks: 7392       IO Block: 4096   regular file
Device: 702h/1794d      Inode: 405148      Links: 1

Inode is the same but the size of the file is different, and I get a strange 
error while trying to execute it.
It looks like there is a difference between the host OS and the simulated OS in 
gem5 in the way they read/write the disk image that I am not sure how to solve

My command to launch is as follow, I am starting from a checkpoint:
./build/ARM/gem5.opt \
--outdir=m5out/stream_sve_16core_HBM2 \
configs/example/fs.py \
-r 1 \
--checkpoint-dir=<my chpk dir> \
--cpu-type=AtomicCPU \
--restore-with-cpu= AtomicCPU \
--arm-iset=aarch64 \
--machine-type=VExpress_GEM5_V1 \
--kernel=linuximage/vmlinux \
--disk=<my img disk>
--machine-type=VExpress_GEM5_V1 \
--num-cpus=16 \
--num-dirs=8 \
...

I was wondering what is your best practices to transfer files to the img disk 
and any help is welcome !
Thanks for your patience =)

Gregory .V
_______________________________________________
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