[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/8] add firmware to machine options
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 2/8] add firmware to machine options |
Date: |
Fri, 6 Dec 2013 10:35:21 +0100 |
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 <address@hidden>
---
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
- [Qemu-devel] [PULL 0/8] seabios update, Gerd Hoffmann, 2013/12/06
- [Qemu-devel] [PATCH 3/8] roms: update seabios submodule to 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d, Gerd Hoffmann, 2013/12/06
- [Qemu-devel] [PATCH 4/8] roms: build two seabios binaries, Gerd Hoffmann, 2013/12/06
- [Qemu-devel] [PATCH 5/8] roms: enable seabios cross builds, Gerd Hoffmann, 2013/12/06
- [Qemu-devel] [PATCH 2/8] add firmware to machine options,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 1/8] add pc-{i440fx,q35}-2.0 machine types, Gerd Hoffmann, 2013/12/06
- [Qemu-devel] [PATCH 8/8] pc: switch 2.0 machine types to large seabios binary, Gerd Hoffmann, 2013/12/06
- [Qemu-devel] [PATCH 6/8] roms: update seabios binaries, Gerd Hoffmann, 2013/12/06
- [Qemu-devel] [PATCH 7/8] roms: update vgabios binaries, Gerd Hoffmann, 2013/12/06