* [Qemu-devel] [PATCH] target/xtensa: xtfpga: load DTB only when FDT support is enabled
@ 2017-03-11 23:01 Max Filippov
0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2017-03-11 23:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Max Filippov
xtensa linux can use DTB but does not require it, so FDT support is not
a requirement for target/xtensa. Don't try to load DTB when FDT support
is not configured.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
hw/xtensa/xtfpga.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index dc6fdcc..11176e2 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -317,6 +317,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
cur_tagptr = put_tag(cur_tagptr, BP_TAG_COMMAND_LINE,
strlen(kernel_cmdline) + 1, kernel_cmdline);
}
+#ifdef CONFIG_FDT
if (dtb_filename) {
int fdt_size;
void *fdt = load_device_tree(dtb_filename, &fdt_size);
@@ -332,6 +333,14 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
sizeof(dtb_addr), &dtb_addr);
cur_lowmem = QEMU_ALIGN_UP(cur_lowmem + fdt_size, 4096);
}
+#else
+ if (dtb_filename) {
+ error_report("could not load DTB '%s': "
+ "FDT support is not configured in QEMU",
+ dtb_filename);
+ exit(EXIT_FAILURE);
+ }
+#endif
if (initrd_filename) {
BpMemInfo initrd_location = { 0 };
int initrd_size = load_ramdisk(initrd_filename, cur_lowmem,
--
2.1.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-11 23:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11 23:01 [Qemu-devel] [PATCH] target/xtensa: xtfpga: load DTB only when FDT support is enabled Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).