Late to the party, however I think I have solution for you.
As Ingo mentioned, in this tutorial custom image is used for emulation. However it does not mean you can't emulate official one like raspbian-buster-lite image. This image also contains all necessary files for QEMU emulation, however they are named differently. Also you can only emulate this kernel on:
-machine raspi*
type machine because it had been compiled for specific Raspberry Pi hardware so you obviously need specific machine support in QEMU for that purpose. So versatile_pb won't work in this case, thats why in tutorial separate kernel and device tree blob is used. However as mentioned in tutorial this raspi machine does not support networking and USB so if you need those you better emulate on versatile_pb machine.
Anyway, from boot partition you need files specific for Raspberry Pi version you are interested in. Boot partition contains files which are enabling system to run on every Raspberry Pi hardware. So for example for Raspberry Pi 3B these files would be:
- kernel image -> kernel8.img
- device tree blob -> bcm2710-rpi-3-b.dtb (bcm2710 naming explanation)
Raspberry image does not use initrd, so you won't need for bootup.
With these, only thing left is to assemble correct QEMU emulation command, which in my case for basic bootup was:
qemu-system-aarch64 \
-M raspi3 \
-append "rw earlyprintk=ttyAMA0,115200 loglevel=8 console=ttyAMA0,115200 root=PARTUUID=6c586e13-02 rootfstype=ext4 rootwait" \
-cpu cortex-a53 \
-dtb /path/to/bcm2710-rpi-3-b.dtb \
-drive id=hd-root,file=/path/to/2019-09-26-raspbian-buster-lite.img,format=raw \
-show-cursor \
-kernel /path/to/kernel8.img \
-m 1024 \
-serial mon:stdio \
-nographic
For rootfs I used PARTUUID and
rootwait
cause I had some trouble booting with standard device naming. You can check this value in fstab after you mounted img partition or from boot partition in cmdline.txt.
I also added:
-nographic
for only console but you can ignore it if you want to work with GUI.
That should do it.