[gnome-boxes] meson: Add 'uefi' build option
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] meson: Add 'uefi' build option
- Date: Fri, 4 Oct 2019 13:22:56 +0000 (UTC)
commit dba00e759c61398f3cbb732387d9793a01347fd9
Author: Fabiano FidĂȘncio <fidencio redhat com>
Date: Mon Sep 2 13:11:59 2019 +0200
meson: Add 'uefi' build option
Let's allow distros to decide whether they'll want to use UEFI firmware
whenever it's possible or not.
Signed-off-by: Fabiano FidĂȘncio <fidencio redhat com>
meson_options.txt | 5 +++++
src/meson.build | 3 +++
src/vm-configurator.vala | 4 ++++
3 files changed, 12 insertions(+)
---
diff --git a/meson_options.txt b/meson_options.txt
index c55a4712..a5f1be87 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -29,3 +29,8 @@ option ('profile',
],
value: 'default'
)
+
+option ('uefi',
+ type: 'boolean',
+ value: true,
+ description: 'Use UEFI whenever it is possible')
diff --git a/src/meson.build b/src/meson.build
index 5b59c3b8..f6d1cffc 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -184,6 +184,9 @@ else
dependencies += libovf.get_variable('govf_vapi')
endif
+if get_option('uefi')
+ vala_args += '--define=USE_UEFI'
+endif
executable ('gnome-boxes', vala_sources + resources,
include_directories: config_h_dir,
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index a91aca86..7dba8c49 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -368,7 +368,9 @@ private static void set_post_install_os_config (Domain domain) {
os.set_arch (old_os.get_arch ());
os.set_machine (old_os.get_machine ());
+#if USE_UEFI
os.set_firmware (old_os.get_firmware ());
+#endif
domain.set_os (os);
}
@@ -399,8 +401,10 @@ private static void set_os_config (Domain domain, InstallerMedia install_media,
if (install_media.prefers_q35)
os.set_machine ("q35");
+#if USE_UEFI
if (supports_efi (install_media, domain_caps))
os.set_firmware (GVirConfig.DomainOsFirmware.EFI);
+#endif
var boot_devices = new GLib.List<DomainOsBootDevice> ();
install_media.set_direct_boot_params (os);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]