Hi, This is probably happening because 20170616/disks/linaro-minimal-aarch64.img is using the old m5 binary and as such it doesn't support the runtime --addr option (which has been added after 2017) I recommend you to either rebuild the m5 binary and replace it in the disk image, or to use the [1] disk image available at [2].
As you are running with KVM, you should be using the /init.addr.gem5 init script (so amend the kernel cmdline accordingly) Kind Regards Giacomo [1]: http://dist.gem5.org/dist/current/arm/disks/ubuntu-18.04-arm64-docker.img.bz2 [2]: http://www.gem5.org/documentation/general_docs/fullsystem/guest_binaries > -----Original Message----- > From: kong han via gem5-users <gem5-users@gem5.org> > Sent: 06 April 2021 15:50 > To: gem5-users <gem5-users@gem5.org> > Cc: kong han <han.k...@outlook.com> > Subject: [gem5-users] --script can't be read when using kvm > > Hi all, > > Now I run the KVM CPU and use the -script params to write the rcS script file > to the image. The gem5 version is 20.0.0.3, the image I using is aarch-system- > 20170616/disks/linaro-minimal-aarch64.img, and I mount the image and > modify the /usr/bin/auto-root-login : > > /sbin/m5 --addr 0x10010000 readfile > /tmp/script > > chmod 755 /home/root/script > > if [ -s /tmp/script ]; then > > ./tmp/script > > fi > > exec /bin/login -f root > > but the /tmp/script is null, that's mean, the readfile command doesn't work. > > And if the /usr/bin/auto-root-login is this: > > # /sbin/m5 --addr 0x10010000 readfile > /tmp/script > > # chmod 755 /home/root/script > > # if [ -s /tmp/script ]; then > > # ./tmp/script > > # fi > > exec /bin/login -f root > > then I m5term to connect it, and run the command in the cmd: > > /sbin/m5 --addr 0x10010000 readfile > /tmp/script > > cat /tmp/script > > the /tmp/script is written, that's mean,the readfile command work success. > > I don't know why this is, is it because the login of root plays an import > role? > > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ 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