From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PATCH 2/8] add firmware to machine options
Date: Mon, 2 Dec 2013 13:24:37 +0100 [thread overview]
Message-ID: <1385987083-19917-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1385987083-19917-1-git-send-email-kraxel@redhat.com>
This patch adds firmware to the machine options. -bios <file> becomes a
shortcut for -machine firmware=<file>. Advantage is that the firmware
can be specified via config file as -machine is parsed using QemuOpts
and it is also possible to use different defaults for different
machine types (via QEMUMachine->default_machine_opts).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index 8d5d874..27b09e5 100644
--- a/vl.c
+++ b/vl.c
@@ -428,6 +428,10 @@ static QemuOptsList qemu_machine_opts = {
.name = "usb",
.type = QEMU_OPT_BOOL,
.help = "Set on/off to enable/disable usb",
+ },{
+ .name = "firmware",
+ .type = QEMU_OPT_STRING,
+ .help = "firmware image",
},
{ /* End of list */ }
},
@@ -3229,7 +3233,7 @@ int main(int argc, char **argv, char **envp)
}
break;
case QEMU_OPTION_bios:
- bios_name = optarg;
+ qemu_opts_set(qemu_find_opts("machine"), 0, "firmware", optarg);
break;
case QEMU_OPTION_singlestep:
singlestep = 1;
@@ -4050,6 +4054,7 @@ int main(int argc, char **argv, char **envp)
kernel_filename = qemu_opt_get(machine_opts, "kernel");
initrd_filename = qemu_opt_get(machine_opts, "initrd");
kernel_cmdline = qemu_opt_get(machine_opts, "append");
+ bios_name = qemu_opt_get(machine_opts, "firmware");
boot_order = machine->default_boot_order;
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);
--
1.8.3.1
next prev parent reply other threads:[~2013-12-02 12:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 12:24 [Qemu-devel] [PATCH 0/8] seabios update Gerd Hoffmann
2013-12-02 12:24 ` [Qemu-devel] [PATCH 1/8] add pc-{i440fx,q35}-2.0 machine types Gerd Hoffmann
2013-12-02 14:30 ` Igor Mammedov
2013-12-02 14:44 ` Gerd Hoffmann
2013-12-02 21:50 ` Andreas Färber
2013-12-02 12:24 ` Gerd Hoffmann [this message]
2013-12-02 12:24 ` [Qemu-devel] [PATCH 3/8] roms: update seabios submodule to latest master Gerd Hoffmann
2013-12-02 12:24 ` [Qemu-devel] [PATCH 4/8] roms: build two seabios binaries Gerd Hoffmann
2013-12-02 12:24 ` [Qemu-devel] [PATCH 5/8] roms: enable seabios cross builds Gerd Hoffmann
2013-12-02 12:24 ` [Qemu-devel] [PATCH 6/8] roms: update seabios binaries Gerd Hoffmann
2013-12-02 12:24 ` [Qemu-devel] [PATCH 7/8] roms: update vgabios binaries Gerd Hoffmann
2013-12-02 12:24 ` [Qemu-devel] [PATCH 8/8] pc: switch 2.0 machine types to large seabios binary Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2013-12-06 9:35 [Qemu-devel] [PULL 0/8] seabios update Gerd Hoffmann
2013-12-06 9:35 ` [Qemu-devel] [PATCH 2/8] add firmware to machine options Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385987083-19917-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).