diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2017-03-11 11:24:44 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-03-11 14:59:03 -0800 |
commit | 0e80359e6285e094eaf1e403835c12081faef535 (patch) | |
tree | e0e9529e59aad2e1d2804efdb60a4fd0df47b5eb /hw | |
parent | dd4d2578215cd380f40a38028a9904e15b135ef3 (diff) | |
download | qemu-0e80359e6285e094eaf1e403835c12081faef535.zip |
target/xtensa: xtfpga: load DTB only when FDT support is enabled
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xtensa/xtfpga.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index dc6fdcc266..11176e26bd 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, |