[SeaBIOS] [PATCH] make qemu_cfg_init depend on QEMU_HARDWARE instead of QEMU

Kevin O'Connor kevin at koconnor.net
Fri Jun 14 02:14:45 CEST 2013


On Thu, Jun 13, 2013 at 07:43:03AM +0200, Gerd Hoffmann wrote:
> Gets qemu features like direct kernel boot and boot
> ordering going when seabios runs on coreboot.
> 
> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>

Okay, that looks like it would work.  I think the patch below would be
slightly neater though.

-Kevin


>From 5085ada1820f3a17a64f6e3774861622ce613a1f Mon Sep 17 00:00:00 2001
From: Kevin O'Connor <kevin at koconnor.net>
Date: Thu, 13 Jun 2013 20:04:31 -0400
Subject: [PATCH] make qemu_cfg_init depend on QEMU_HARDWARE instead of QEMU
To: seabios at seabios.org

Gets qemu features like direct kernel boot and boot
ordering going when seabios runs on coreboot.

Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/paravirt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/paravirt.c b/src/paravirt.c
index e5027d0..d1a5d3e 100644
--- a/src/paravirt.c
+++ b/src/paravirt.c
@@ -222,6 +222,9 @@ struct qemu_smbios_header {
 static void
 qemu_cfg_legacy(void)
 {
+    if (!CONFIG_QEMU)
+        return;
+
     // Misc config items.
     qemu_romfile_add("etc/show-boot-menu", QEMU_CFG_BOOT_MENU, 0, 2);
     qemu_romfile_add("etc/irq0-override", QEMU_CFG_IRQ0_OVERRIDE, 0, 1);
@@ -301,7 +304,7 @@ struct QemuCfgFile {
 
 void qemu_cfg_init(void)
 {
-    if (!CONFIG_QEMU)
+    if (!runningOnQEMU())
         return;
 
     // Detect fw_cfg interface.



More information about the SeaBIOS mailing list