mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
x86/loader: add -shim option
Add new -shim command line option, wire up for the x86 loader. When specified load shim into the new "etc/boot/shim" fw_cfg file. Needs OVMF changes too to be actually useful. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20240905141211.1253307-6-kraxel@redhat.com>
This commit is contained in:
parent
f2594d9284
commit
a5bd044b15
5 changed files with 53 additions and 0 deletions
|
@ -305,6 +305,21 @@ static void machine_set_kernel(Object *obj, const char *value, Error **errp)
|
|||
ms->kernel_filename = g_strdup(value);
|
||||
}
|
||||
|
||||
static char *machine_get_shim(Object *obj, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
||||
return g_strdup(ms->shim_filename);
|
||||
}
|
||||
|
||||
static void machine_set_shim(Object *obj, const char *value, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
||||
g_free(ms->shim_filename);
|
||||
ms->shim_filename = g_strdup(value);
|
||||
}
|
||||
|
||||
static char *machine_get_initrd(Object *obj, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
@ -1082,6 +1097,11 @@ static void machine_class_init(ObjectClass *oc, void *data)
|
|||
object_class_property_set_description(oc, "kernel",
|
||||
"Linux kernel image file");
|
||||
|
||||
object_class_property_add_str(oc, "shim",
|
||||
machine_get_shim, machine_set_shim);
|
||||
object_class_property_set_description(oc, "shim",
|
||||
"shim.efi file");
|
||||
|
||||
object_class_property_add_str(oc, "initrd",
|
||||
machine_get_initrd, machine_set_initrd);
|
||||
object_class_property_set_description(oc, "initrd",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue