Ok, found a solution.

I more or less merged the existent init.gem5 with the one suggested here 
https://www.gem5.org/documentation/general_docs/fullsystem/disks

So the /init.gem5 inside the img file ended up like this:
---
#!/bin/sh
set -ex
mount -t proc - /proc
mount -t sysfs - /sys
mount -t debugfs - /sys/kernel/debug/
for DEV in /dev/sdb1 /dev/sdb /dev/vdb1 /dev/vdb /dev/vda1 /dev/vda; do
  if [ -e "${DEV}" ]; then
    mount "${DEV}" /data
    break
  fi
done

/sbin/m5 readfile > /tmp/script
chmod 755 /tmp/script
if [ -s /tmp/script ]
then
    # If there is a script, execute the script and then exit the simulation
    su root -c '/tmp/script' # gives script full privileges as root user in 
multi-user mode
    sync
    sleep 10
    /sbin/m5 exit
fi
---

Perhaps the "sync" was the missing command (prior to m5 exit), given the panic 
message. Hope this helps someone else in the future.

Anyway, thanks a lot for the help!
Pedro.
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to