spapr: add dumpdtb support
PATCH 1/1 spapr: add dumpdtb support
dumpdtb (-machine dumpdtb=<file>) allows one to inspect the generated device tree of machine types that generate device trees. This is useful for a) seeing what's there b) debugging/testing device tree generator patches. It can be used as follows
$QEMU_CMDLINE -machine dumpdtb=dtb
dtc -I dtb -O dts dtb
--- hw/ppc/spapr.c | 2 ++ 1 file changed, 2 insertions(+)
hw/ppc/spapr.c +2 -0
@@ -30,6 +30,7 @@#include "hw/fw-path-provider.h" #include "elf.h" #include "net/net.h" +#include "sysemu/device_tree.h" #include "sysemu/block-backend.h" #include "sysemu/cpus.h" #include "sysemu/kvm.h"
@@ -822,6 +823,7 @@ static void spapr_finalize_fdt(sPAPRMachineState *spapr,exit (1 ); } +qemu_fdt_dumpdtb (fdt,fdt_totalsize (fdt));cpu_physical_memory_write (fdt_addr, fdt,fdt_totalsize (fdt));g_free (bootlist);
Signature · 1 line
2.4.3
Quoted 9 lines · Andrew Jones
dumpdtb (-machine dumpdtb=<file>) allows one to inspect the generated device tree of machine types that generate device trees. This is useful for a) seeing what's there b) debugging/testing device tree generator patches. It can be used as follows
$QEMU_CMDLINE -machine dumpdtb=dtb
dtc -I dtb -O dts dtbSigned-off-by Andrew Jones <[email protected]>
Glad to see that it's useful for others too :).
Alex
David Gibson
AppliedQuoted 9 lines · Andrew Jones
dumpdtb (-machine dumpdtb=<file>) allows one to inspect the generated device tree of machine types that generate device trees. This is useful for a) seeing what's there b) debugging/testing device tree generator patches. It can be used as follows
$QEMU_CMDLINE -machine dumpdtb=dtb
dtc -I dtb -O dts dtbSigned-off-by Andrew Jones <[email protected]>
Merged into spapr-next, thanks.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson