dhruvvyas90 / qemu-rpi-kernel

Qemu kernel for emulating Rpi on QEMU
2.06k stars 363 forks source link

Kernel panic on poweroff #122

Closed dilyanpalauzov closed 3 years ago

dilyanpalauzov commented 3 years ago

With Qemu 5.2 I start

qemu-system-arm -dtb ./versatile-pb-buster.dtb -kernel ./kernel-qemu-4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -append "root=/dev/sda2 rootfstype=ext4 rw" -drive driver=raw,file=./2021-01-11-raspios-buster-armhf.img,index=0,media=disk -serial stdio

then I log in and type “sudo poweroff”. The system prints:

[ OK ] Stopped Create System Users. [ OK ] Stopped Remount Root and Kernel File Systems. [ OK ] Reached target Shutdown. [ OK ] Reached target Final Step. [ OK ] Started Power-Off. [ OK ] Reached target Power-Off. reboot: System halted Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000

CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.19.50+ #1 Hardware name: ARM-Versatile (Device Tree Support) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (panic+0xc8/0x240) [] (panic) from [] (do_exit+0x950/0x9fc) [] (do_exit) from [] (sys_reboot+0x1a0/0x1f0) [] (sys_reboot) from [] (ret_fast_syscall+0x0/0x54) Exception stack(0xcf823fa8 to 0xcf823ff0) 3fa0: 00000000 00000000 fee1dead 28121969 4321fedc f07d4700 3fc0: 00000000 00000000 00000000 00000058 00000fff bebc7c08 00000000 004f4b80 3fe0: 00506e3c bebc7b88 004f14a8 b6ecca38 ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 ]---

Can you provide hints how to achive clean termination, rather than kernel panic?

ptrsr commented 3 years ago

https://gitlab.com/qemu-project/qemu/-/issues/64

ptrsr commented 3 years ago

This has been fixed in QEMU v6.1.0-rc0.

dhruvvyas90 commented 3 years ago

Patched in Qemu 6.1