qemu-rpi-kernel icon indicating copy to clipboard operation
qemu-rpi-kernel copied to clipboard

Bad register offset

Open Bahir opened this issue 6 years ago • 10 comments

That's what I receive when running

bash-5.0$ sh -x run.sh qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -drive file=./2018-11-13-raspbian-stretch-lite.img,index=0,media=disk,format=raw -net nic -net user,hostfwd=tcp::5022-:22 -dtb ./versatile-pb.dtb -kernel ./kernel-qemu-4.14.79-stretch -append 'root=/dev/sda2 panic=1' -no-reboot

vpb_sic_write: Bad register offset 0x2c

Bahir avatar Mar 30 '19 09:03 Bahir

I fixed this by adding -serial stdio to my command.

chpatton013 avatar Apr 13 '19 20:04 chpatton013

@Bahir : Does the latest comment solve your problem ?

dhruvvyas90 avatar Apr 22 '19 16:04 dhruvvyas90

I'm getting the same error, running the following:

qemu-system-arm \
	-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
	-boot c \
	-cpu arm1176 \
	-drive "file=2019-04-08-raspbian-stretch-lite.img,if=scsi,cache=none,discard=ignore,format=raw" \
	-kernel ./kernel-qemu-stretch \
	-dtb ./versatile-pb.dtb \
	-m 256M \
	-machine type=versatilepb,accel=tcg \
	-name packer-qemu \
	-no-reboot \
	-vnc 127.0.0.1:4 \
	-nic user,id=user.0,hostfwd=tcp::5555-:22

Adding -serial stdio doesn't make the error go away for me, it just appends more lines after this error (as expected by the nature of the flag?).

This is on QEMU 3.1.0 (installed via Homebrew to MacOS 10.14.4)

radeksimko avatar Apr 22 '19 20:04 radeksimko

I see same error with and without -serial stdio flag on Qemu 4.0.0 and Qemu 2.12.1

iluxave avatar Aug 20 '19 00:08 iluxave

fwiw I see the message vpb_sic_write: Bad register offset 0x2c with and without -serial stdio , however redirecting serial to stdio does give me a working booted raspbian system (the message appears to be benign).

dboreham avatar Aug 27 '19 19:08 dboreham

to block any ctrl+c action and opening the window, -display none -serial mon:stdio worked best for me

minusplusminus avatar Sep 06 '19 19:09 minusplusminus

for my case, I did it with:

qemu-system-aarch64 -M versatilepb \
                    -cpu arm1176 -hda 2019-09-26-raspbian-buster-full.img \
                    -net nic -net user,hostfwd=tcp::5022-:22 \ 
                    -dtb qemu-rpi-kernel/versatile-pb.dtb \
                    -kernel qemu-rpi-kernel/kernel-qemu-4.19.50-buster \
                    -m 256 -append "root=/dev/sda2" \
                    -no-reboot -serial stdio

vickiegpt avatar Nov 20 '19 05:11 vickiegpt

Getting this error as well. Using -serial stdio does not appear to affect situation. Found source code reference to versatilepb.c showing value 0x2c not listed in switch statement. My guess is change in function signature or mis-ordering of arguments but I could be wrong.

scottfurry avatar Jan 19 '20 14:01 scottfurry

I fixed this by adding -serial stdio to my command.

for my case, I did it with:

qemu-system-aarch64 -M versatilepb \
                    -cpu arm1176 -hda 2019-09-26-raspbian-buster-full.img \
                    -net nic -net user,hostfwd=tcp::5022-:22 \ 
                    -dtb qemu-rpi-kernel/versatile-pb.dtb \
                    -kernel qemu-rpi-kernel/kernel-qemu-4.19.50-buster \
                    -m 256 -append "root=/dev/sda2" \
                    -no-reboot -serial stdio

I approved ... 💯

Jukoo avatar Jul 02 '22 12:07 Jukoo

Here is my qemu detals and I'm using "Ubuntu 18.04".

$ qemu-system-arm --version
QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.40)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

Adding -serial stdio fix the problem for me. I'm using "2022-04-04-raspios-bullseye-armhf-lite.img". So the command would be like this for me:

qemu-system-arm   -M versatilepb   -cpu arm1176   -m 256   -drive "file=./2022-04-04-raspios-bullseye-armhf-lite.img,if=none,index=0,media=disk,format=raw,id=disk0"   -device "virtio-blk-pci,drive=disk0,disable-modern=on,disable-legacy=off"   -net "user,hostfwd=tcp::5022-:22"   -dtb ./versatile-pb-bullseye-5.10.63.dtb   -kernel ./kernel-qemu-5.10.63-bullseye   -append 'root=/dev/vda2 panic=1'   -no-reboot -serial stdio

tirzasrwn avatar Jul 04 '22 08:07 tirzasrwn