I want to emulate Raspberry Pi 3 with 64 bit mode using QEMU 10.1.3 and the Raspberry Pi latest image - Debian 13 Trixie. I follow https://interrupt.memfault.com/blog/emu ... pi-in-qemu (which is for Debian Bullseye 11) and https://blog.bigsmoke.us/2025/10/10/boo ... 13-on-qemu.
With the image https://downloads.raspberrypi.com/raspi ... ite.img.xz this works:
However if I remove the `sed` line above the system enters endless loop printing
* How should I utilize QEMU, so that it does not require setting in system.conf `WatchdogService=`?
https://www.qemu.org/docs/master/about/ ... tures.html says the option “-watchdog” is removed in 7.2 and “-device” should be used instead, but I do not find information how to use `-device` here.
With the image https://downloads.raspberrypi.com/raspi ... ite.img.xz this works:
or rather it doesn’t work, as after the last line below it waits foreverIMG=2025-12-04-raspios-trixie-arm64-lite.img
KERNEL=kernel8.img
BCM=bcm2710-rpi-3-b.dtb
mkdir boot
guestmount -a $IMG -m /dev/sda1 boot/
cp boot/$BCM .
cp boot/$KERNEL .
touch boot/ssh
echo "pi:$(echo 'xyz9' | openssl passwd -6 -stdin)" > boot/userconf.txt
guestunmount boot
sleep 4 # see man guestmount “Race conditions possible when shutting down the connection”
guestmount -a $IMG -m /dev/sda2 boot/
fakeroot sed -i "sK#WatchdogDevice=.*\$KWatchdogDevice=/dev/watchdog666K" boot/etc/systemd/system.conf
guestunmount boot
sleep 4 # see man guestmount “Race conditions possible when shutting down the connection”
rmdir boot
qemu-img resize -f raw $IMG 4G
qemu-system-aarch64 -M raspi3b -cpu cortex-a53 -append "rw earlyprintk loglevel=8 console=ttyAMA1,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" -dtb $BCM -drive file=$IMG,format=raw,if=sd,index=0 -kernel $KERNEL -m 1G -smp 4 -usb -serial mon:stdio -nographic -device usb-net,netdev=net0 -netdev user,id=net0,hostfwd=tcp::5555-:22
[FAILED] Failed to start apt-listchanges.se…e apt-listchanges database for APT.
See 'systemctl status apt-listchanges.service' for details.
[ OK ] Reached target multi-user.target - Multi-User System.
[ OK ] Reached target graphical.target - Graphical Interface.
Starting cloud-final.service - Cloud-init: Final Stage...
Starting logrotate.service - Rotate log files...
[ OK ] Finished logrotate.service - Rotate log files.
[ OK ] Finished userconfig.service - User configuration dialog.
[ 504.530698] sh[1573]: Completed socket interaction for boot stage final
[ OK ] Finished cloud-final.service - Cloud-init: Final Stage.
[ OK ] Reached target cloud-init.target - Cloud-init target.
However if I remove the `sed` line above the system enters endless loop printing
with the Watchdog change the above log continues with[ 14.809194] systemd[1]: systemd 257.9-1~deb13u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +
IPE +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPT
SETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BP
F_FRAMEWORK +BTF -XKBCOMMON -UTMP +SYSVINIT +LIBARCHIVE)
[ 14.814760] systemd[1]: Detected architecture arm64.
[ 14.824486] systemd[1]: Detected first boot.
Welcome to Debian GNU/Linux 13 (trixie)!
[ 15.094679] systemd[1]: Hostname set to <raspberrypi>.
[ 15.194799] systemd[1]: Initializing machine ID from random generator.
[ 17.040671] systemd[1]: bpf-restrict-fs: BPF LSM hook not enabled in the kernel, BPF LSM not supported.
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.12.47+rpt-rpi-v8 (serge@raspberrypi.com) (aarch64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44) #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16)
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Raspberry Pi 3 Model B
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000038000000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x0000000038000000..0x000000003bffffff (65536 KiB) map reusable linux,cma
* How should I start QEMU, so that it does not enter endless wait at “[ OK ] Reached target cloud-init.target - Cloud-init target.”?[ 17.143568] systemd[1]: Initializing machine ID from random generator.
[ 19.648313] systemd[1]: bpf-restrict-fs: BPF LSM hook not enabled in the kernel, BPF LSM not supported.
[ 25.267475] zram_generator::config[126]: zram0: system has too much memory (917MB), limit is 0MB, ignoring.
[ 47.758946] systemd[1]: Populated /etc with preset unit settings.
[ 51.390174] systemd[1]: Queued start job for default target graphical.target.
[ 51.772769] systemd[1]: Created slice system-getty.slice - Slice /system/getty.
[ OK ] Created slice system-getty.slice - Slice /system/getty.
* How should I utilize QEMU, so that it does not require setting in system.conf `WatchdogService=`?
https://www.qemu.org/docs/master/about/ ... tures.html says the option “-watchdog” is removed in 7.2 and “-device” should be used instead, but I do not find information how to use `-device` here.
Statistics: Posted by dpa — Mon Jan 05, 2026 4:26 pm