qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How I can get/dump full dtb file?


From: Victor Martins
Subject: How I can get/dump full dtb file?
Date: Mon, 26 Sep 2022 20:37:31 +0100

Hi all (I´m new in this QEMU world).

In my tutorial to run Linux in QEMU/RISC-V I did this and all is OK:
$ qemu-system-riscv64 \
    -nographic \
    -machine virt \
    -kernel linux-5.19.1/arch/riscv/boot/Image \
    -append "root=/dev/vda ro console=ttyS0" \
    -drive file=busybox,format=raw,id=hd0 \
    -device virtio-blk-device,drive=hd0 \
    -netdev user,id=eth0 \
    -device virtio-net-device,netdev=eth0

After I made the dump of dtb like (using -machine dumpdtb) this without any error:
$ qemu-system-riscv64 \
    -nographic \
    -machine virt \
    -kernel linux-5.19.1/arch/riscv/boot/Image \
    -append "root=/dev/vda ro console=ttyS0" \
    -drive file=busybox,format=raw,id=hd0 \
    -device virtio-blk-device,drive=hd0 \
    -netdev user,id=eth0 \
    -device virtio-net-device,netdev=eth0 \
    -machine dumpdtb=riscv64-virt.dtb

And after I try use the dtb file and remove the virt board like this:
$ qemu-system-riscv64 \
    -nographic \
    -dtb ./riscv64-virt.dtb \
    -kernel linux-5.19.1/arch/riscv/boot/Image \
    -append "root=/dev/vda ro console=ttyS0" \
    -drive file=busybox,format=raw,id=hd0 \
    -device virtio-blk-device,drive=hd0 \
    -netdev user,id=eth0 \
    -device virtio-net-device,netdev=eth0

But don't work as before and I get this error:
$ qemu-system-riscv64: -device virtio-blk-device,
drive=hd0: No `virtio-bus´ bus found for device
`virtio-blk-device´

I feel that the dump operation dont extract the full Device Tree. My idea is to try to use only the dtb/dts. Is that possible?

Regards


reply via email to

[Prev in Thread] Current Thread [Next in Thread]