Hi, it looks like your script (/tmp/my_script) is exiting. I think the init
process isn't supposed to exit.

Gabe

On Sun, Apr 11, 2021 at 4:13 AM kong han via gem5-users <gem5-users@gem5.org>
wrote:

> Hi all,
>
> Now I using the Latest linux kernel and disk images to run fs mode with
> KVM CPU   (
> https://www.gem5.org/documentation/general_docs/fullsystem/guest_binaries),
> and I mount the image and modify the mnt-dir/init.gem5 to readfile from the
> –script, then I run this script, but after that, I have the Kernal panic,
> and can’t run next step, how could I solve this problem?
>
> The error is :
>
> + mount -t proc - /proc
>
> + mount -t sysfs - /sys
>
> + mount -t debugfs - /sys/kernel/debug/
>
> + [ -e /dev/sdb1 ]
>
> + [ -e /dev/sdb ]
>
> + [ -e /dev/vdb1 ]
>
> + [ -e /dev/vdb ]
>
> + [ -e /dev/vda1 ]
>
> + [ -e /dev/vda ]
>
> + f=/tmp/script
>
> + /sbin/m5 --addr 0x10010000 readfile
>
> + chmod 777 /tmp/my_script
>
> + exec /tmp/my_script
>
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
>
> [    4.428566] Kernel panic - not syncing: Attempted to kill init!
> exitcode=0x00000000
>
> [    4.428566]
>
> [    4.430528] CPU: 0 PID: 1 Comm: sh Not tainted 4.18.0+ #1
>
> [    4.431673] Hardware name: V2P-CA15 (DT)
>
> [    4.432596] Call trace:
>
> [    4.433314]  dump_backtrace+0x0/0x1c0
>
> [    4.434125]  show_stack+0x14/0x20
>
> [    4.435046]  dump_stack+0x8c/0xac
>
> [    4.435837]  panic+0x130/0x288
>
> [    4.436563]  complete_and_exit+0x0/0x20
>
> [    4.437473]  do_group_exit+0x38/0xa0
>
> [    4.438310]  __wake_up_parent+0x0/0x28
>
> [    4.439181]  el0_svc_naked+0x30/0x34
>
> [    4.440043] Kernel Offset: disabled
>
> [    4.440911] CPU features: 0x22800210
>
> [    4.441720] Memory Limit: 512 MB
>
> [    4.442503] ---[ end Kernel panic - not syncing: Attempted to kill
> init! exitcode=0x00000000
>
> [    4.442503]  ]---
>
>
>
> The init.gem5 I modify is :
>
> #!/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
>
> f=/tmp/script
>
> /sbin/m5 --addr 0x10010000 readfile > /tmp/my_script
>
> chmod 777 /tmp/my_script
>
> exec /tmp/my_script
>
> exec /sbin/getty -a root -L ttyAMA0 vt102
>
>
>
> And my cmd is :
>
> ./build/ARM/gem5.opt \
>
>     -d ./m5out/   \
>
>     ./configs/example/fs.py  \
>
>     --disk=../image/ubuntu-18.04-arm64-docker.img  \
>
>     --kernel=../aarch-system-201901106/binaries/vmlinux.arm64  \
>
>     --cpu-type=ArmV8KvmCPU  \
>
>     --bootloader=../kernel/aarch-system-201901106/binaries/boot.arm64  \
>
>     --script=../gem5/temp-rcs/t1.rcS  \
>
>
>
>
> _______________________________________________
> 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