将qemu使用的设备树dump出来

像下面的qemu启动命令:

sudo qemu-system-aarch64 \
    -M  virt \
    -cpu cortex-a53 \
    -smp 2 \
    -m 4096M \
    -kernel ./linux-4.10/out_aarch64/arch/arm64/boot/Image \
    -nographic \
    -append "root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel" \
    -initrd ./rootfs/ramdisk.img \
    -fsdev local,security_model=passthrough,id=fsdev0,path=/nfsroot \
    -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare

 

可以使用如下方式将设备树文件dump出来:

sudo qemu-system-aarch64 \
    -M  virt,dumpdtb=file.dtb \
    -cpu cortex-a53 \
    -smp 2 \
    -m 4096M \
    -kernel ./linux-4.10/out_aarch64/arch/arm64/boot/Image \
    -nographic \
    -append "root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel" \
    -initrd ./rootfs/ramdisk.img \
    -fsdev local,security_model=passthrough,id=fsdev0,path=/nfsroot \
    -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare

 

posted @ 2019-11-18 12:34  摩斯电码  阅读(2046)  评论(0编辑  收藏  举报