mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-22 01:21:53 -06:00
add firmware to machine options
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>
This commit is contained in:
parent
aeca6e8d8b
commit
1442d3e691
1 changed files with 6 additions and 1 deletions
7
vl.c
7
vl.c
|
@ -428,6 +428,10 @@ static QemuOptsList qemu_machine_opts = {
|
||||||
.name = "usb",
|
.name = "usb",
|
||||||
.type = QEMU_OPT_BOOL,
|
.type = QEMU_OPT_BOOL,
|
||||||
.help = "Set on/off to enable/disable usb",
|
.help = "Set on/off to enable/disable usb",
|
||||||
|
},{
|
||||||
|
.name = "firmware",
|
||||||
|
.type = QEMU_OPT_STRING,
|
||||||
|
.help = "firmware image",
|
||||||
},
|
},
|
||||||
{ /* End of list */ }
|
{ /* End of list */ }
|
||||||
},
|
},
|
||||||
|
@ -3229,7 +3233,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_bios:
|
case QEMU_OPTION_bios:
|
||||||
bios_name = optarg;
|
qemu_opts_set(qemu_find_opts("machine"), 0, "firmware", optarg);
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_singlestep:
|
case QEMU_OPTION_singlestep:
|
||||||
singlestep = 1;
|
singlestep = 1;
|
||||||
|
@ -4050,6 +4054,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
kernel_filename = qemu_opt_get(machine_opts, "kernel");
|
kernel_filename = qemu_opt_get(machine_opts, "kernel");
|
||||||
initrd_filename = qemu_opt_get(machine_opts, "initrd");
|
initrd_filename = qemu_opt_get(machine_opts, "initrd");
|
||||||
kernel_cmdline = qemu_opt_get(machine_opts, "append");
|
kernel_cmdline = qemu_opt_get(machine_opts, "append");
|
||||||
|
bios_name = qemu_opt_get(machine_opts, "firmware");
|
||||||
|
|
||||||
boot_order = machine->default_boot_order;
|
boot_order = machine->default_boot_order;
|
||||||
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);
|
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue