2018年12月3日星期一

Dump QEMU virt machine dts

 Commands:

qemu-system-aarch64 -machine virt,dumpdtb=/tmp/virt.dtb
dtc -I dtb -O dts /tmp/virt.dtb >/tmp/virt.dts 

Example:

/dts-v1/;

/ {
interrupt-parent = <0x8001>;
#size-cells = <0x2>;
#address-cells = <0x2>;
compatible = "linux,dummy-virt";

platform@c000000 {
interrupt-parent = <0x8001>;
ranges = <0x0 0x0 0xc000000 0x2000000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "qemu,platform", "simple-bus";
};