I have added a custom device called rpi_gpio ,when I use qemu monitor and run qemu qtree then I able to see my device with base address and its size as
dev: rpi_gpio, id ""
gpio-in "" 54
gpio-out "" 54
mmio 0000000020200000/00000000000000b1
so to see this I have use these commands
./qemu-system-arm -machine versatilepb -monitor stdio ( To launch monitor)
info qtree
After that I launch QEMU with following command -
./qemu-system-arm -M versatilepb -m 256 -cpu arm1176 -smp 1 -drive "file=QEMUBullseye32Bit.img,if=none,index=0,media=disk,format=raw,id=disk0" -device virtio-blk-pci,drive=disk0,disable-modern=on,disable-legacy=off -netdev user,id=net0,hostfwd=tcp::10023-:22,hostfwd=tcp::17725-:17725 -device virtio-net-pci,netdev=net0,mq=on -kernel kernel-qemu-5.10.63-bullseye -dtb versatile-pb-bullseye-5.10.63.dtb -append "root=/dev/vda2 panic=1" -no-reboot -nographic -snapshot
But when I run raspi-gpio(inside rpi terminal), it give me this error
- Couldn t able to find /proc/device-tree/soc/ranges , Segmentation Fault.
I am not able to understand that where my configuration gone wrong , can anyone please help to resolve this issue .