|
|
9ae3a8 |
From 5129a1337bbbac935b8d17205eb9131645fc5831 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Thu, 16 Jan 2014 09:31:58 -0500
|
|
|
9ae3a8 |
Subject: [PATCH 08/14] add firmware to machine options
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1389864720-14128-2-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56739
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 1/3] add firmware to machine options
|
|
|
9ae3a8 |
Bugzilla: 1038603
|
|
|
9ae3a8 |
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This patch adds firmware to the machine options. -bios <file> becomes a
|
|
|
9ae3a8 |
shortcut for -machine firmware=<file>. Advantage is that the firmware
|
|
|
9ae3a8 |
can be specified via config file as -machine is parsed using QemuOpts
|
|
|
9ae3a8 |
and it is also possible to use different defaults for different
|
|
|
9ae3a8 |
machine types (via QEMUMachine->default_machine_opts).
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 1442d3e6912d7ec88480099503cfa0aeaedf5634)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
vl.c | 7 ++++++-
|
|
|
9ae3a8 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
vl.c | 7 ++++++-
|
|
|
9ae3a8 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/vl.c b/vl.c
|
|
|
9ae3a8 |
index 5aea00c..b70d107 100644
|
|
|
9ae3a8 |
--- a/vl.c
|
|
|
9ae3a8 |
+++ b/vl.c
|
|
|
9ae3a8 |
@@ -428,6 +428,10 @@ static QemuOptsList qemu_machine_opts = {
|
|
|
9ae3a8 |
.name = "usb",
|
|
|
9ae3a8 |
.type = QEMU_OPT_BOOL,
|
|
|
9ae3a8 |
.help = "Set on/off to enable/disable usb",
|
|
|
9ae3a8 |
+ },{
|
|
|
9ae3a8 |
+ .name = "firmware",
|
|
|
9ae3a8 |
+ .type = QEMU_OPT_STRING,
|
|
|
9ae3a8 |
+ .help = "firmware image",
|
|
|
9ae3a8 |
},
|
|
|
9ae3a8 |
{ /* End of list */ }
|
|
|
9ae3a8 |
},
|
|
|
9ae3a8 |
@@ -3204,7 +3208,7 @@ int main(int argc, char **argv, char **envp)
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
break;
|
|
|
9ae3a8 |
case QEMU_OPTION_bios:
|
|
|
9ae3a8 |
- bios_name = optarg;
|
|
|
9ae3a8 |
+ qemu_opts_set(qemu_find_opts("machine"), 0, "firmware", optarg);
|
|
|
9ae3a8 |
break;
|
|
|
9ae3a8 |
case QEMU_OPTION_singlestep:
|
|
|
9ae3a8 |
singlestep = 1;
|
|
|
9ae3a8 |
@@ -4035,6 +4039,7 @@ int main(int argc, char **argv, char **envp)
|
|
|
9ae3a8 |
kernel_filename = qemu_opt_get(machine_opts, "kernel");
|
|
|
9ae3a8 |
initrd_filename = qemu_opt_get(machine_opts, "initrd");
|
|
|
9ae3a8 |
kernel_cmdline = qemu_opt_get(machine_opts, "append");
|
|
|
9ae3a8 |
+ bios_name = qemu_opt_get(machine_opts, "firmware");
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if (!boot_order) {
|
|
|
9ae3a8 |
boot_order = machine->boot_order;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|