summary refs log tree commit diff stats
path: root/system/device_tree-stub.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-05-07 14:13:46 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-05-10 15:45:15 +0200
commit1935b7ead18dbcbf459dbe7a8fd4253fbe1ed4d0 (patch)
treeb9b4ead6229ed347134b9b74cd822a0933316953 /system/device_tree-stub.c
parent7a6f3343b6f140c945b62a972b36d22efa14bdba (diff)
downloadfocaccia-qemu-1935b7ead18dbcbf459dbe7a8fd4253fbe1ed4d0.tar.gz
focaccia-qemu-1935b7ead18dbcbf459dbe7a8fd4253fbe1ed4d0.zip
kconfig: allow compiling out QEMU device tree code per target
Introduce a new Kconfig symbol, CONFIG_DEVICE_TREE, that specifies whether
to include the common device tree code in system/device_tree.c and to
link to libfdt.  For now, include it unconditionally if libfdt is
available.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'system/device_tree-stub.c')
-rw-r--r--system/device_tree-stub.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/system/device_tree-stub.c b/system/device_tree-stub.c
new file mode 100644
index 0000000000..bddda6fa37
--- /dev/null
+++ b/system/device_tree-stub.c
@@ -0,0 +1,10 @@
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "qapi/qapi-commands-machine.h"
+
+#ifdef CONFIG_FDT
+void qmp_dumpdtb(const char *filename, Error **errp)
+{
+    error_setg(errp, "This machine doesn't have a FDT");
+}
+#endif