* Neil Williams:

> The requirement for linuxboot_dma.bin is specific to QEMU 2.7 and is
> not provided by the seabios package (which provides linuxboot_dma.bin).
> As a workaround, symlinking linuxboot_dma.bin as linuxboot.bin
> in /usr/share/seabios/ allows the guestfs operations to proceed.

This is the qemu upstream commit that introduces linuxboot_dma.bin, this
contains what looks to me like code has been forked from seabios.

,----
| commit b2a575a1c652904600869e774e45bf4c9ed72c55
| Author: Marc MarĂ­ <mar...@redhat.com>
| Date:   Mon May 23 19:11:33 2016 +0100
| 
|     Add optionrom compatible with fw_cfg DMA version
| 
|     This optionrom is based on linuxboot.S.
| 
|     Signed-off-by: Marc MarĂ­ <mar...@redhat.com>
|     Signed-off-by: Richard W.M. Jones <rjo...@redhat.com>
|     Message-Id: <1464027093-24073-2-git-send-email-rjo...@redhat.com>
|     [Add -fno-toplevel-reorder, support clang without -m16. - Paolo]
|     Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
`----

We have already established that symlinking linuxboot_dma.bin to
linuxboot.bin fixes directly booting a Linux kernel, so I suppose that
backing out the change to hw/i386/pc.c may do the trick, as below.

Cheers,
-Hilko

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 1b8baa8..f56e225 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -998,13 +998,8 @@ static void load_linux(PCMachineState *pcms,
     fw_cfg_add_i32(fw_cfg, FW_CFG_SETUP_SIZE, setup_size);
     fw_cfg_add_bytes(fw_cfg, FW_CFG_SETUP_DATA, setup, setup_size);

-    if (fw_cfg_dma_enabled(fw_cfg)) {
-        option_rom[nb_option_roms].name = "linuxboot_dma.bin";
-        option_rom[nb_option_roms].bootindex = 0;
-    } else {
-        option_rom[nb_option_roms].name = "linuxboot.bin";
-        option_rom[nb_option_roms].bootindex = 0;
-    }
+    option_rom[nb_option_roms].name = "linuxboot.bin";
+    option_rom[nb_option_roms].bootindex = 0;
     nb_option_roms++;
 }

@@ -1296,7 +1291,6 @@ void xen_load_linux(PCMachineState *pcms)
     load_linux(pcms, fw_cfg);
     for (i = 0; i < nb_option_roms; i++) {
         assert(!strcmp(option_rom[i].name, "linuxboot.bin") ||
-               !strcmp(option_rom[i].name, "linuxboot_dma.bin") ||
                !strcmp(option_rom[i].name, "multiboot.bin"));
         rom_add_option(option_rom[i].name, option_rom[i].bootindex);
     }

Reply via email to