像下面的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